You are not logged in.

#1 2009-12-04 07:53:46

Geheimdienst
Member
Registered: 2009-12-04
Posts: 4

[SOLVED] Fresh install with dmcrypt won't boot

So I'm ready to ditch Ubuntu and go Arch. Trouble is, Arch installs but then fails to boot. It displays a "filesystem check error" and a big scary message about the superblock being bad. Then it drops me into a root prompt where I'm supposed to repair the filesystem.

I'm telling the installer to create a dm_crypt partition with ext on top. This is according to the Install Guide. So I have:
* 100 MB ext2 partition for /boot, which clearly works
* 30 GB dm_crypt + ext4 partition for /
* I tried the installation a second time with dm_crypt + ext3. Same thing, unbootable Arch.

What happened both times:
* installation seems to complete OK (archlinux-2009.08-netinstall-i686)
* reboot, select Arch in Grub, it starts booting
* I enter the decryption passphrase at the prompt
* boot continues for 1-2 screenfuls
* shows a few of the colored messages
* then it displays the filesystem error.

When I boot the old Ubuntu and use "parted" to look at the partition in question, it says it can't find a file system there and refuses to do anything else.

Side note: I'm a little unsure because the wiki seems to contradict itself. The Install Guide makes it look like the installer can set up dm_crypt for you. However this wiki page talks about loading kernel modules and a whole bunch of stuff, then in the middle says "now we're ready to start the Arch installer". I followed the Install Guide, not the other document.

Arch sounds very attractive to me, but so far it's been frustrating. Installed two times, unbootable system :-( It would be great if someone could work towards a solution with me. Googling didn't turn up anything.

Last edited by Geheimdienst (2009-12-06 05:58:13)

Offline

#2 2009-12-04 08:28:58

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: [SOLVED] Fresh install with dmcrypt won't boot

What does your /etc/fstab look like?
Are you using /dev/mapper/... and not /dev/sda2 or whatever for your root filesystem?

Is you initrd setup to work with encryption? (Sounds like it is if it can prompt for a password.)

One option would be to setup your system without dmcrypt and then convert it later on by copying your filesystems to external storage, repartitioning and copying your data back.

Last edited by mikesd (2009-12-04 08:36:31)

Offline

#3 2009-12-04 10:59:10

Geheimdienst
Member
Registered: 2009-12-04
Posts: 4

Re: [SOLVED] Fresh install with dmcrypt won't boot

Hey mikesd, thanks for the quick reply.

mikesd wrote:

What does your /etc/fstab look like?
Are you using /dev/mapper/... and not /dev/sda2 or whatever for your root filesystem?

In the installer, I said: "for /dev/sda7, bring on the dmcrypt". This created /dev/mapper/foo-bar. Then I said: "on /dev/mapper/foo-bar, do the ext4 dance".

As for fstab: the installer showed it to me, it looked okay, but I can't recall details. And I can't access it for you because it's on the screwed partition :-/

But I mean, setting partitions + mountpoints is menu-guided and everything ... so I trust the installer can turn that into a sensible fstab for me. (It can't be that broken, right?)

mikesd wrote:

Is you initrd setup to work with encryption? (Sounds like it is if it can prompt for a password.)

Yes, I do remember the installer showing me the mkinitcpio config file. It had correctly put "encrypt" into the Hooks array thingy. Seemed alright.

Offline

#4 2009-12-05 00:00:05

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: [SOLVED] Fresh install with dmcrypt won't boot

Everything sounds right to me though I have never setup an encrypted root filesystem. I guess I would use the livecd to go through the steps of:

* load required modules, dm-crypt, etc.

* manualy unlock the encrypted partition using luks.

* try and mount it.

It sounds like the last step is the one that is failing. Trying it using a livecd may give you more info or at least allow you to poke around and work out what is going on.

Offline

#5 2009-12-06 05:57:51

Geheimdienst
Member
Registered: 2009-12-04
Posts: 4

Re: [SOLVED] Fresh install with dmcrypt won't boot

Solution:

The installer has a bug and writes the wrong thing into /boot/grub/menu.lst. I needed to make this change:

Old:

kernel /vmlinuz26 root=/dev/sda7 ro

New:

kernel /vmlinuz26 cryptdevice=/dev/sda7:arch-root root=/dev/mapper/arch-root ro

The point is that the string arch-root needs to agree with your /etc/fstab:

/dev/mapper/arch-root / ext3 defaults 0 1

This is what the installer did wrong. Menu.lst and fstab did not agree on the name.

You can make up your own name for what I called arch-root, just be sure it's the same name in both places. And obviously sda7 is true just for my computer, you need to substitute yours.

More details in this bug report.

Offline

#6 2009-12-06 06:30:37

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: [SOLVED] Fresh install with dmcrypt won't boot

Good get! Glad you got it sorted. Sorry I couldn't be of more help. smile

Offline

#7 2009-12-06 07:19:28

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: [SOLVED] Fresh install with dmcrypt won't boot

I recently did a fresh install as well but I always edit my files by hand in another console, especially since I use LiLo instead of Grub, so I wasn't aware that the Installer didn't append this boot line automatically. Good to know for those who use Grub.

I'm actually glad when something doesn't work the way I thought it would, as it forces me to learn something new. smile Glad ya figured it out, one way or another, and welcome to Arch!

Offline

#8 2009-12-06 12:48:00

Geheimdienst
Member
Registered: 2009-12-04
Posts: 4

Re: [SOLVED] Fresh install with dmcrypt won't boot

mikesd wrote:

Sorry I couldn't be of more help. smile

Not at all! You pointed me in the right direction with mounting via the live CD. After some digging, I had a rough idea of what's going on and filed a bug. A guy got back very quickly with exactly the right workaround.

So I actually think this issue went quite well. A good first impression for the Arch people. :-)

Offline

Board footer

Powered by FluxBB