[ale] Shutdown process
Byron A Jeff
byron at cc.gatech.edu
Wed Jan 3 11:07:41 EST 2001
> Cool.
>
> So put only small neeed parts into the secod ramdisk.
Correct. In fact be careful of the fact that standard Linux ramdisks are
max sized at 4MB and require a kernel parameter to have a larger size.
>
> I have a rootdisk because of modules.
So you're already halfway there.
>
> How can I load the secodn ramdisk as /. What is the command I'll nee to
> issue in /linuxrc?
First you build a FS image. I usually do this using a loopback device. Be
careful about the number of inodes, because with small filesystem you can
run out of inodes especially with devices. Generally I copy a full blown
/dev directory into a tmp spot, cull all of the thousands of unused
device entries (SCSI, extra IDE devices, extra tty and pttys), then copy
the remainder into the filesystem. Also remember to put an /initrd directory
to hook the initial ramdisk because it'll have the HD FS mounted on it.
The part I still haven't figured out is the few files in /etc such as /etc/mtab
that require RW access. I tried using soft links but they didn't work very
well. In my next try I plan to load all of /etc into the ramdisk.
Again I point your sash (i'm using the 3.4 version) because it's a shell
with busybox functionality because it has a couple of dozen useful commands
built into it and it's statically compiled so it requires no libraries.
Some of the useful commands it has is gzip and mount. We can use them here.
Once you've built the loopback FS image, you can compress it and stick it
on your HD somewhere.
The linuxrc does the following:
#mount the hd RO
#gunzip the FS image into the ramdisk (I used /dev/ram7)
That's it. Just make sure in LILO you set the root to /dev/ram7 so that
after linuxrc quits it'll move to the new root.
There are still a couple of more caveats like the fact I have to
hach sash to run scripts and the /etc issue, but for the most part this
is the gameplan.
I don't think I have current images except for on the MP3 player itself.
If I get a chance today I'll pull it out the car and get those images for you.
>
> Then I just mount /usr as the DOC2000 and RO.
You still need the original root FS mounted RO and links from the ramdisk FS
into it for the applications and config files. But this is the general idea.
BAJ
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list