Deker's picture

Hi all,

 

 Running TurnKey Repository in a VMWare vCloud environment. I have extended the LVM and expanded the root fs to add some more disk. All of that went according to plan and everything was running fine. After an 'apt-get update' and 'apt-get upgrade', the VM refuses to boot and drops into busybox in the initramfs environment. The error provided is (paraphrased):

ALERT! /dev/disk/by-uuid/<UUID> does not exist.

I fired up lvm from the initramfs and was pleased to see that my disk devices aren't indeed gone or damaged:

(initramfs) lvm
lvm> pvscan
  PV /dev/sda2   VG turnkey   lvm2 [18.14GiB / 0   free]
  PV /dev/sdb    VG turnkey   lvm2 [64.00 GiB / 0  free]
  Total: 2 [82.14 GiB] / in use: 2 [82.14 GiB] in no VG: 0 [0   ]
lvm> vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "turnkey" using metadata type lvm2
lvm> lvscan
  inactive        '/dev/turnkey/root' [81.64 GiB] inherit
  inactive        '/dev/turnkey/swap_1' [512.00 MiB] inherit

After a quick 'lvchange -ay /dev/turnkey/root' and 'lvchange -ay /dev/turnket/swap_1' I was able to exit the initramfs and the machine booted fine.

My first thought was that something went wrong with regenerating the initramfs during the upgrade, so I re-ran update-initramfs and it completed (though complained about some casper scripts which seem to not be a problem per some google search results). Still didn't want to boot without human intervention. I figured I'd try a symlinking of /usr/share/initramfs-tools/scripts/ to /scripts which seemed to make things happier when update-initramfs was run. Still no luck on a reboot though.

The problem is clearly something with lvm/device mapper in the initramfs, but I thought it best to see if anybody else had seen/solved this before me rather than keep digging where I may be duplicating somebody else's effort.

Any thoughts or ideas for me?

Forum: 
Tom's picture

This seems to have happened a while after an lvextend, which went fine (including reboots).

After a wild goose chase regarding incorrect UUID's, update-grub, grub-install,  mkdevicemap ... it turned out to be fixed by this.

Many thanks for posting and sharing this.


Add new comment