Tuesday, March 17, 2009

interactive debugging /boot/initrd.img

Sometimes, it is handy to figure out what is going wrong in your initrd file.  This can be tricky, as it’s a single script that if it’s breaking, usually results in a kernel panic.  I needed to figure out today why the call to mdadm to assemble the raid was not working, so I could add something of value to bug #48844.  To debug an initrd.img, here is what I do:

  • Boot rescue mode from a Mandriva CD.
  • Go to the console, mount your /boot partition into /mnt, unpack your initrd
mount /dev/sda1 /mnt
mkdir /mnt/initrd ; cd /mnt/initrd
cat ../initrd.img | gzip -d | cpio -i
  • copy in bash and necessary libraries to run a shell
cp /lib/* lib/
cp /bin/* bin/
cp /lib64/* lib64/
  • edit init and add in /bin/bash at the point you would like a shell
  • rebuild your new initrd
find . | cpio -H newc -o | gzip -9 > ../initrd-new.img
  • edit ../grub/menu.1st to use your the new initrd-new.img file.  Also turn off graphical boot.
  • umount /mnt
  • reboot

If you want to run some of the actions in /init from the command line manually, they are nash builtin’s, so cannot be run directly from bash.  I run them by creating an file with vi containing

#!/bin/nash
mkblkdevs

then running the file.

Sunday, March 15, 2009

Bug reporting and patching for 2009.1

I am trying to help make Mandriva 2009.1 one of the best ever Mandriva releases, however I am having a little bit of a frustrating time getting responses from the Mandriva cooker team.

I have to say that most of 2009.1 looks fantastic, great work with the msec changes, KDE 4.2 and a bunch of other really nice touches.  I love the wallpaper!

I know everyone is busy working on 2009.1, but getting no response when I send patches  to package maintainers is a bit disheartening, especially when I would like to see the patches get into 2009.1.  Likewise, bugs that I logged, even some bugs that I logged back for 2009.0 have not been updated, they just still sit there, usually triaged as valid, but no action or updates, yet they are not the kind of just cosmetic bug, they are a feature is unusable bug!

I wonder what I can do to help, when by the looks of things, supplying patches that fix valid bugs, and logging bugs, sometimes just gets no response.   I do get a response sometimes, so don’t take this the wrong way.  I just want to get some bugs fixed.  Bugs that would be easy to fix and are visible to users are not look good I think.   I currently have 8 bugs logged, 6 of which have patches or solutions in the bug report, just not applied.

Tonight I’ve been doing a few tests on Mandriva 2009.1 RC1, x86_64 inside vmware and logging / voting on bugs where things in the installer don’t work. Mostly around encryption.