User Tools

Site Tools


docs:geninitrd

geninitrd

Initial ramdisk used mostly only to mount root filesystem.

Generation

Check available kernels (Example: section):

# geninitrd 

Regenerate (adding -v to see details) as suggested in above examples:

/sbin/geninitrd -f --initrdfs=initramfs /boot/initrd-KERVER.gz KERVER

Debbugging

Getting shell just after initrd boot ends/fails: Edit /etc/sysconfig/system , set:

RUN_SULOGIN_ON_ERR=no

Add

debugrd=sh 

to kernel boot options (by editing /boot/grub/grub.cfg or adding to GRUB_CMDLINE_LINUX_DEFAULT in /etc/sysconfig/grub and running update-grub)

Reboot. HINT: CTRL+PgUp/PgDown scrolls initrd logs.

Checking generated initrd image

Uncompressing initrd, copy first, ungzip, uncpio:

cp /boot/initrd.*.gz  /root/geninitrd
gunzip  initrd-4.1.15-1.gz
cpio -idmv < initrd-4.1.15-1

or have lesspipe, file installed and use less:

# less /boot/initrd-2.6.38.8-1.gz
docs/geninitrd.txt · Last modified: 2016-08-22 16:04 by glen

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS PLD Linux Driven by DokuWiki