[Yaird-devel] Bug#355074: yaird fails to load /dev/console for luks cryptoroot

Mark Hedges hedges at ucsd.edu
Fri Mar 3 03:52:37 UTC 2006


Package: yaird
Version: 0.0.12-3
Severity: important

To summarize:

   EXT3-fs: mounted filesystem with ordered data mode.
   Switching root ...
   /usr/lib/yaird/exec/run_init: opening console: No such file or directory
   Kernel panic - not syncing: Attempted to kill init!

This is the beginning of some documentation on setting up an
encrypted root device with LUKS and gets to my problem at the end:

First I did an etch network install.  I set up the disk as:

     /dev/hda1       /boot
     /dev/hda2       swap
     /dev/hda5       future /        (not used)
     /dev/hda6       future /home    "
     /dev/hda7       future /usr     "
     /dev/hda8       future /var     "
     /dev/hda9       temporary /

Installed Debian on /dev/hda9 with a bare-bones "testing" system,
kernel-image-2.6.15-1-386.  (I used -1-686 since I have a P4.)
Rebooted into 2.6.15. (etch netinstall had 2.6.12 onboard.)

Install cryptsetup with luks support, which is currently only
in the unstable distrib.  So add the unstable line to sources.list,
and add 'APT::Default-Release "testing";' to apt.conf.  Then do
`apt-get install -t unstable cryptsetup`.

Set up /dev/hda5 with luks according to the saout wiki
(http://www.saout.de/tikiwiki/tiki-index.php?page=EncryptedDeviceUsingLUKS),
first filling the partition with random data.
Use a good long passphrase for the root partition.

     cryptsetup -c aes-cbc-essiv:sha256 -h ripemd160 \
         -y luksFormat /dev/hda5

Line for /etc/crypttab:

     root /dev/hda5 none cipher=aes-cbc-essiv:sha256,hash=ripemd160,luks

Then do:

     /etc/init.d/cryptdisks restart

     mkfs.ext3 -j /dev/mapper/root

     mount /dev/mapper/root /mnt

     cp -ax / /mnt

     mount --bind /dev /mnt/dev

Edit /mnt/etc/fstab and change mount point / to file system
/dev/mapper/root.

     chroot /mnt

     mount sysfs /sys  -t sysfs
     mount proc  /proc -t proc

     mount /dev/hda1 /boot

     yaird --verbose --outfile=/boot/initrd.img-2.6.15-1-686-luks > tmp/yairdout

     rm initrd.img
     ln -s boot/initrd.img-2.6.15-1-686-luks initrd.img

yaird seems to use the cryptsetup-luks template.  It also seems to
do the prologue template correctly (which is supposed to get /dev/console.)

I edited menu.lst to include a line with root=/dev/mapper/root/ .

I do get a prompt to type the luks password.  Yay!

But immediately I see:

EXT3-fs: mounted filesystem with ordered data mode.
Switching root ...
/usr/lib/yaird/exec/run_init: opening console: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

It would appear that yaird is not putting the console device in?

Any clues?

Mark


-- System Information:
Debian Release: testing/unstable
   APT prefers testing
   APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages yaird depends on:
ii  cpio                         2.6-10      GNU cpio -- a program to manage ar
ii  dash                         0.5.3-2     The Debian Almquist Shell
ii  libc6                        2.3.5-13    GNU C Library: Shared libraries an
ii  libhtml-template-perl        2.8-1       HTML::Template : A module for usin
ii  libparse-recdescent-perl     1.94.free-1 Generates recursive-descent parser
ii  perl                         5.8.7-10    Larry Wall's Practical Extraction

yaird recommends no packages.

-- no debconf information





More information about the Yaird-devel mailing list