You are not logged in.

#1 2011-12-26 13:35:48

twiggz
Member
From: Sweden
Registered: 2011-01-21
Posts: 11
Website

[SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

Hello geeks!

I can't boot my computer because when Arch tries to open up the encrypted root filesystem it can't find the /dev/sd* devices. After booting fails i end up at a prompt and i can see that there are files in /dev but the SSD drive and all partitions is missing. I'm not really sure what modules i need to have loaded for them to show up. It is strange because i use the default mkinitcpio.conf and it got autodetect, scsi etc turned on.

I've tried adding things like uhci_hcd, ata_generic, libata, sd_mod, scsi_mod and ehci_hcd. I'm just doing wild guesses here. I use the default mkinitcpio.conf but have changed the order of usbinput to before encrypted.

Anyone got tips on how to solve this? Should i focus on modules or udev? What i got is a MacBook Air from 2011.

Solution below smile

Last edited by twiggz (2011-12-28 11:41:06)

Offline

#2 2011-12-26 17:34:35

matse
Member
Registered: 2011-04-27
Posts: 299

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

If you encrypt root, you need the "encrypt" hook before the filesystems hook in your mkinitcpio.conf.

Offline

#3 2011-12-26 18:13:57

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

Ordering of the filesystems hook is irrelevant as it provides zero functionality during runtime. More likely, you're missing bus or block dev drivers if sd* nodes aren't being created (even without any knowledge of filesystems).

When my MBA ran Arch, I believe I used the 'pata' and 'sata' hooks, but also added in ata_generic. There were some other drivers I needed for the keyboard but I don't recall exactly which they were. If you can post the output of 'lsinitcpio -a /boot/initramfs-linux.img' and your /etc/mkinitcpio.conf, I might be able to decipher where you've gone wrong.

Offline

#4 2011-12-26 21:59:48

twiggz
Member
From: Sweden
Registered: 2011-01-21
Posts: 11
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

I got this in mkinitcpio.conf:

HOOKS="base udev autodetect pata scsi sata keymap usbinput encrypt filesystems"

When booting up (half way) and running lsmod i get: hid_apple, usbhid, hid, dm_crypt, dm_mod, uhci_hcd, ehci_hcd and usbcore.

The output of "lsinitcpio -a /boot/initramfs-linux.img" can be found here: https://gist.github.com/1522166

Can the problem be related to me using EFI and GPT? No BIOS stuff at all. I've heard that the Apple EFI firmware turns on IDE mode (and that's what lspci says on the livecd). Is IDE incompatible with EFI/GPT?

Offline

#5 2011-12-26 22:47:42

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

Ah, that could be it... I always booted in BIOS mode using syslinux as my bootloader.  You're going to run into some other large (graphics related) problems trying to boot in EFI mode as well:

http://web.archiveorange.com/archive/v/ … sLOzk3ZOYE

Offline

#6 2011-12-27 12:23:33

twiggz
Member
From: Sweden
Registered: 2011-01-21
Posts: 11
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

I got the MacBook Air from 2011 so that's not a problem at all. I've not seen anyone having issues with SATA when using EFI/GRUB2/GPT. I would rather not reinstall just to see if it's a problem with the initrd stage.

I have seen that you can turn on AHCI with "setpci" under GRUB2 but it's a bit confusing. https://wiki.archlinux.org/index.php/SS … _computers tells me i should use something like "setpci -d 8086:27c4 90.b=40" but i can't find information about what "90.b=40" means and what i should use (i've seen people use different text at the end).

Offline

#7 2011-12-27 12:50:53

twiggz
Member
From: Sweden
Registered: 2011-01-21
Posts: 11
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

Fallback worked so it definitely is a problem with the modules. I guess i could use lsinitcpio to see the difference between the two.

Half way through the boot up i also get display issues in the console that nomodeset didn't fix. This should be easy to fix.

Offline

#8 2011-12-28 11:38:50

twiggz
Member
From: Sweden
Registered: 2011-01-21
Posts: 11
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

Solved it! smile

What one needs to have in mkinitcpio.conf is:

MODULES="ahci"
HOOKS="base udev sata keymap usbinput encrypt filesystems"

So it seems that when you use EFI/GPT/GRUB2 it uses AHCI smile Arch just don't figure it out by itself. Also removed autodetect, pata and scsi from HOOKS because you don't need them.

Offline

#9 2011-12-28 13:30:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

Hrmmmm, that's awfully strange. ahci should be picked up by the sata hook if autodetect worked properly. Could you post the output of 'mkinitcpio -M' for me?

Offline

#10 2011-12-28 20:18:05

twiggz
Member
From: Sweden
Registered: 2011-01-21
Posts: 11
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

I think i got it. I had to run mkinitcpio -k 3.1.6-ARCH-1 -M under chroot running the livecd. The i915 driver is fucked and ABS + kernel recompile don't like me (yet) sad

https://gist.github.com/1529513

Last edited by twiggz (2011-12-28 20:18:40)

Offline

#11 2011-12-29 00:39:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

You're not using ahci. Same drivers as used by the 2010 MBAs.

Offline

#12 2011-12-29 09:24:07

twiggz
Member
From: Sweden
Registered: 2011-01-21
Posts: 11
Website

Re: [SOLVED] Problem with initrd/luks. /dev/sd* devices doesn't exist

What do you mean? I know the the module is not autodetected but obviously i need ahci for my machine to work. I have not installed Arch on this machine without encrypted root so i'm not sure if it would boot without problems.

I don't know but i'm guessing i need ahci because i don't use hybrid mbr/bios stuff and since a lot of people do use that they don't encounter this issue.

Offline

Board footer

Powered by FluxBB