You are not logged in.

#1 2007-03-03 21:36:59

jasiekd
Member
From: Poland
Registered: 2006-12-29
Posts: 12

[SOLVED] LUKS encrypted root problem

I've just installed Arch from 0.8 beta2 CD. Everything worked fine: Arch was installed on encrypted FS, I configured lilo and rebooted. Unfortunately it didn't work. I can't turn on my arch without the boot CD.

When I use CD, encrypt hook asks me for password, but when I choose Arch_Linux in Lilo it doesn't.
My lilo.conf:

boot=/dev/sda
default=Windows_XP
timeout=1200
lba32
prompt
# bootsplash
bitmap=/boot/enterthelinux.bmp  # background path
bmp-colors=151,0,0,224,0,0      # text color
bmp-table=225p,350p,2,7         # label position on the screen p=pixel
bmp-timer=464p,331p,151,0,0     # timer position on the screen p=pixel

# Arch Linux Boot
image=/boot/vmlinuz26
        label=Arch_Linux
        root=/dev/sda6
        vga=792
initrd=/boot/kernel26.img
#       read-only

# Arch Linux FallBack Boot
image=/boot/vmlinuz26
        label=Arch_Linux_FB
        root=/dev/sda6
        vga=792
initrd=/boot/kernel26-fallback.img
        read-only

# Windows XP Boot
other=/dev/sda1
        label=Windows_XP
        table=/dev/sda

My mkinitcpio.conf:

MODULES="piix ide_disk reiserfs"
BINARIES=""
FILES=""
HOOKS="base udev pata scsi usbinput keymap encrypt filesystems"

When I use CD to turn on Arch I write: "arch root=/dev/sda6 vga=792".

What should I do?

Best regards,
jasiekd.

Last edited by jasiekd (2007-03-14 07:27:44)

Offline

#2 2007-03-06 15:10:45

jasiekd
Member
From: Poland
Registered: 2006-12-29
Posts: 12

Re: [SOLVED] LUKS encrypted root problem

Thanks for answers.

Offline

#3 2007-03-07 00:52:29

ar2k7
Member
Registered: 2006-10-14
Posts: 27

Re: [SOLVED] LUKS encrypted root problem

Maybe not the right thing to do here, but have you tried to boot from the livecd, decrypt your partition, mount chroot into your system with the setup utility and reinstall kernel and lilo?

Offline

#4 2007-03-07 17:04:06

jasiekd
Member
From: Poland
Registered: 2006-12-29
Posts: 12

Re: [SOLVED] LUKS encrypted root problem

Is there an option to decrypt ecrypted parition without data loss?

Offline

#5 2007-03-07 23:37:38

ar2k7
Member
Registered: 2006-10-14
Posts: 27

Re: [SOLVED] LUKS encrypted root problem

When dealing with encryption there are some scenarios that can lead to data loss or corruption, but I don't see why this would be a problem here, besides you said you just installed Arch, so guess you won't loose anything valuable if something bad do happen. If you had important data on disk you would probably also have backups right?

Offline

#6 2007-03-09 21:01:19

lawmaker
Member
Registered: 2007-03-08
Posts: 8

Re: [SOLVED] LUKS encrypted root problem

If you change mkinitcpio.conf, you need to (re)generate the cpio image. You see, the configuration file only affects the image _build_ process, the image itself doesn't (and can't) take it's configuration from that file during boot.

To regenerate the image, use the -g option:

mkinitcpio -g /boot/kernel26.img

Note: This will overwrite your current cpio image.

Last edited by lawmaker (2007-03-09 21:03:40)

Offline

#7 2007-03-10 16:27:22

jasiekd
Member
From: Poland
Registered: 2006-12-29
Posts: 12

Re: [SOLVED] LUKS encrypted root problem

lawmaker: I did that.

Offline

#8 2007-03-11 06:36:06

lawmaker
Member
Registered: 2007-03-08
Posts: 8

Re: [SOLVED] LUKS encrypted root problem

This is really odd:

When I use CD, encrypt hook asks me for password, but when I choose Arch_Linux in Lilo it doesn't.

The config files seem OK, bootloader configuration seems OK (provided /dev/sda6 is your encrypted root and kernel26.img is your _regenerated_ cpio image). So, it _should_ work.

Maybe it would be good to know exactly what happens when you boot Arch_Linux from LILO. Especially all error messages.

Anyway, do I understand correctly that you can boot into your encrypted system using Arch Linux CD?

Oh, and:

Is there an option to decrypt ecrypted parition without data loss?

No, this is not possible. But for the operation ar2k7 suggested it's unnecessary. Either you can boot into your system with Arch Linux CD or you can use cryptsetup to luksOpen your encrypted root and chroot into it. You may need to get working /dev, /proc, maybe even /sys into the chroot to make it work properly. For that, you can use:

mount -o bind /dev /mnt/chroot/dev
mount -t proc none /mnt/chroot/proc
mount -t sysfs none /mnt/chroot/sys

You may also consider using GRUB as bootloader. Unlike LILO, GRUB configuration can be changed before booting into the system. In case anything goes wrong, it can save you a lot of trouble. Also, no need to refresh bootloader after each change of it's config file.

Last edited by lawmaker (2007-03-11 06:36:59)

Offline

#9 2007-03-14 07:27:09

jasiekd
Member
From: Poland
Registered: 2006-12-29
Posts: 12

Re: [SOLVED] LUKS encrypted root problem

I'm using grub now and everything is fine! Thanks for advice lawmaker.

Offline

Board footer

Powered by FluxBB