You are not logged in.

#1 2009-01-08 01:36:12

qrax
Member
Registered: 2009-01-08
Posts: 2

Migrating lvm to lvm on luks - kernel panic (solved)

Inspired by the guide found here I tried to move my current lvm setup over to an encrypted lvm setup on my arch64 install: http://www.debian-administration.org/articles/577

My partitions look like this:

sda1=/boot ext3
sda2=lvm2
sda3=windows
sda4=ext3

With the LVM configure like this:

LVMGroup01-lvolswap 256.00 MB
LVMGroup01-lvolroot 15.00 GB
LVMGroup01-lvolhome 40.00 GB

I used

tar cSf  /everything/

while omitting /dev/, /media, /mnt, /proc, /sys and /tmp to backup my current lvm setup.
From arch live I overwrote sda2 and setup luks on it using the arch wiki as a guide. I recreated the LVM as before but using a different size for home and swapped the order I created the root and swap volumes if that matters. I then mount LVMGroup01-lvolroot and untar everything with

tar xSf backup.tar

I edit menu.1st to use root=/dev/mapper/ LVMGroup01-lvolroot cryptdevice=/dev/sda2:LVMGroup01 and reboot. I'm asked by luks to enter the password and it succeeds. It then proceeds to detect and activate the LVM. When the file system is about to be mounted I get a kernel panic. Trying to fix it I use the archlive to chroot and reinstall the kernel. However I get the same error. Here is the error message:

key slot 0 unlocked.
:: Running Hook [lvm2]
mknod: file exists
Scanning logical volumes…
  Reading all physical volumes. This may take a while…
  Found volume group "LVMGroup01" using metadata type lvm2
Activating logical volumes…
  3 logical volume(s) in volume group "LVMGroup01" now active
:: Running Hook [filesystems]
:: Loading root filesystem module…ext3
Waiting for devices to settle…done.
:: Initramfs Completed – control passing to kinit
IP-Config: no devices to configure
Waiting 0 s before mounting root devices
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
EXT3-fs: recovery complete
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
kinit: Mounted root (ext3 filesystem) readonly.
kinit: opening console: No such file or directory
Kernel panic – not syncing: Attempted to kill init

My menu.1st

# (0) Arch Linux X11
title  Arch Linux X11
root   (hd0,0)
kernel /vmlinuz26 root=/dev/mapper/LVMGroup01-lvolroot cryptdevice=/dev/sda2:LVMGroup01 ro 5
initrd /kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,0)
kernel /vmlinuz26 root=/dev/mapper/LVMGroup01-lvolroot cryptdevice=/dev/sda2:LVMGroup01 ro
initrd /kernel26-fallback.img

fstab

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

/dev/cdrom /media/cdrom   auto    ro,user,noauto,unhide   0      0
/dev/dvd /media/dvd   auto    ro,user,noauto,unhide   0      0
/dev/mapper/LVMGroup01-lvolhome /home ext3 defaults 0 1
/dev/mapper/LVMGroup01-lvolroot / ext3 defaults 0 1
/dev/mapper/LVMGroup01-lvolswap swap swap defaults 0 0
UUID=e95c0db8-44ad-4b0d-bdc6-28f661840114 /boot ext2 defaults 0 1

mkinitcpio.conf

MODULES="pata_acpi ata_generic scsi_mod ahci ata_piix BusLogic"
BINARIES=""
FILES=""
HOOKS="base udev autodetect pata scsi sata usbinput keymap encrypt lvm2 filesystems"

Any ideas before I put back my clonezilla image?

Last edited by qrax (2009-01-09 14:44:23)

Offline

#2 2009-01-08 22:58:03

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: Migrating lvm to lvm on luks - kernel panic (solved)

/dev/console seems to be a quasi file that exists even after shutdown. It seems that it does not exist on your root: you can create using that live cd, and then maybe your system will boot:

I think that something like: mknod -m 600 /dev/console c 5 1 should be able to recreate it, if you can't copy it from the livecd's /dev.

http://wiki.archlinux.org/index.php/LUK … _LVM_setup Suggests doing the system inside out; I think that what you did is more convenient as a single user (and for multiple, maybe the encryption can be nested to keep things private). It might be helpful to add that suggestion and what you did to the wiki?

Offline

#3 2009-01-09 14:42:45

qrax
Member
Registered: 2009-01-08
Posts: 2

Re: Migrating lvm to lvm on luks - kernel panic (solved)

vogt wrote:

/dev/console seems to be a quasi file that exists even after shutdown. It seems that it does not exist on your root: you can create using that live cd, and then maybe your system will boot:

I think that something like: mknod -m 600 /dev/console c 5 1 should be able to recreate it, if you can't copy it from the livecd's /dev.

http://wiki.archlinux.org/index.php/LUK … _LVM_setup Suggests doing the system inside out; I think that what you did is more convenient as a single user (and for multiple, maybe the encryption can be nested to keep things private). It might be helpful to add that suggestion and what you did to the wiki?

Many thanks to you! Copying the console file from the livecd worked. I'll think about the wiki thing since I'm not sure if reinstalling the kernel might have solved other problems with the system directories like /proc and so on.

Offline

Board footer

Powered by FluxBB