You are not logged in.

#1 2006-09-23 14:29:25

rbl
Member
Registered: 2005-08-29
Posts: 64

[Solved] Cannot boot (mkinitcpio + encrypted root fs)

Hi guys,

after many months, I have once again a problem I cannot solve myself. Since mkinitcpio has replaced mkinitrd for the stock kernel, I cannot boot into my encrypted root anymore:

Attempting to create root device `/dev/hda3`
ERROR: Failed to parse block device name for `/dev/hda3`
   unknown
ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter.
:: Initramfs Completed - control passing to kinit
kinit: Cannot open root device dev(0,0)
kinit: init not found!
Kernel panic - not syncing: Attempted to kill init!

Here's my (currently bloated, tried nearly everything) mkinitcpio.conf:

MODULES="piix ide_disk reiserfs ext3 dm-crypt aes-i586"
BINARIES=""
FILES=""
HOOKS="base udev autodetect ide sata scsi usbinput lvm2 encrypt filesystems"

And my grub menu.lst:

# (0) Arch Linux
title  Arch Linux (mkinitcpio)
root   (hd0,0)
kernel /vmlinuz26 root=/dev/hda3 ro vga=792
initrd /kernel26.img

My encrypted filesystem was build according to the WIKI , is using ReiserFS, and has been / is working with earlier kernels (using old ArchCK right now..)

EDIT: solved

Offline

#2 2006-09-23 20:38:41

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,167

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

From Configuring_mkinitcpio#Using_encrypted_root

Using loop-aes volumes

mkinitcpio does not support loop-aes yet.


I see a aes module listed, maybe that's the problem cause ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2006-09-23 20:59:31

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

I don't think I am using Loop-AES. I set up the partition with cryptsetup, not losetup as far as I remember. During bootup, the device-mapper seemed to handle the mounting. This is how I successfully boot into the fs with an old archck kernel:

# (1) Arch Linux (archck)
title  Arch Linux (archck)
root   (hd0,0)
kernel /vmlinuz26archck root=/dev/dm-0 ro
initrd /initramfs-2.6.15-archck.img

Offline

#4 2006-09-24 08:48:55

onearm
Member
From: Anywhere but here
Registered: 2006-07-06
Posts: 359
Website

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

Tried with the rootfstype= kernel parameter? (probably won't help but trying isn't a bad idea)


To get something done, a committee should consist of no more than three persons, two of them absent.
--
My Github

Offline

#5 2006-09-24 10:31:22

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

rbl wrote:

My encrypted filesystem was build according to the WIKI , is using ReiserFS, and has been / is working with earlier kernels (using old ArchCK right now..)

First, creating an encrypted filesystem according to this wiki page is not recommended for various reasons, mainly because it is not very secure. I'll have to update that page soon.

Second, the mkinitcpio wiki page has a section about "legacy cryptsetup volumes", I think you should read that (and pay special attention to the crypto= option). But I am worried about something else:

Attempting to create root device `/dev/hda3`
ERROR: Failed to parse block device name for `/dev/hda3`

This look more like /dev/hda3 isn't found in the first place, but I am not sure. Correct your crypto setup and see if this message still appears.

Offline

#6 2006-09-24 12:25:34

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

I tried both rootfstype=reiserfs and crypto=:::: which did not work.. if crypto= is the way to go and I need more than the default(::::) parameters, how do I get them?

Offline

#7 2006-09-24 16:35:13

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

You could perhaps tell me what the error messages are if you add the crypto=:::: parameter. Your previous output suggests that it can't even find your hard disk controller, which is weird as you added the modules manually. Does it even ask for a passphrase?

Offline

#8 2006-09-24 20:21:53

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

Whether or not crypto=:::: is set, the Error messages are the same. If I add the rootfstype=reiserfs parameter, the 2 lines beginning with "ERROR" disappear, everything else remains the same. I am in no case being asked for the password.

Offline

#9 2006-09-24 22:51:32

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

Did you rebuild your mkinitcpio image after adding the encrypt hook? Can you provide a screenshot (digital camera ....) or a complete and precise copy of the messages on the screen?

Offline

#10 2006-09-25 10:35:37

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

yes, I did rebuild the mkinitcpio image:

root@aspirin[rebel]# mkinitcpio -g /boot/kernel26.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
:: Parsing hook [ide]
:: Parsing hook [sata]
:: Parsing hook [scsi]
:: Parsing hook [usbinput]
:: Parsing hook [raid]
:: Parsing hook [lvm2]
:: Parsing hook [encrypt]
:: Parsing hook [filesystems]
:: Generating module dependancies
:: Generating image '/boot/kernel26.img'...SUCCESS

Unfortunately, I have no digital camera at the moment. I am willing to go through the hassle of writing the whole screen down, though.. Should I enable or disable the crypto=:::: and/or rootfstype=reiserfs parameters for this?

Offline

#11 2006-09-25 16:16:09

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

Enable crypto=::::, it doesn't matter if you have the rootfstype option, the output shouldn't be too different (I should be able to read both). Everything that happens after "Loading [udev]" is important.

Most important: if you rebuild the image and run a different kernel than the image is for, then your have to specify the "-k 2.6.18-ARCH" option to mkinitcpio (or -k 2.6.17-ARCH if that is the kernel version). Otherwise it is cannot boot.

Offline

#12 2006-09-25 17:12:13

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: [Solved] Cannot boot (mkinitcpio + encrypted root fs)

brain0 wrote:

Most important: if you rebuild the image and run a different kernel than the image is for, then your have to specify the "-k 2.6.18-ARCH" option to mkinitcpio (or -k 2.6.17-ARCH if that is the kernel version). Otherwise it is cannot boot.

Oh well, that did it.. big_smile thanks brain0!
I kept building the images while running the old archck-kernel and did not set the -k parameter. :oops:

Offline

Board footer

Powered by FluxBB