LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-07-2009, 03:24 PM   #1
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current
Posts: 187

Rep: Reputation: 17
Luks/Lvm after dd duplication


Hello,

Using the simplest dd command I duplicated my HDD (with combined Luks/Lvm encryption) to another one with the same capacity but from another maker.

Now I cannot reach a password prompt while booting from this new HDD.
It is connected via SATA/USB converter.
First three modules - mbcache, jbd, ext3 from initrd are loaded but there is error saying that:
mounting /dev/cryptvg/root on /mnt failed: No such file or directory....

At this point there is simple shell available but I cannot properly use fdisk nor cryptsetup - both cannot see any /dev/sda* device.

How can I fix that ?

Booting from pendrive with latest Slackware gives me possibility to enter my Luks password to this HDD and chroot later to the real data on it.
Reissuing mkinitrd with lilo after chrooting does not help as I thought it would.

What else could be broken during dd copying ?
 
Old 03-07-2009, 04:46 PM   #2
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.1 64bit
Posts: 735
Blog Entries: 3

Rep: Reputation: 81
Hello,

When you boot with pendrive, to which device is your new HDD attached: /dev/sda1 or another?

It could be that your HDD is not recognized as the same /dev/sd* as your previous HDD was recognised.
 
Old 03-08-2009, 05:49 AM   #3
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current
Posts: 187

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by gegechris99 View Post
Hello,

When you boot with pendrive, to which device is your new HDD attached: /dev/sda1 or another?

It could be that your HDD is not recognized as the same /dev/sd* as your previous HDD was recognised.
Using pendrive, the new HDD is seen as /dev/sda1 and /dev/sda3 because there are 2 partitions on it.
Pendrive gets /dev/sdb1 and /dev/sdb2.

When booting from this HDD itself there are no /dev/sda* nor /dev/sdb* devices assigned at all.
Seems like mkinitrd issued from this new HDD (exactly the same long command that worked on older HDD) lacks something vital. Lilo, of course, was executed too.
Maybe some modules at start-up are not loaded ?
 
Old 03-09-2009, 04:32 PM   #4
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.1 64bit
Posts: 735
Blog Entries: 3

Rep: Reputation: 81
Thumbs down

Quote:
Originally Posted by brodo View Post
mounting /dev/cryptvg/root on /mnt failed: No such file or directory....
I'm not sure I understand how your HDD is partitioned. Please post the content of /etc/fstab and the result of command (run as root):

Code:
fdisk -l
According to the README_CRYPT.TXT file, in case of an encrypted root filesystem:

Quote:
* Be sure to create a small partition which you leave *unencrypted*. Tell
the installer to mount it under '/boot'.
 
Old 03-10-2009, 08:17 AM   #5
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current
Posts: 187

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by gegechris99 View Post
I'm not sure I understand how your HDD is partitioned. Please post the content of /etc/fstab and the result of command (run as root):

Code:
fdisk -l
According to the README_CRYPT.TXT file, in case of an encrypted root filesystem:

1. When booted FROM SLACKWARE PENDRIVE, fdisk gives me this info about NEW HDD:

/dev/sda1 * 1 1111 8924076 83 Linux
/dev/sda3 * 1 30401 235271925 83 Linux

what is the about same as OLD HDD booting properly.
It is connected via Sata/Usb interface only because there's no way to connect it directly - it cannot fit into the slot designed for 9mm thick discs as it has "weird" 12mm.

One curiosity - invoking fdisk at 1st time gives me en error stating there's no /dev/sda* devices. Running fdisk 2nd time seconds later seems working well with proper device recognition.

2. When booted from NEW HDD itself there's no devices /dev/sda* assigned at all. From shell I can invoke fdisk or cryptsetup, but without devices no further progress can be made. Quite opposite to OLD HDD proper booting action :-(

Seems like simple dd disc copying did not duplicate all functionality with regard to booting/Luks/Lvm behaviour.
NEW HDD = Fujitsu 250GB, OLD HDD = Samsung 250GB.
 
Old 03-10-2009, 06:19 PM   #6
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.1 64bit
Posts: 735
Blog Entries: 3

Rep: Reputation: 81
Hello Brodo,

