LinuxQuestions.org
Register a domain and help support LQ
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-06-2010, 04:41 AM   #1
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,601

Rep: Reputation: 142Reputation: 142
Fresh Slackware64-current RAID-1 + LVM + LUKS: pvcreate not working


Hi there,

I want to do a fresh install of Slackware64-current with two hard disks combined to a software RAID-1 array, LVM and LUKS, according to these instructions (originally written for Slackware 12.2).

I used Alien Bob's script to mirror Slackware64-current of 2nd March, 2010 (today's upgrades are not yet included), and to create a DVD ISO image, which I then burned onto a DVD, in order to use it as my installation medium.

Up to the actual encryption everything seems to be fine:
Code:
# cryptsetup.dynamic -s 256 -y luksFormat /dev/md1
# cryptsetup.dynamic luksOpen /dev/md1 slackluks
[...]
Command successful.
However, when I want to create the physical volume, as described in section 2.4, I get an error:

Code:
# pvcreate /dev/mapper/slackluks
  Device /dev/mapper/slackluks not found (or ignored by filtering)
In fact, there is no /dev/mapper/slackluks file.

Has anything fundamentally changed with LUKS or LVM in the installation system of Slackware64-current, that could explain this behaviour?

I am clueless, any help much appreciated, thanks in advance!

gargamel
 
Old 03-06-2010, 06:01 AM   #2
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 374

Rep: Reputation: 55
Quote:
Originally Posted by gargamel View Post
Hi there,

However, when I want to create the physical volume, as described in section 2.4, I get an error:

Code:
# pvcreate /dev/mapper/slackluks
  Device /dev/mapper/slackluks not found (or ignored by filtering)
In fact, there is no /dev/mapper/slackluks file.

Has anything fundamentally changed with LUKS or LVM in the installation system of Slackware64-current, that could explain this behaviour?

I am clueless, any help much appreciated, thanks in advance!

gargamel
I get the same behavior on a installed system too. It appears that udev doesn't
create some devices. It might have something with this
(or it may be irrelevant)
http://www.linuxquestions.org/questi...3/#post3888051

If you run "udevadm trigger" the device will be created and then you
will be able to install fine.

Last edited by imitheos; 03-06-2010 at 06:02 AM.
 
Old 03-06-2010, 08:41 AM   #3
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,601

Original Poster
Rep: Reputation: 142Reputation: 142
Thanks a lot, that was really it!

Meanwhile I found, that when I connect an external USB device with an encrypted file system, I too have to issue

Code:
# udevadm trigger
to be able to mount it. Seems to be a systematic bug in this latest version of Slackware64-current.

gargamel
 
Old 03-19-2010, 09:07 PM   #4
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
Heh. I guess everyone thought this one had been lost in the shuffle :-)

Has anyone verified that this also happens on 32bit -current?
Either way, I'm looking into it. I've found at least one problem in lvm2 package anyway while looking into this, so that's good. In the meantime, I confirmed it on my laptop (x86_64), but since it's my daily use machine, I used the ugly udevadm trigger workaround and continued on with the installation, and now I'm up and running again. In my testing on 32bit (I have otherwised unused hardware to test on it), I was able to reproduce this *sometimes* but not always. I've talked with one of the cryptsetup devs, and because it's not multithreaded, he doesn't think it's a timing issue - instead it's probably something to do with the kernel or udev.

I've made some changes to several packages locally and rebuilt the installer initrd to reflect those changes, and I am now unable to reproduce it on -current 32bit. I'll do the same for 64bit soonish and test in a virtual machine, but I'd rather do this sort of test on real hardware. If/when I get to that point, are any of you willing to grab a new installer image and do that?
 
Old 03-20-2010, 02:09 AM   #5
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
http://connie.slackware.com/~rworkman/cryptsetup/

Burn 64.iso to a cdrom and boot it. See what happens.
If you install a system with it, you'll need to upgrade the six packages in pkg/ immediately after installing the system (especially the cryptsetup one - I think the old cryptsetup won't open luks devices formatted with new cryptsetup, but I won't swear to that). Obviously though, the most important thing to test is whether the problem is gone using the changed installer.
 
Old 03-20-2010, 05:17 AM   #6
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,601

Original Poster
Rep: Reputation: 142Reputation: 142
Hi Robby,

thanks a lot, this is really great support!

In my environment I could reproduce the bug in a running system, by connecting an external USB hard disk. It wasn't necessary to go back to boot or installation stage. Not sure, if it played a role, but all my USB disks are encrypted. I connected the device and looked what happened in /dev/mapper.

The problem went away in the meantime, with one of the recent upgrades for Slackware64-current. As far as I can tell, removing the old device-mapper package and upgrading to lvm2-2.02.62-x86_64-1 fixed it.

Or maybe some of these helped:

Code:
a/sysvinit-scripts-1.2-noarch-31.txz: Rebuilt.
       Don't warn about already mounted /proc, or already activated swap.
       Look for either tmpfs or devtmpfs when starting rc.udev.
a/udev-151-x86_64-1.txz: Upgraded.
a/usbutils-0.86-x86_64-1.txz: Upgraded.
But my (totally un-educated ) guess is, that it was simply a bug in the device mapper. I am only an end-user, though, and do not really know or understand a lot about these things.

gargamel

EDIT: Unfortunately I am bit short on time, these days, otherwise I would try to set up a system with your packages. If noone can do it in the next few days, I may be able to do it, but not immediately. (Need my machine for productive things...).

Last edited by gargamel; 03-20-2010 at 05:19 AM.
 
Old 03-23-2010, 02:24 PM   #7
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 374

Rep: Reputation: 55
Quote:
Originally Posted by gargamel View Post
Hi Robby,

The problem went away in the meantime, with one of the recent upgrades for Slackware64-current. As far as I can tell, removing the old device-mapper package and upgrading to lvm2-2.02.62-x86_64-1 fixed it.
In my case the problem still exists on latest -current with the lvm2 .62
udevd --debug shows that the link is created but it isn't.


Quote:
Originally Posted by rworkman View Post
http://connie.slackware.com/~rworkman/cryptsetup/

Burn 64.iso to a cdrom and boot it. See what happens.
Thank you for taking the time to test it. I have tested both the latest
-current and your 64.iso. Your image works fine.

Edit: I browsed your tree out of curiosity and tried some things.
I noticed that you removed a patch that hashed a line in rules.d
Code:
# ACTION=="add", ENV{STARTUP}!="1", NAME="", GOTO="dm_end"
When i unhashed this line on -current, then it worked again,
so i guess the culprit was some rule after this line.

Thank you again for solving it.

Last edited by imitheos; 03-23-2010 at 02:50 PM.
 
  


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
Encrypted root with LUKS on LVM and RAID-1: How? gargamel Suse/Novell 5 03-20-2010 04:30 PM
Slackware 12.2 + RAID-1 + LVM + LUKS encrypted root gargamel Slackware 35 12-17-2009 11:25 AM
slackware64 lvm/luks and mkinitrd for custom kernel chopp Slackware 19 08-25-2009 02:33 PM
Slackware64-current: Creation of LUKS encrypted partition segfaults titopoquito Slackware 16 08-16-2009 04:02 AM
Slackware64-current, KDE4.2.3: Pipe key not working in Konsole gargamel Slackware 5 05-22-2009 07:11 AM


All times are GMT -5. The time now is 09:11 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