[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RE[2]: Booting Linux using AHA2940UW (no IDE), with aic7xxx as modu
On Sun, 29 Nov 1998, Evgeny Stambulchik wrote:
>
> So I repeat my question again: where does the file system (its contents, in
> particular, the SCSI module) on the RAM disk come from?!
>
Disclaimer: I have not looked into the technical details of how it works
(but as I recall the LDP has a document called the "LILO Technical
Overview" in addition to the "LILO Users Guide").
Lilo STARTS to boot a kernel (aka _bootstraps_) from any (including SCSI)
disk BEFORE the kernel itself is in memory. So in the same way LILO can
access the kernel image from the disk it can access the initial ramdisk
(such as the "initrd" created by mkinitrd) if the file's location is
"known" to lilo in advance. Once the initrd is loaded into memory - it
serves as what it's called an "initial ramdisk" - i.e. a temporary root
directory to help the kernel pull up it's pants (well it finished with the
boots by now :). A "ls -R" look at one on my systems shows (see below)
that not much is there besides the modules needed and insmod (and also a
script - below - and a shell to do the actual loading).
Tani
NOTE: The initrd image (at least on RH 5.2) is gzip-ed. It took me a few
minutes to discover this in order to mount it and look it over. In any
case - it's not hard to take a look at it. /sbin/mkinitrd (a bash script
on RH 5.2) was quite helpful in discovering what was involved.
INSTRUCTION for the unintiated listeners who dare to dabble a bit. Try:
1. cp <initrd_file> /tmp/initrd.gz
2. gunzip /tmp/initrd.gz
3. mount -t ext2 /tmp/initrd <some_mount_point> -o loop
-------------------------------------------------------------------------
bin dev etc lib linuxrc
/mnt/cdrom/bin:
insmod sh
/mnt/cdrom/dev:
console null ram systty tty1 tty2 tty3 tty4
/mnt/cdrom/etc:
/mnt/cdrom/lib:
aha1542.o
-------------------------------------------------------------------------
#!/bin/sh # /linuxrc in the initrd
echo "Loading aha1542 module"
insmod /lib/aha1542.o
--------------------------------------------------------------------------