openSUSE:Bugreport mkinitrd

Jump to: navigation, search

Reporting mkinitrd bugs

The mkinitrd script generates the initrd image that is loaded by the bootloader and executed by the kernel during boot. Its main objective is to mount the root filesystem and start init.

Mkinitrd Packages

Since 11.1 / SLE11, mkinitrd consists of the main /sbin/mkinitrd script and several scriptlets below /lib/mkinitrd/scripts. The setup-*.sh scripts are executed in the running system when creating the image, the boot-*.sh are copied to the image and executed during boot. The important thing is that not all these scripts are installed by the mkinitrd package. Use

rpm -qf /lib/mkinitrd/scripts/<scriptname>

to find out which package to report bugs against. Also note that the initrd used during installation (called inst-sys or linuxrc) is a totally independent thing and has nothing to do with mkinitrd. It is built as part of the installation-images package. IMPORTANT: The above also implies, that in order to check whether a bug is fixed by a maintenance update or a new Factory package, it is important to update all packages that install files into /lib/mkinitrd/scripts. The following command will output a list of packages to update to their latest version before reporting a bug:

rpm -qf --qf '%{n}\n'  /lib/mkinitrd/scripts/* | sort -u

In short, not every mkinitrd bug is a bug in the mkinitrd package.

Logs

We always need the log of the mkinitrd run produced by

bash -vx /sbin/mkinitrd &>mkinitrd-log.txt

If your system does not boot, boot the rescue system from the DVD and run (copied from the RECOVERY section of man mkinitrd):

mount --bind /dev /mnt/dev
chroot /mnt
mount /proc
mount /sys
bash -vx /sbin/mkinitrd &>/root/mkinitrd-log.txt
exit

In this case, the log will be located in /mnt/root/mkinitrd-log.txt. Sometimes, we also need the boot log produced by linuxrc=trace. The easies way to capture it is to connect another computer with a null modem, run

screen -L /dev/ttyS0 115200

on the second computer and boot the computer that has the bug with

console=ttyS0 console=tty0 linuxrc=trace

After booting the machine, type Ctrl-A, Ctrl-\ in the screen window and attach the screenlog.0 file.