|
|
|
| InitRD Howto Examples |
Linux-Boot.net/Bootable/InitRD initrd, loopfs, linuxrc scripts
- initrd.gz is NOT required to boot if the kernel has everything it needs
- initrd.gz is required for running linux in memory ( /dev/ram or /dev/loop )
- vi /etc/lilo.conf
image = /boot/vmlinuz-2.4.27
initrd = /boot/initrd.gz
- You will need to Cleanup ( rdev ) the kernel for booting into memory
- During LILO boot
lilo: root=/dev/ram0 rw init=/linuxrc
- Minium InitRD to mount and run linux in memory ( /dev/loop )
TLDP.org LoopBack-RootFS HOWTO
/linuxrc
/proc
/dev/tty0
/bin/mount
/sbin/chroot
/lib/...
/etc/...
/mnt/hda1
/usr
- Minimum /linuxrc to mount and run linux in memory ( /dev/loop )
TLDP.org LoopBack-RootFS HOWTO
#!/bin/sash
#
# no support for debugging, checking, changes, etc
mount /dev/hda1 /mnt/hda1
#
# rootfs is a preformated rootfs to run in memory ( /dev/loop )
# /dev, /bin, /etc /lib, /sbin, /proc, ...
chroot /mnt/hda1/rootfs /
#
# End of /linuxrc
- Minimum rootFS to run linux in memory ( /dev/loop )
|
| InitRD Docs |
- /usr/src/linux-2.4.xx/Documentation/initrd.txt
- New Pivot-Root mechanism
- lilo# boot into ramdisk
- ramdisk# sh /linuxrc ^ which includes
cd /new-root
mkdir /initrd
pivot_root . /initrd
#
# old initrd stuff disappears after chroot
exec chroot . /new-root dev/console 2>&1
#
# free the ramdisk memory
- real-root# umount /initrd
- real-root# blockdev --flushbufs /dev/ram0
- Do NOT use Old Change_Root mechanism if /proc is mounted
- echo 0x301 >/proc/sys/kernel/real-root-dev
- change_root xxx yyy ???
- /usr/src/linux-2.4.xx/Documentation/ramdisk.txt ( circa 1995 )
- ramdisk_start, load_ramdisk, prompt_ramdisk, ramdisk_size
- rdev options
- /usr/doc/mkinitrd-1.0.1
- /usr/share/mkinitrd/*.tgz
- man initrd
Lists.Debian.Org micro-initrd Flash howto
OpenNet.ru Kernel-Howto - Creating initrd.img file
Ibiblio.org BootDisk-HOWTO
TLDP.org BootDisk-Howto
TLDP.org LFSH /initrd
|
| Read-Only Considerations |
|
| Minimizing the InitRD |
- Copy only the required files one at a time
- Remove debugging symbols from the libs and binaries
|
| InitRD - LoopFS Howto |
|
| Distro InitRD |
|
| InitRD Usage |
- Simple /linuxrc Examples
- InitRD + Diskless Boot
- InitRD + NFS
- /usr/src/linux-2.4.xx/Documentation/nfsroot.txt
- nfs_root_name and nfs_root_addrs
Lists.Debian.org debian-beowul
Cern.ch dhcp - diskless
Cern.ch dhcp - diskless
- InitRD + NetBoot
- InitRD + CompactFlash
- InitRD + USB
- InitRD + CDROM
- InitRD + Floppy
- InitRD + ARM
- InitRD + PPC
- InitRD + Luster
- InitRD + ipaq
- InitRD + romfs
|
|
|