Differences between revisions 8 and 9
Revision 8 as of 2007-07-01 23:22:34
Size: 1314
Editor: ?maximilianattems
Comment: debug addition
Revision 9 as of 2007-07-03 10:50:53
Size: 1925
Editor: ?maximilianattems
Comment: add initramfs content diff
Deletions are marked like this. Additions are marked like this.
Line 46: Line 46:
 FIXME: add find cmd  cd ~/tmp
 mkdir initramfs{,-old}
 cd initramfs
 gunzip -c -9 /boot/initrd.img-2.6.22-rc6-686 \
  | cpio -i -d -H newc --no-absolute-filenames
 find > ../initramfs.content
 cd ../initramfs-old
 gunzip -c -9 /boot/initrd.img-2.6.22-rc6-686.bak \
  | cpio -i -d -H newc --no-absolute-filenames
 find > ../initramfs-old.content
 cd ..
 diff -u initramfs-old.content initramfs.content
Line 48: Line 59:
 If the intiramfs creation of both those images went well there should be no diff. If you are comparing initramfs for different kernels you should see a difference in the modules aka other dir and newer drivers in /lib/modules/$(uname -r)

?wiki:initramfs-tools is used in Debian to build the initramfs that contains the early userspace and the needed kernel modules to be able to mount any possible root.

Boot

Boot with rootdelay=9 to shorten the time of waiting for the root device to come up. Also it adds time to scsi device to settle before calling mdadm or lvm thus excluding potential races.

Rescue shell

Ok now you landed in the initramfs debug shell. The following steps should help to narrow down the problem.

  • Check root device existance
     ls -l /dev/[hs]da*
  • Check root boot argument
    • It needs to be the same than aboves root device
     cat /proc/cmdline
  • Check correct fs recognition
     /lib/udev/vol_id -t /dev/sda1
     fstype /dev/sda1
    • If the output of aboves command differ, your partition was not cleanly formated. For example mkfs.ext2 does not clear all sectors when formating a partition.
  • Check if the ata/ide/scsi driver is loaded
     cat /proc/modules

initramfs content

It can happen that due to a bug in the initramfs creation a newer initramfs lacks important libraries or utilities. Easiest way is to compare the file list of working contra non-working initramfs.

  •  cd ~/tmp
     mkdir initramfs{,-old}
     cd initramfs
     gunzip -c -9 /boot/initrd.img-2.6.22-rc6-686 \
      | cpio -i -d -H newc --no-absolute-filenames
     find > ../initramfs.content
     cd ../initramfs-old
     gunzip -c -9 /boot/initrd.img-2.6.22-rc6-686.bak \
      | cpio -i -d -H newc --no-absolute-filenames
     find > ../initramfs-old.content
     cd ..
     diff -u initramfs-old.content initramfs.content
    If the intiramfs creation of both those images went well there should be no diff. If you are comparing initramfs for different kernels you should see a difference in the modules aka other dir and newer drivers in /lib/modules/$(uname -r)