You are not logged in.

#1 2011-05-01 10:05:09

ksira
Member
Registered: 2009-10-27
Posts: 31

[SOLVED] Cannot detect my new LVM recovery partition on boot

Hi,

I've been wanting to make a recovery lvm root partition next to my main install. I currently use LVM on top of LUKs, which all sits on my primary partition /dev/sda2. I use /dev/sda1 as a boot partition. Sometimes I want to resize my LVM partitions. I feel best doing it from the basic Arch install image, but I don't always want to have to get out a usb stick to boot into it.

I created a new lvm partition on my system

lvm -L 660M vg0 -n recoverylvol

# ls -la /dev/mapper/vg0-recoverylvol                                                                          
lrwxrwxrwx 1 root root 7 May  1 10:28 /dev/mapper/vg0-recoverylvol -> ../dm-7

I was able to follow the steps at https://wiki.archlinux.org/index.php/In … ting_Linux up to the point of installing GRUB, because I just want to use my currently installed GRUB.

The /etc/fstab file on my new partition looks like

# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

/dev/mapper/vg0-recoverylvol / ext3 defaults 0 1
UUID=eaaf9cfb-c112-4bad-8e55-3001a2c2411a /boot ext2 defaults 0 1

The my grub menu.lst on the boot partition looks like

# (5) Arch Linux
title  Arch Linux Recovery
root   (hd0,0)
kernel /vmlinuz26 root=/dev/mapper/vg0-recoverylvol cryptdevice=/dev/sda2:rootcrypt 
initrd /kernel26.img

I ran mkinitcpio -p kernel26 on my boot partition after finishing the chroot install. From GRUB I can log onto my main root partition just fine.

When I select the recovery partition from the GRUB menu it loads the initrd and gets to the point where it finishes running the LVM hook. It says that it has detected the LVM volume group and my 7 logical volumes. The system then complains that it can't find the root partition at /dev/mapper/vg0-recoverylvol and dumps me to a ramdisk console.

Any ideas why it is not finding the recovery LVM partition?

Last edited by ksira (2011-05-01 12:37:31)

Offline

#2 2011-05-01 12:36:48

ksira
Member
Registered: 2009-10-27
Posts: 31

Re: [SOLVED] Cannot detect my new LVM recovery partition on boot

I solved my problem.

It turns out that I needed to add ext3 to the modules array in my mkinitcpio.conf and then mkinitcpio -p kernel26. I had used ext3 as the filesystem type for the recovery partition, and I needed that module dependency to mount it.

Offline

Board footer

Powered by FluxBB