I'm assuming /dev/sda1 would be your /boot partition.

As I requested in my previous post, please post /etc/fstab because according to the error message, it seems that the boot process wants to mount your root partition to /mnt.

It will also not hurt if you post the content of /etc/lilo.conf so that we have a full picture of how the boot process should happen.
 
Old 03-10-2009, 07:16 PM   #7
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current
Posts: 187

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by gegechris99 View Post
Hello Brodo,

I'm assuming /dev/sda1 would be your /boot partition.
As I requested in my previous post, please post /etc/fstab because according to the error message, it seems that the boot process wants to mount your root partition to /mnt.
It will also not hurt if you post the content of /etc/lilo.conf so that we have a full picture of how the boot process should happen.
It didn't hurt me at all to bring you both contents

/dev/cryptvg/swap swap swap defaults 0 0
/dev/cryptvg/root / ext3 defaults 1 1
/dev/cryptvg/home /home ext3 defaults 1 2
/dev/sda1 /boot ext3 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0



# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section

boot = /dev/sda
append=" vt.default_utf8=0"
prompt
timeout = 50

# VESA framebuffer console @ 1024x768x256
vga = 773

# Linux bootable partition config begins
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/cryptvg/root
label = Linux
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
 
Old 03-11-2009, 04:51 AM   #8
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.1 64bit
Posts: 735
Blog Entries: 3

Rep: Reputation: 81
Hello Brodo,

Your configuration files look OK to me.

Quote:
It is connected via Sata/Usb interface only because there's no way to connect it directly - it cannot fit into the slot designed for 9mm thick discs as it has "weird" 12mm.
Maybe you have a connection issue. You also said that fdisk works the second time. Did you recheck your HDD connection (maybe plug/unplug it).

Also to check further, is there a way for you to get the log of the boot process (ex: dmesg) so you can post it.
 
Old 03-12-2009, 06:05 AM   #9
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.1 64bit
Posts: 735
Blog Entries: 3

Rep: Reputation: 81
Hello,

Another idea because you have a SATA/USB interface:

Maybe some kernel modules (ex: USB) are not loaded by the initrd.gz image file during the boot.

You can check that idea by trying to boot with a huge kernel on your new HDD. If it works, then you need to identify which modules need to be loaded (for ex, by comparing 'lsmod' results when booting with error and when booting with pendrive) and rebuild the initrd.gz image accordingly.
 
Old 03-12-2009, 08:10 AM   #10
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware 14.1
Posts: 467

Rep: Reputation: 89
Brodo,

I appreciate that it is very unlikely, but it is possible to boot with the Huge Kernel?

Chris

Last edited by ChrisAbela; 03-12-2009 at 08:14 AM.
 
Old 03-12-2009, 04:56 PM   #11
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current
Posts: 187

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by gegechris99 View Post
Hello,

Another idea because you have a SATA/USB interface:

Maybe some kernel modules (ex: USB) are not loaded by the initrd.gz image file during the boot.

You can check that idea by trying to boot with a huge kernel on your new HDD. If it works, then you need to identify which modules need to be loaded (for ex, by comparing 'lsmod' results when booting with error and when booting with pendrive) and rebuild the initrd.gz image accordingly.
Just now I tried to boot my laptop using quite another HDD (normally bootable) connected through sata/usb bridge. The result is the same !
Your idea seems to be right so I must identify proper lacking module.
Or to try huge kernel.

At first I must check all readmes/howtos from Pat.
Maybe the doors are already open :-) ?
 
  


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
Slackware 12.2 + RAID-1 + LVM + LUKS encrypted root gargamel Slackware 35 12-17-2009 12:25 PM
How secure LUKS/LVM disk encryption really is? <Ol>Origy Linux - Security 14 03-09-2009 01:09 PM
New kernel and existing Luks/Lvm ? brodo Slackware 3 09-14-2008 10:44 AM
Slackware 12.1, LUKS, LVM on external HD. How? randomsel Slackware - Installation 7 06-26-2008 07:35 PM
luks cryptsetup and lvm question ruzzed Linux - Software 3 09-16-2007 08:21 PM


All times are GMT -5. The time now is 11:39 AM.

Main Menu
Advertisement
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