LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-11-2008, 11:39 AM   #1
prontxo
LQ Newbie
 
Registered: Mar 2008
Posts: 8

Rep: Reputation: 0
Slackware-current and mkinitrd-1.3.1


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:
vgchange -ay
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
chroot /mnt
vgscan --mknodes
mkinitrd -c -k 2.6.23.16 -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
control
mivg-home
mivg-root
mivg-swap
Don't appear the encrypted devices cryptroot and crypthome, why?
Any idea? What is wrong?
Sorry for my english, and thanks in advance.
 
Old 03-11-2008, 03:28 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,190

Rep: Reputation: Disabled
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'll post again when I know more.

Eric
 
Old 03-11-2008, 04:49 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,190

Rep: Reputation: Disabled
Quote:
Originally Posted by Alien Bob View Post
I'll post again when I know more
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 ran
Code:
mkinitrd -c -k 2.6.24.3-smp -m ext3 -f ext3 -r croot -C /dev/vg/root -L
added a line
Code:
initrd = /boot/initrd.gz
to /etc/lilo.conf and ran lilo from the chroot.

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
Code:
chroot /mnt
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?

Eric
 
Old 03-11-2008, 05:42 PM   #4
prontxo
LQ Newbie
 
Registered: Mar 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Slackware-current y mkinitrd-1.3.1

I have the makeinitrd-1.3.1-i486-4.tgz and I don't use lilo but grub
 
Old 03-12-2008, 07:19 AM   #5
prontxo
LQ Newbie
 
Registered: Mar 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Slackware-current and mkinitrd-1.3.1

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
 
Old 03-12-2008, 07:21 AM   #6
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
this is the post that helped me out alot.
http://www.linuxquestions.org/questi...0/#post3057148
 
Old 03-20-2008, 01:21 PM   #7
prontxo
LQ Newbie
 
Registered: Mar 2008
Posts: 8

Original Poster
Rep: Reputation: 0
I reverted to mkinitrd-1.1.2-i486-3 (from CD1), and it works fine
 
Old 03-27-2008, 07:05 AM   #8
sid77
LQ Newbie
 
Registered: Mar 2008
Distribution: Slackintosh 12.1/current Slackware 13.0 Slackware64 13.0
Posts: 19

Rep: Reputation: 0
hi all,
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-2.6.24.3-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-2.6.24.3-smp) unfortunately, same problem as before (emergency shell and cryptsetup segfaults)

any ideas?
 
Old 03-30-2008, 06:43 AM   #9
prontxo
LQ Newbie
 
Registered: Mar 2008
Posts: 8

Original Poster
Rep: Reputation: 0
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-2.4.24.4, and typed mkinitrd with arguments, and the problem return. I have the same error messages of the first post
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: Upgrade to Slackware -current without a -current CD truthfatal LinuxAnswers Discussion 0 09-19-2006 01:42 PM
Slackware 10 + SATA Promise + mkinitrd sammut Slackware 0 07-07-2004 01:55 AM
mkinitrd script with slackware deb75 Slackware 1 04-20-2004 10:56 AM


All times are GMT -5. The time now is 09:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration