|
From: Heiko Z. <hz...@pr...> - 2002-05-15 14:01:36
Attachments:
=?iso-8859-1?Q?linuxrc.diff?=
|
----- Forwarded by Heiko Zuerker/ITS/Propack Data Corporation on 05/15/= 2002 09:58 AM ----- |---------+-----------------------------------------------> | | "Walter Haidinger" | | | <wal...@gm...> | | | Sent by: | | | dev...@li...| | | ceforge.net | | | | | | | | | 05/15/2002 06:24 AM | | | | |---------+-----------------------------------------------> >--------------------------------------------------------------------= -----------------------------------------------------------------------= ---| | = = | | To: <dev...@li...> = = | | cc: (bcc: Heiko Zuerker/ITS/Propack Data Corporation) = = | | Subject: [Devil-Linux-discuss] Hack to install onto harddisk= instead of memory (low memory solution) = | >--------------------------------------------------------------------= -----------------------------------------------------------------------= ---| Hi! I've successfully installed Devil-Linux this weekend on an old machine (486/66) with just 24 MB of RAM. I think that even 16 MB would be sufficient. However, in order to do that I had to make Devil-Linux boot onto a harddisk partition instead of a ramdisk. I was forced to do this because _both_ of my 32MB SIMMs turned out to be defective... :-( Well, here's what I did. Perhaps it helps somebody who has a similar problem. How about adding a docs section like "installing Devil-Linux on machines with less than 64 MB RAM" ? This may have been done already but I didn't search the mailing-list archives when I did it because I had no internet access at that time. Anyways, here goes: With my setup, I used three partitions (on an old 200+ MB IDE drive): * /dev/hda1 - DOS (C:), about 50 MB Required because that old machine could not boot from CD-Rom and if I have to use a harddisk anyways we can as well use it for booting to= o. Please note that the floppy containing the config is still required any may have to configure the BIOS to boot from HD first. * /dev/hda2 - Linux SWAP, 64 MB I have free disk space so why not extend the already limited physical= memory and set up a swap partition? * /dev/hda3 - Linux ext2, about 100 MB Used as subsitute for the ramdisk. I've hacked the initrd to use this partition instead of /dev/shm (see below). After setting up a DOS partition to boot from (C:), I copied the boot directory from the CD (to C:\boot). Next, I had to modify to linuxrc script of initrd.gz. To do this, follow these steps (under Linux): 1. Copy the initrd.gz from the CD-Rom somewhere, e.g. > cp /cdrom/boot/initrd.gz /tmp 2. Unpack it > gunzip /tmp/initrd.gz 3. Mount the file using the loopback-device: > mount /tmp/initrd -o rw,loop=3D/dev/loop0 /mnt 4. Modify /mnt/linuxrc with your favourite editor according to the next section below. > your-editor /mnt/linuxrc 5. Copy your /sbin/swapon and /sbin/mkswap files to /mnt/sbin Make sure that the binaries run on your Devil-Linux Version. For me, binaries from SuSE-Linux 7.3 run on Devil-Linux 0.5. 6. Unmount again > umount /mnt 7. Pack the modified image > gzip initrd 8. Copy the new initrd.gz to the boot directory of the DOS partition (C:\boot) Now for the fun part: Howto modify linuxrc (I've modifed linuxrc v1.7 from the 0.5rc1 distribution) Here are the diffs in detail: 28a29,32 > SWAP_PART=3D/dev/hda2 > echo "Adding swapspace on $SWAP_PART" > /sbin/swapon $SWAP_PART && print_status success || print_status failu= re > Add the swap partition. You might add a /sbin/mkswap $SWAP_PART right before swapon but I doubt that this is necessary. Well, of course you need to create the swap-space _once_ ! 31a36,43 > DATA_PART=3D/dev/hda3 > echo "Using $DATA_PART as ramdisk substitute:" > test -d /hd || mkdir /hd > echo -n "Creating ext2 filesystem on $DATA_PART" > /sbin/mke2fs -q $DATA_PART print_status success || print_status failu= re > echo -n "Mounting $DATA_PART" > mount -t ext2 -o rw $DATA_PART /hd && print_status success || > print_status failure> Use partition set by DATA_PART as the ramdisk substitute. First create a mountpoint, then create the filesystem and mount it. *** WARNING: The partition is created _without_ question! Any previously stored data is lost! Actually, that is a good thing as it really simulates ramdisk behaviour and is therefore a security benefit. Also, you can simply turn off the machine without shutting down which is good if you have users power on/off the router without further knowledge.However, it can be *very* disastrous if you edit your partiti= on table and forget to assign the correct partition in DATA_PART. 33,35c45,49 < test -d /dev/shm || mkdir /dev/shm < echo -n "Mounting SHM FS on /dev/shm" < mount -t shm -o size=3D40g shmfs /dev/shm && print_status success || print_status failure--- > #test -d /dev/shm || mkdir /dev/shm > #echo -n "Mounting SHM FS on /dev/shm" > #mount -t shm -o size=3D40g shmfs /dev/shm && print_status success ||= > print_status failure> rm -rf /dev/shm > /dev/null 2>&1 > ln -s /hd /dev/shm 39c53,54 < ln -s /dev/shm /ram --- > #ln -s /dev/shm /ram > ln -s /hd /ram Remove (comment) the shared memory stuff and replace it by symlinks. This allows transparent usage of the partition instead of /dev/shm, i.e. not subsequent scripts need to be modified. That are all changes made to linuxrc. I've attached a context diff with the changes. To apply it, run (replacing step 4 above) in /mnt after saving the attachment (to, say, /tmp): patch < ../tmp/linuxrc.diff *** Security warning: If you store the boot files (kernel, initrd, ...) on the harddisk (i.e. if you do _not_ create a CD containing the new initrd.gz), that files _can_ be modified.Therefore, the integrity of the boot files _hav= e_ to be verified! e.g.: Use MD5 hashes! 1. Get md5sum.exe for DOS from http://etree.org/md5com.html and put it on your config floppy. 2. Create md5 checksums for all files that are on the harddisk, e.g. (write on one line): md5sum.exe C:\boot\initrd.gz C:\boot\loadlin.exe C:\boot\vmlinuz > A:\boot.md5 3. In autoexec.bat of your boot floppy, add the following 2 lines: md5sum -vc boot.md5 if errorlevel 1 exit 4. Don't forget to write-protect your floppy again! Now, if anyone modifies the files on the harddisk, md5sum fails the check and the autoexec.bat is aborted. That's finally it! I just hope that I forgot nothing as I wrote this mostly from memory... Anyways, comments *are* welcome! Regards, Walter PS: Yes, I know this is a (bad) hack and there are better ways (that is, more configurable) to do this. However, I had to get the system up and that is what did it. You're free to do it any other way you desire! ;-) -- Walter Haidinger <wal...@gm...> For contact information or PGP/GPG public key please refer to http://haidinger.webhop.org/contact.html (See attached file: linuxrc.diff) = |
|
From: John v. V. <joh...@ya...> - 2002-05-15 19:16:50
|
Hi, not to say I told you so... but back at the bar in NYC, I think anyway, that I predicted somebody would turn DL into a typical harddrive install... All the same, the linux society crowd rebelled when I tried to creat a VFAT swap space.. insisting I set up LVM's. Maybe we should just accept the inevitable and develop a GRUB script. About hack scripts... since we are still below 1.0, it seems features are more important that appearance, cleaning up is not all that difficult. I was, however, under the impression that the 486 was orphaned for the distribution ISOs. John --- Heiko Zuerker <hz...@pr...> wrote: > > > ----- Forwarded by Heiko Zuerker/ITS/Propack Data Corporation on 05/15/2002 > 09:58 AM ----- > |---------+-----------------------------------------------> > | | "Walter Haidinger" | > | | <wal...@gm...> | > | | Sent by: | > | | dev...@li...| > | | ceforge.net | > | | | > | | | > | | 05/15/2002 06:24 AM | > | | | > |---------+-----------------------------------------------> > > >----------------------------------------------------------------------------------------------------------------------------------------------| > | > | > | To: <dev...@li...> > | > | cc: (bcc: Heiko Zuerker/ITS/Propack Data Corporation) > | > | Subject: [Devil-Linux-discuss] Hack to install onto harddisk > instead of memory (low memory solution) | > > >----------------------------------------------------------------------------------------------------------------------------------------------| > > > > > Hi! > > I've successfully installed Devil-Linux this weekend on an old machine > (486/66) with just 24 MB of RAM. I think that even 16 MB would be > sufficient. > However, in order to do that I had to make Devil-Linux boot onto a > harddisk partition instead of a ramdisk. I was forced to do this > because _both_ of my 32MB SIMMs turned out to be defective... :-( > Well, here's what I did. Perhaps it helps somebody who has a similar > problem. How about adding a docs section like "installing Devil-Linux > on machines with less than 64 MB RAM" ? > This may have been done already but I didn't search the mailing-list > archives when I did it because I had no internet access at that time. > > Anyways, here goes: > > With my setup, I used three partitions (on an old 200+ MB IDE drive): > * /dev/hda1 - DOS (C:), about 50 MB > Required because that old machine could not boot from CD-Rom and if > I have to use a harddisk anyways we can as well use it for booting too. > Please note that the floppy containing the config is still required > any may have to configure the BIOS to boot from HD first. > * /dev/hda2 - Linux SWAP, 64 MB > I have free disk space so why not extend the already limited physical > memory and set up a swap partition? > * /dev/hda3 - Linux ext2, about 100 MB > Used as subsitute for the ramdisk. I've hacked the initrd to use > this partition instead of /dev/shm (see below). > > After setting up a DOS partition to boot from (C:), I copied the > boot directory from the CD (to C:\boot). Next, I had to modify to > linuxrc script of initrd.gz. > To do this, follow these steps (under Linux): > 1. Copy the initrd.gz from the CD-Rom somewhere, e.g. > > cp /cdrom/boot/initrd.gz /tmp > 2. Unpack it > > gunzip /tmp/initrd.gz > 3. Mount the file using the loopback-device: > > mount /tmp/initrd -o rw,loop=/dev/loop0 /mnt > 4. Modify /mnt/linuxrc with your favourite editor according to the > next section below. > > your-editor /mnt/linuxrc > 5. Copy your /sbin/swapon and /sbin/mkswap files to /mnt/sbin > Make sure that the binaries run on your Devil-Linux Version. > For me, binaries from SuSE-Linux 7.3 run on Devil-Linux 0.5. > 6. Unmount again > > umount /mnt > 7. Pack the modified image > > gzip initrd > 8. Copy the new initrd.gz to the boot directory of the DOS partition > (C:\boot) > > Now for the fun part: Howto modify linuxrc > (I've modifed linuxrc v1.7 from the 0.5rc1 distribution) > > Here are the diffs in detail: > > 28a29,32 > > SWAP_PART=/dev/hda2 > > echo "Adding swapspace on $SWAP_PART" > > /sbin/swapon $SWAP_PART && print_status success || print_status failure > > > > Add the swap partition. You might add a /sbin/mkswap $SWAP_PART right > before swapon but I doubt that this is necessary. Well, of course you > need to create the swap-space _once_ ! > 31a36,43 > > DATA_PART=/dev/hda3 > > echo "Using $DATA_PART as ramdisk substitute:" > > test -d /hd || mkdir /hd > > echo -n "Creating ext2 filesystem on $DATA_PART" > > /sbin/mke2fs -q $DATA_PART print_status success || print_status failure > > echo -n "Mounting $DATA_PART" > > mount -t ext2 -o rw $DATA_PART /hd && print_status success || > > print_status failure> > > Use partition set by DATA_PART as the ramdisk substitute. > First create a mountpoint, then create the filesystem and mount it. > *** WARNING: > The partition is created _without_ question! Any previously stored > data is lost! Actually, that is a good thing as it really simulates > ramdisk behaviour and is therefore a security benefit. > Also, you can simply turn off the machine without shutting down which > is good if you have users power on/off the router without further > knowledge.However, it can be *very* disastrous if you edit your partition > table > and forget to assign the correct partition in DATA_PART. > 33,35c45,49 > < test -d /dev/shm || mkdir /dev/shm > < echo -n "Mounting SHM FS on /dev/shm" > < mount -t shm -o size=40g shmfs /dev/shm && print_status success || > print_status failure--- > > #test -d /dev/shm || mkdir /dev/shm > > #echo -n "Mounting SHM FS on /dev/shm" > > #mount -t shm -o size=40g shmfs /dev/shm && print_status success || > > print_status failure> rm -rf /dev/shm > /dev/null 2>&1 > > ln -s /hd /dev/shm > 39c53,54 > < ln -s /dev/shm /ram > --- > > #ln -s /dev/shm /ram > > ln -s /hd /ram > > Remove (comment) the shared memory stuff and replace it by symlinks. > This allows transparent usage of the partition instead of /dev/shm, > i.e. not subsequent scripts need to be modified. > > That are all changes made to linuxrc. > I've attached a context diff with the changes. > To apply it, run (replacing step 4 above) in /mnt after saving the > attachment (to, say, /tmp): > patch < ../tmp/linuxrc.diff > > *** Security warning: > If you store the boot files (kernel, initrd, ...) on the harddisk > (i.e. if you do _not_ create a CD containing the new initrd.gz), that > files _can_ be modified.Therefore, the integrity of the boot files _have_ > to be verified! > e.g.: Use MD5 hashes! > > 1. Get md5sum.exe for DOS from http://etree.org/md5com.html > and put it on your config floppy. > 2. Create md5 checksums for all files that are on the harddisk, > e.g. (write on one line): > md5sum.exe C:\boot\initrd.gz C:\boot\loadlin.exe > C:\boot\vmlinuz > A:\boot.md5 > 3. In autoexec.bat of your boot floppy, add the following 2 lines: > md5sum -vc boot.md5 > if errorlevel 1 exit > 4. Don't forget to write-protect your floppy again! > > Now, if anyone modifies the files on the harddisk, md5sum fails the > check and the autoexec.bat is aborted. > That's finally it! I just hope that I forgot nothing as I wrote this > mostly from memory... > > Anyways, comments *are* welcome! > > Regards, Walter > > PS: Yes, I know this is a (bad) hack and there are better ways > (that is, more configurable) to do this. > However, I had to get the system up and that is what did it. > You're free to do it any other way you desire! ;-) > > > -- > Walter Haidinger <wal...@gm...> > For contact information or PGP/GPG public key please refer to > http://haidinger.webhop.org/contact.html > > > (See attached file: linuxrc.diff) > > > ATTACHMENT part 2 application/octet-stream name==?iso-8859-1?Q?linuxrc.diff?= ===== John van Vlaanderen ############################################# # CXN, Inc. Contact: jo...@th... # # # Proud Sponsor of The Linux Society # # http://www.thelinuxsociety.org # ############################################# __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com |
|
From: Heiko Z. <he...@zu...> - 2002-05-15 23:20:26
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 John van V. wrote: | Hi, not to say I told you so... but back at the bar in NYC, I think anyway, | that I predicted somebody would turn DL into a typical harddrive install... true ;-) | | All the same, the linux society crowd rebelled when I tried to creat a VFAT | swap space.. insisting I set up LVM's. Maybe we should just accept the | inevitable and develop a GRUB script. Try to stick with LVM, because this is the DL standard. Everything we add, will be on top of LVM. For what do you need a grub script? | | About hack scripts... since we are still below 1.0, it seems features are more | important that appearance, cleaning up is not all that difficult. I disagree. We would faster reach a point, where a complete redesign is necessary. So try to make everything as good as possible. | | I was, however, under the impression that the 486 was orphaned for the | distribution ISOs. I don't understand what you mean - -- cu ~ Heiko We are Penguin, Resistance is futile! http://www.devil-linux.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6-2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAjzi6sEACgkQzRJAyNsjWPlb0QCfZrZCUgxiStiCkBmLOlUn+Qx6 6/wAoOVJ/2GCXWaUKV4qFymzrUUx4bst =ecKz -----END PGP SIGNATURE----- |
|
From: Friedrich L. <fl...@fl...> - 2002-05-16 00:14:04
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Heiko Zuerker wrote: | | I was, however, under the impression that the 486 was orphaned for the | | distribution ISOs. | | I don't understand what you mean Me too - sorry but my English is not that good :( - -- MfG / Regards Friedrich Lobenstock -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE84vmiwSg+Xa7mGqERAqTPAJ4mnHs1ovgL+yNulQlx1LISIABhVwCbBdvJ kneTuC0z75Rl6gkGinUGqJI= =wGwm -----END PGP SIGNATURE----- |
|
From: John v. V. <joh...@ya...> - 2002-05-16 13:07:42
|
Ok... sorry folks !! (those americans, argh!!) I thought the decision was made to turn on 586 optimization for DL based on the sourceforge polling. Thats all. John --- Friedrich Lobenstock <fl...@fl...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Heiko Zuerker wrote: > | | I was, however, under the impression that the 486 was orphaned for the > | | distribution ISOs. > | > | I don't understand what you mean > > Me too - sorry but my English is not that good :( > > - -- > MfG / Regards > Friedrich Lobenstock > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQE84vmiwSg+Xa7mGqERAqTPAJ4mnHs1ovgL+yNulQlx1LISIABhVwCbBdvJ > kneTuC0z75Rl6gkGinUGqJI= > =wGwm > -----END PGP SIGNATURE----- > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Devil-linux-develop mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/devil-linux-develop ===== John van Vlaanderen ############################################# # CXN, Inc. Contact: jo...@th... # # # Proud Sponsor of The Linux Society # # http://www.thelinuxsociety.org # ############################################# __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com |