[ale] Shutdown process

Chris Fowler ChrisF at computone.com
Fri Jan 5 15:21:30 EST 2001





I think I have it.  I'm beginning to work on this now.


If my RO FS has the following:


/sbin
/usr
/etc
/lost+found


and the ram image has


/dev
/usr
/usr3
/tmp


wil the / look like this after the kernel mounts /dev/ram7 as /


/dev
/usr
/usr3
/tmp
/sbin
/usr
/etc
/lost+found



My RO fs is not a image, it is actually part of a chip.


Thanks,
Chris
-----Original Message-----
From: byron at cc.gatech.edu [mailto:byron at cc.gatech.edu]
To: ale at ale.org
Sent: Wednesday, January 03, 2001 11:42 AM
To: ChrisF at computone.com
Cc: ale at ale.org
Subject: Re: [ale] Shutdown process



> I've read you email and understand but have one question.
> 
> if your script does this:
> 
> mount /dev/fla1 /usr -n -o ro
> gzip -cd ramdisk.gz > /dev/ram7
> mount /dev/ram7 to [WHAT]


It doesn't do the last command. That's the beauty of the initial ramdisk. it'll
automatically change the root device to the target specified as the root
parameter on the LILO argument line.


> 
> Can I remount on to /
> or do I need
> to do this
> 
> mkdir /system
> mount /dev/ram7 /system
> mount /dev/fla1 /system/usr
> chroot /system /system/sash 


Neither. Happens automatically. Take a read of Documentation/initrd.txt in
any /usr/src/linux kernel source for details.


> 
> My question is that if I already have a /
> how does /dev/ram7 become that /?


The kernel switches root from the initial ramdisk to the target root. I've used
this for mounting loopback filesystems as root too. Quite useful.


BAJ







More information about the Ale mailing list