SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a laptop with Slackware-current. It has a hard disk with two partitions; one ,hda1,unencrypted, for the /boot filesystem, ant another, hda2, with three LV encrypted whit cryptsetup/LUKS for the /, /home and swap filesystems. All make according to README_CRYPT.TXT and README_LVM.TXT documents.
All works fine, until I upgraded mkinitrd whit the mkinitrd-1.3.1 package.
After I upgrades the package, I rebooted the laptop and, behind initrd loads the modules, it stops and I get the next error messages:
Command failed: dm_task_set_name: Device /dev/mapper/cryptroot not found
mount: mounting /dev/mapper//dev/mapper/cryptroot on /mnt failed: No such file or directory.
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
Behind the prompt, I run exit, and I get a kernel panic.
I search for help on Google, but the only valid answer was in the URL
<http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:setup>. It was one modification to the README_CRYPT.TXT document, above mentioned.
I followed the next steps for make the modification above mentioned. Behind I boot the laptop with the CD1 from Slackware Installation, I run the next commands:
cryptsetup luksOpen /dev/mivg/root cryptroot
cryptsetup luksOpen /dev/mivg/home /crypthome
mount -t ext3 /dev/mapper/cryptroot /mnt
mount -t ext3 /dev/mapper/crypthome /mnt/home
mount -t ext3 /dev/ha1 /mnt/boot
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev (this is the modification above mentioned. It gets error,and I run the next command)
cp -a /dev/mapper/ /mnt/dev
mkinitrd -c -k 220.127.116.11 -m ext3 -f ext3 -r cryptroot -C /dev/mivg/root -L
I reboot the laptop, and I get the same errors.
If, in the prompt after the boot, I make ls -la /dev/mapper, I get
Don't appear the encrypted devices cryptroot and crypthome, why?
Any idea? What is wrong?
Sorry for my english, and thanks in advance.
I am going to try an install of -current with a LUKS root partition on top of LVM. I changed Slackware's init script of the initrd, so that it will support LV's on top of LUKS encrypted partitions (which is easier to setup) and I thought I had tested the changes on a setup similar to yours, but there may be a bug I overlooked.
I just installed slackware-current. I created a single Logical Volume, created a LUKS volume called 'croot' on top of the LVM device /dev/vg/root, used that LUKS volume to put Slackware's root filesystem on and used a small unencrypted partition for /boot .
This is similar to your setup except that I do not use 3 LV's. The effect should be the same though.
I have a second (somewhat older) Slackware with two LV's and LUKS volumes on top of those (for / and /home) where this most recent version of mkinitrd works fine.
BTW in Slackware -current you no longer have to run all the "mount -bind" commands and the "cp -a /dev/mapper ...". The installer does that for you now. Just
is enough to enter a pre-configured chroot.
I see that you are not fully current yet. Can you check if your version of mkinitrd package is actually mkinitrd-1.3.1-i486-4.tgz ? There were several versions of the mkinitrd-1.3.1 package in rapid succession, and only build number 4 works.
And equally important: did you run "lilo" in the chroot after creating a new initrd.gz file and before rebooting?
If I don't run all the "mount -bind" commands and the "cp -a /dev/mapper ...", when I run makeinitrd.... I get the next message twice : "cat: /proc/partitions: No such file or directory".
When reboot the laptop with the new initrd, I get the same error messages I posted yesterday.
In the /boot/grub/menu.lst, I have one line "initrd /initrd.gz
sorry for bumping an old thread but I've a similar problem.
I'm running slackware-12.0 with kernel-generic-2.61.5-smp and encrypted /, everything is working fine.
I've decided to take a look at slackware-current kernel, so I've rebuilt kernel-generic-18.104.22.168-smp under slackware-12.0 and here come the troubles
I'm no longer able to build a working initrd.gz:
1) using slackware-12.0 mkinitrd and cryptsetup it does not ask for passphrase ad goes straight to kernel panic
2) as a first step I've rebuilt makeinitrd-1.3.1-i486-4 for 12.0, it still doesn't mount but, at least, it leaves me in the initrd shell instead of panicking. from there, "cryptsetup lucksOpen" segfaults
3)as a second step I've also rebuilt cryptsetup under the newer kernel (I've a machine with plain / which works fine with kernel-generic-22.214.171.124-smp) unfortunately, same problem as before (emergency shell and cryptsetup segfaults)
When I reverted to mkinitrd-1.1.2-i486-3 and it worked fine, I upgraded to mkinitrd-1.3.1-i486-4 and typed mkinitrd with not arguments, and it worked fine.
Now, I upgraded kernel to kernel-126.96.36.199, and typed mkinitrd with arguments, and the problem return. I have the same error messages of the first post