Skip to Content.
Sympa Menu

baslinux - Re: [BL] Loop BL3 uses a RAMDISK ?

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: 3aoo-cvfd AT dea.spamcon.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] Loop BL3 uses a RAMDISK ?
  • Date: Wed, 12 Jan 2005 11:20:37 +1300

sindi keesan wrote:
>
> > Yes, the loop version of BL3 has a small ramdisk
> > (to anchor the loop file). IIRC it is less than 100kb.
>
> My partner wants to know more about this ramdisk.

In order to use a loop file as the root filesystem,
you must first mount the partition where the loop
file resides. fs.img (the BL3 loop file) resides
in the baslin directory on a DOS partition. So
you need to mount the DOS partition and then mount
/baslin/fs.img. This is done by a tiny filesystem
running in a ramdisk.

Have a look at boot.bat
--------------------------------------------------
loadlin zimage root=/dev/loop0 initrd=initfs.gz rw
--------------------------------------------------
It tells the kernel to unzip initfs.gz to a ramdisk
and run it. initfs is a small filesystem (containing
a shell and a few necessary utilities/devices). It
automatically runs a script to mount the loop file
at /dev/loop0. The kernel then uses it as the root
filesystem (root=/dev/loop0).

Once the kernel is running on /dev/loop, the shell/
devices/utilities in initfs are redundant. However,
it is not possible to un-mount the ramdisk. The
ramdisk still contains the mountpoint for the DOS
partition. You can't kill the ramdisk without killing
access to fs.img

> can he look at it?

Yes, the ramdisk is still mounted (at /initrd). You
will find the executables in /initrd/bin and the devices
in /initrd/dev. The script for mounting /dev/loop is
/initrd/linuxrc.

Cheers,
Steven

____________________________
http://www.basiclinux.com.ru




Archive powered by MHonArc 2.6.24.

Top of Page