Ubuntu: ...udev is unconfigured

My friend learned that rebooting computer while upgrades are being installed is not a smart idea, and I’ve learned what to do when Ubuntu hangs on boot with message:

udevadm trigger is not permitted while udev is unconfigured

The solution is fairly simple, just insert CD/USB with Ubuntu installer and select Recover... from the menu. Follow the steps and on final step select the partition on which Ubuntu in installed, in my case that was sda1, select that you want to open shell and then enter following commands:

To find your latest kenel, for example 2.6.32-24-generic:

$ ls /boot

And then:

# update-initramfs -u -k 2.6.32-24-generic

Finally pres CTRL+D and select reboot from the menu.

Alternatively, if you’re able to get root console working, or if you can’t find the Recover option in menu, you can do the following steps:

# fdisk -l                       // To find your boot disk, e.g. /dev/sda1.
# mkdir /media/newroot
# mount /dev/sda1 /media/newroot // sda1 is your boot disk.
# chroot /media/newroot

Then follow the steps written above.