Wednesday, 29 September 2010

Solving "udevadm trigger is not permitted while udev is unconfigured"

After updating a server recently I was presented with the following error after attempting to reboot;

udevadm trigger is not permitted while udev is unconfigured

To fix this we need to do something similar to one of my previous entries on Centos

Boot up a desktop LiveCD and perform the following steps from within a console;

Determine your boot disk, it will usually be /dev/sda1;

sudo fdisk -l

This will produce output like this;

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d730c

Device Boot Start End Blocks Id System
/dev/sda1 * 1 994 7977984 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 994 1045 407553 5 Extended
/dev/sda5 994 1045 407552 82 Linux swap / Solaris


The device with the * is the boot disk.

Create a folder in the "ubuntu" users home;

mkdir tmproot

Mount the disk to that folder (change the boot device if yours is not /dev/sda1);

sudo mount /dev/sda1 /home/ubuntu/tmproot

Chroot the mounted disk;

sudo chroot /home/ubuntu/tmproot

Finding the latest installed version of the kernel.

ls /boot

This will produce output like this;

abi-2.6.32-21-generic-pae memtest86+.bin
abi-2.6.32-24-generic-pae System.map-2.6.32-21-generic-pae
System.map-2.6.32-22-generic-pae config-2.6.32-21-generic-pae
System.map-2.6.32-24-generic-pae config-2.6.32-22-generic-pae
config-2.6.32-24-generic-pae vmcoreinfo-2.6.32-21-generic-pae
vmcoreinfo-2.6.32-24-generic-pae grub
initrd.img-2.6.32-21-generic-pae vmlinuz-2.6.32-21-generic-pae
initrd.img-2.6.32-22-generic-pae vmlinuz-2.6.32-22-generic-pae
initrd.img-2.6.32-24-generic-pae vmlinuz-2.6.32-24-generic-pae


Your latest kernel is the one with the highest version number. In my case it is 2.6.32-24-generic-pae

Update initramfs to load the latest kernel;

sudo update-initramfs -u -k 2.6.32-24-generic-pae

There will likely be an error "unable to resolve hostname ubuntu" and a few errors about /proc/mount not existing. These can be safely ignored.

Reboot the system and all should now be good!

9 comments:

Anonymous said...

Thanks a lot, worked for me.
(Really gotta be more known with linux systems >.<)

Ganesh Kumar said...

It worked for me too as the instructions were simple, precise and easy to follow.Thanks and keep up the good work.
gknt13@gmail.com

GIN said...

It's a miracle! Thanks!

Luke Fahmy said...

I got this error....
failed to run command ‘/bin/bash’: No such file or directory
what should i do

Luke Fahmy said...

failed to run command ‘/bin/bash’: No such file or directory

i got that message... what do i do

Luke Fahmy said...

failed to run command ‘/bin/bash’: No such file or directory

i got this error message...what do i do

Brett said...

Hi Luke, it is hard to tell what the problem is when you don't actually say what command you used to produce that error.

Luke Fahmy said...

It was after I typed this "sudo chroot /home/ubuntu/tmproot"

Φίλιππος said...

Hi, I am going through the same issue. And I get "failed to run command ‘/bin/bash’: No such file or directory" after I type the "sudo chroot /home/ubuntu/tmproot" command.

Thaks in advance for your help