Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 41

Thread: Boot fails LVM encryption

  1. #21
    Join Date
    Jun 2005
    Location
    /world/OldEurope
    Beans
    184
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Boot fails LVM encryption

    I gave this another shot and installed boot-repair in the running system. Using the default settings, ignoring Raid and encryption messages (all LVM partitions were already mounted and decrypted), I unfortunately got an error message in the end.

    Here is the new boot info: http://paste.ubuntu.com/5632309/

    Isn't there anybody who can help me out?

  2. #22
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,593
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Boot fails LVM encryption

    Unfortunately I have no experience with encryption at all. Not sure if that can interfere and how.

    So, in this latest situation, what error do you actually get? What happens when you boot?

    The boot info looks correct to me.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  3. #23
    Join Date
    Jun 2005
    Location
    /world/OldEurope
    Beans
    184
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Boot fails LVM encryption

    I'm too afraid to boot given that boot info script output mentions "Mounting failed", "unknown filesystem type" for my LV partitions, and further on:
    Code:
    mount: unknown filesystem type 'crypto_LUKS'
    mount /dev/sda2 -> Error code 32
    Disk /dev/mapper/sda2_crypt doesn't contain a valid partition table
    Disk /dev/mapper/vg01-root doesn't contain a valid partition table
    Disk /dev/mapper/vg01-usr doesn't contain a valid partition table
    Disk /dev/mapper/vg01-var doesn't contain a valid partition table
    Disk /dev/mapper/vg01-tmp doesn't contain a valid partition table
    Disk /dev/mapper/vg01-home doesn't contain a valid partition table
    Disk /dev/mapper/vg01-swap doesn't contain a valid partition table
    It also seems that "/boot" is now inside the encrypted LV "vg01-root" whereas it used to be on an unencrypted separate partition before.

    Boot-Repair ended with a pop-up displaying some general error message.

  4. #24
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,593
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Boot fails LVM encryption

    Well, if you don't have faith in boot-repair, do it manually. First decrypt the encryption, and after that you could use it as non-encrypted system.

    Try rebooting but have the live cd at hand if it fails to boot. If it fails to boot you will boot the machine in live mode and try installing grub2 manually.

    Don't worry about those partition table messages, they are normal when using LVM. It tries to check for partition tables on all LVs and of course there is no partition table there because it's only a LV not a physical disk with partitions on it.
    I'm not sure about the mount problems, if that is related to boot-repair or not.

    I would try booting and if it doesn't then try to sort it out. If it boots as it is, you have nothing to solve, right?
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  5. #25
    Join Date
    Jun 2005
    Location
    /world/OldEurope
    Beans
    184
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Boot fails LVM encryption

    It just seems strange to me and I have gone through the process of clearing CMOS already a couple of times. Still not sure why this was always necessary - the keyboard was not recognized, neither USB nor PS/2, I even couldn't enter the UEFI setup. I'm also wondering where the kernel has gone now:
    Code:
    $ ls -la /boot/
    total 20
    drwxr-xr-x  3 root root  4096 Mar 20 21:39 .
    drwxr-xr-x 26 root root  4096 Mar 20 21:31 ..
    drwxr-xr-x  3 root root 12288 Mar 20 21:39 grub
    $ sudo mkdir /mnt/boot
    $ sudo mount /dev/sda1 /mnt/boot
    $ ls -la /mnt/boot
    total 31565
    drwxr-xr-x 6 root root    1024 Mar 20 21:36 .
    drwxr-xr-x 6 root root    4096 Mar 21 18:42 ..
    -rw-r--r-- 1 root root  791281 Jul 27  2012 abi-3.2.0-29-generic
    -rw-r--r-- 1 root root  792830 Feb 19 13:58 abi-3.2.0-38-generic
    -rw-r--r-- 1 root root  140432 Jul 27  2012 config-3.2.0-29-generic
    -rw-r--r-- 1 root root  140488 Feb 19 13:58 config-3.2.0-38-generic
    drwxr-xr-x 3 root root    7168 Mar 20 21:37 grub
    drwxr-xr-x 2 root root    7168 Mar 20 21:35 grub.bak
    -rw-r--r-- 1 root root 8817030 Feb 27 23:35 initrd.img-3.2.0-29-generic
    -rw------- 1 root root 5896152 Mar 20 21:10 initrd.img-3.2.0-38-generic
    drwx------ 2 root root   12288 Feb 26 15:20 lost+found
    -rw------- 1 root root 2882108 Jul 27  2012 System.map-3.2.0-29-generic
    -rw------- 1 root root 2887333 Feb 19 13:58 System.map-3.2.0-38-generic
    -rw------- 1 root root 4960752 Jul 27  2012 vmlinuz-3.2.0-29-generic
    -rw------- 1 root root 4968592 Feb 19 13:58 vmlinuz-3.2.0-38-generic
    As I wrote before, "/boot" is now inside the LV "/dev/vg01/root" while it used to be on the separate partition sda1. I have no idea how to revert that.

  6. #26
    Join Date
    Jun 2005
    Location
    /world/OldEurope
    Beans
    184
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Boot fails LVM encryption

    Running Boot-Repair again, in the stage where grub-pc is configured, I no longer have the option to install either to sda or to sda1, but only to sda or /dev/dm-1 (vg01-root). If I choose sda, it fails ("GRUB failed to install to the following devices"). I don't want to have /boot in my encrypted root LV, this will probably cause even more trouble.

    Thanks for the help so far, you two!
    Last edited by elektronaut; March 21st, 2013 at 09:55 PM.

  7. #27
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,593
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Boot fails LVM encryption

    I don't think boot is inside the root LV. In your post above, you can clearly see the kernels when you mounted sda1 which is your /boot partition outside the encrypted LVM which is on sda2. You only have to take care to specify this when installing grub2, I think you have to do the same in boot-repair, there is an option to specify separate /boot partition and which one is it.

    Look in the Grub Location tab, there is option to specify separate /boot:
    https://help.ubuntu.com/community/Boot-Repair
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  8. #28
    Join Date
    Jun 2005
    Location
    /world/OldEurope
    Beans
    184
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Boot fails LVM encryption

    In Boot-Repair, I selected the option for a separate boot partition, but couldn't choose anything else than sda (the line was greyed out). Afterwards, grub-pc confronts me with the options to install either to sda or to dm-1, but it won't accept it anymore if I choose sda. OK, there is a boot directory on sda1, but it is not mounted right now. The boot directory I can access in the running system is another one, which is inside the root LV. And there is only a grub directory inside /boot, nothing else.
    Code:
    $ mount
    /dev/mapper/vg01-root on / type ext4 (rw,errors=remount-ro,acl,user_xattr)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    none on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
    none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=52428800)
    none on /run/shm type tmpfs (rw,nosuid,nodev)
    /dev/mapper/vg01-tmp on /tmp type ext4 (rw,acl,user_xattr)
    /dev/mapper/vg01-usr on /usr type ext4 (rw,acl,user_xattr)
    /dev/mapper/vg01-home on /home type ext4 (rw,usrquota,grpquota,acl,user_xattr)
    /dev/mapper/vg01-var on /var type ext4 (rw,acl,user_xattr)
    /dev/sda1 on /mnt/boot-sav/sda1 type ext4 (rw)
    Last edited by elektronaut; March 21st, 2013 at 10:11 PM.

  9. #29
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,593
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Boot fails LVM encryption

    Selecting the /boot option should enable the drop down box where you can select the partition. Unless something is messed up with the partition table.

    I think I already mentioned, since boot-repair obviously fails, why don't you try reinstalling grub2 manually? I prefer doing it manually anyway, it gives you better control.

    PS. One more question, are you running this from the OS or you are booting the machine in live mode? You have the OS running, right? In that case purging and reinstalling grub2 is even easier if you have the OS already booted.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  10. #30
    Join Date
    Jun 2005
    Location
    /world/OldEurope
    Beans
    184
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Boot fails LVM encryption

    Yes, I'm working with the running system right now. So you advice me to do these steps?
    Quote Originally Posted by oldfred View Post
    # purge old and reinstall new to sda
    sudo apt-get purge grub grub-pc grub-common grub-efi
    sudo mv /boot/grub /boot/grub_backup
    sudo mkdir /boot/grub
    sudo apt-get install grub-pc grub-common
    sudo grub-install --recheck /dev/sda
    sudo update-grub

    You do not have to chroot if already into your install. But I do not think this includes the extra steps to also mount the lmv.
    chroot & grub uninstall & reinstall -drs305
    http://ubuntuforums.org/showthread.php?t=1581099
    Anything else? I guess I don't have to do anything special about LVM and LUKS, as all partitions are already mounted?
    What about 'grub-mkimage' (see my post on the previous page)? Do I need to call it, and if so, with which parameters?
    The last time I tried to fix it with these commands didn't seem to work. So I guess something has to be adjusted.

Page 3 of 5 FirstFirst 12345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •