http://www.Linux-Boot.net


Linux-Boot.net

BIOS
CPU Arch

MBR
Boot Stages
Boot Squence
Boot Errors

Booting
Boot-Loaders
SysLinux
Grub
Lilo


RootFS-HOWTO
RootFS-Config
RootFS-HOWTO


InitRD-HOWTO
InitRD
InitRD-Config
InitRD-HOWTO

Creating initrd.gz
RamDisk
Loop

Viewing initrd.gz


Obsolete
initrd/rootfs Scripts

Old Scripts


initrd HOWTO Scripts
rootfs HOWTO Scripts
( Bootable CF, USB, FD, CD )
Standalone Boot
/boot
InitRD
RootFS
Patches


Boot Media
CD-Boot
Floppy-Boot
USB-Boot
Compact-Flash-Boot
Network-Boot
DOS


Chroot


Forgot Root PassWord


CDRW HOWTO



1U Rackmount Chassis

Custom-Chassis.com

Linux-1U.net

1U-ITX.net


ITX-Blades.net


Small PC cases

Mini-Box.net

Wrap-Box.net

Wrap-OS.net


Wan-Sim.net



Linux-Consulting.com

Linux-CAE.net

Linux-Sec.net

Linux-Boot.net

Linux-Backup.net

Linux-Wireless.org

Linux-Office.net

Linux-Video.net

Linux-VOIP.net

Linux-Jobs.net

Linux-Diff.net

1U-Raid5.net

Linux-Howto.net


Spam Reporting



Free Linux CDs

ISO9660.org

Distro-CD.org

Patch-CD.org




Contact



Linux is a registered trademark of
Linus Torvalds

More Linux Legalese


Creating a RamDisks

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
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


Copyright © 2000
Linux-Consulting
All Rights Reserved.
Updated: Mon Aug 22 15:37:09 2005 PDT