If you want to customize a distribution to boot only on your particular computer you should be able to modify the initrd and rootfs files.

An initial ramdisk is a temporary file system used in the boot process of the Linux kernel. initrd and initramfs refer to slightly different schemes for loading this file system into memory. Both are commonly used to make preparations before the real root file system can be mounted.


The bootloader will load the kernel and initial root file system image into memory and then start the kernel, passing in the memory address of the image. At the end of its boot sequence, the kernel tries to determine the format of the image from its first few blocks of data:

In the initrd scheme, the image may be a file system image (optionally compressed), which is made available in a special block device (/dev/ram) that is then mounted as the initial root file system. The driver for that file system must be compiled statically into the kernel. Many distributions originally used compressed ext2 file system images. Others (including Debian 3.1) used cramfs in order to boot on memory-limited systems, since the cramfs image can be mounted in-place without requiring extra space for decompression.

Once the initial root file system is up, the kernel executes /linuxrc as its first process. When it exits, the kernel assumes that the real root file system has been mounted and executes "/sbin/init" to begin the normal user-space boot process.



Some Linux distributions will generate a customized initrd image which contains only whatever is necessary to boot some particular computer, such as ATA, SCSI and filesystem kernel modules. These typically embed the location and type of the root file system.


You can use the following tool to manipulate the initrd.gz image (I used this tool also with the rootfs filesystem and I can say it works fine)



ps_initrd.sh, initrd manipulation tool and more


ps_initrd.sh allows you to manage contents of your initrd and
different filesystem images like cramfssquashfs easily.

Usual ps_initrd.sh workflow consists of the following steps:

  • backup original initrd as initrd.orig (you can use it by manually
    modifying grub options if you break the working version)
  • unpack initrd with ps_initrd.sh IMAGE_NAME open command
  • add/modify files in created initrd-* and modules-* directories
  • pack new initrd with ps_initrd.sh IMAGE_NAME close command
    (if depmod is available — it refreshes modules.*map files)

You can use ps_initrd.sh IMAGE_NAME cancel to delete unpacked
initrd-* and modules-* directories without (honestly!) updating original image.


You can find full info and source for this tool here.