|
| Creating a RamDisks |
- Create the RamDisk with either method
- Copy the desired contents into the ram disk
- gzip the ramdisk to create the /boot/initrd.gz file
- Release the ramdisk memory back to the system
|
| Creating InitRD Howto Examples |
|
| Addtional RamDisk software |
- cramfs == compressed read-only filesystem
- ramfs == rw filesystem ideal for use in a ramdisk as /tmp and /var
- JJFS == Journaling Flash FileSystem
- FreeRamDisk free the memory after creating the ramdisk
ffm.fega.de initrd example, freeramdisk
-- or --
- blockdev --flushbufs /dev/ram0
- Change into the real rootFS from the temporary ramdisk
- for each binary in the initrd.gz file, you will need its associated libraries
- ldd /bin/mount
- ldd /bin/bash
- You will need a shell to load the real rootfs from inside the initrd fs
- Minimize the size of your ramdisk
|
| InitRD for Creating a LiveCD |
|
| Creating InitRD |
- You have to create the initrd tree
- You have to copy files into the initrd tree
- Linux-Boot.net/InitRD/Howto
- uses /dev/ram0 to run the rootf in /dev/loop0
- BusyBox
- create_ramdisk
- mkinitrd
- Make.RD.Loop.sh
- Create InitRD File by File
|
| mkinitrd - making an initrd.gz file |
- initrd.gz is the same as initrd.img
- sometimes its compressed, sometimes not
- slackware/slackware_source/a/mkinitrd
Slackware.at
# linux-2.6.7 w/ reiserfs
- mkinitrd -c -k 2.6.7 -m reiserfs
#
# linux-2.6.7 w/ ext2 on /dev/hdb3
- mkinitrd -c -k 2.6.7 -m jbd:ext3 -f ext3 -r /dev/hdb3
- To Create a simplified initrd-2.4.x.img.gz modules files
- mkinitrd -f [ --with=loop ] initrd-2.4.x.img.gz `uname -r`
- cp -p initrd-2.4.x.img.gz /boot
- update lilo or grub to use the new *.img.gz
- To View the above initrd-2.4.x.img.gz files
- gzip -d initrd-2.4.x.img.gz
- mount -o loop initrd-2.4.x.img /mnt/loop
- ls -laR /mnt/loop
|