[Gllug] Problem with encrypted Debian root.

Andrew Back andrew at osmosoft.com
Tue Jul 20 09:34:17 UTC 2010

On 18 July 2010 15:38, David Damerell <damerell at chiark.greenend.org.uk> wrote:
> On Friday, 16 Jul 2010, Andrew Back wrote:
>>On 15 July 2010 17:47, David Damerell <damerell at chiark.greenend.org.uk> wrote:
>>> On Thursday, 15 Jul 2010, Andrew Back wrote:
>>>>title           Debian GNU/Linux, kernel 2.6.26-2-686
>>>>root            (hd0,1)
>>>>kernel          /vmlinuz-2.6.26-2-686 root=/dev/mapper/mosschops-root ro
>>>>initrd          /initrd.img-2.6.26-2-686
>>>>It prompts me for a passphrase and boots as expected. I only have one
>>>>kernel version installed, and this and the corresponding initrd.img
>>>>are versioned and in /boot (not root as the above entry, which works,
>>>>suggests), and with vmlinuz and initrd.img links in /.
>>>Are you sure hd0,1 is what you think it is? (Is /boot a separate
>>/dev/sda1 is a luks partition with LVM on top and LVs for an ext3 root
>>and for swap. /dev/sda2 is /boot and simply ext3.
> Wait a minute, Grub 1 (but not Grub 2) counts partitions from 0. So
> (hd0,1) is /dev/sda2 to Grub 1, isn't it? So _if_ you're using Grub 1
> this makes perfect sense, assuming the kernel has the brains to figure
> out where the real root partition is... somehow?

That's how I see it - there's no way Grub can read /dev/sda1.

> I think I'm into guesswork now. However, I observe Grub can't possibly
> read anything on /dev/sda1, so it's always going to need the
> (versioned) filenames from /boot and to find the files there...

With both entries Grub knows to go to /dev/sda2 (/boot), and in the
root of that fs I have:

andrew at mosschops:~$ ls -l /boot/vm*
lrwxrwxrwx 1 root root      25 2010-07-14 21:44 /boot/vmlinuz ->
-rw-r--r-- 1 root root 1507408 2010-06-21 11:42 /boot/vmlinuz-2.6.26-2-686

Grub seems to load a kernel whether the symlink or versioned kernel
are selected from the menu. However, when you pick the symlink it
doesn't seem to be able to find the root fs despite both entries
having the same "root=/dev/mapper/mosschops-root ro" appended.



Andrew Back
mailto:andrew at osmosoft.com
Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list