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 05-08-2017, 06:17 AM   #1
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32
Posts: 320

Rep: Reputation: 24
Upgrading to current (32-bit, Luks,Lvm) problem


I've just tried to upgrade to current today, as I did succesfully multiple times earlier. I issued a mknitrd command with actual kernel nr prefix:

mkinitrd -c -k 4.9.26-smp -m ext4 -f ext4 -r /dev/cryptvg/root -C /dev/sda2 -L

after that I ran lilo, of course without errors.
At reboot some unusual errors started like below:

"Kernel panic - not syncing: VFS: unable to mount root fs on unknown block (253,1)"

After that tried to get into my sda1 and sda2 using rebooting via a Slackware pen-drive.
I mounted properly sda1 as "/mnt/boot", but I cannot mount sda2 even issuing this sequence:

- cryptsetup luksOpen /dev/sda2 (ask for password, I typed it)
- vgscan --mknodes
- vgchange -ay
- mkswap /dev/cryptvg/swap
and mount /dev/sda2 /mnt/sda2 finally yields this:
"unknown filesystem type 'crypto_LUKS'"

Where is the problem ?

The system is on the SSD Samsung 850 PRO 512gb disc which I simply copied into it some months ago from well-functioning Slackware HDD.
previous HDD
 
Old 05-08-2017, 09:22 AM   #2
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 347

Rep: Reputation: 190Reputation: 190
What's in your /etc/lilo.conf?

Your mkinitrd command line looks OK to me, but some of your steps trying to mount partitions on LVM are incorrect or not needed at all:
  • You shouldn't need to run vgscan --mknodes, vgchange -ay should be enough to activate volume group.
  • mkswap is used to set up swap on a partition, you only need it to run once when setting up your partitions.
  • "mount /dev/sda2 /mnt/sda2" won't work, because /dev/sda2 is a LUKS container inside of which is a LVM physical volume (PV). What you need is something like mount /dev/cryptvg/root /mnt/foobar where cryptvg is your volume group (VG) and root is a name of logical volume (LV). You can see all LVs by running lvs.
 
1 members found this post helpful.
Old 05-08-2017, 01:32 PM   #3
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32
Posts: 320

Original Poster
Rep: Reputation: 24
Well, I entered my encrypted root filesystem and chrooted into it.
But a problem remains when I invoke a mkinitrd command - an info is displayed:

cat: /proc/partitions : No such file or directory does not exist,

Lilo gives that:

/proc/partitions does no exist disk scan bypassed
Fatal: Illegal 'root=' specification: /dev/cryptvg/root

Here are the exact commands I entered:
1. cryptsetup luksOpen /dev/sda2 cryptroot
2. vgchange -ay
3. lvs & pvs
4. mkdir /mnt/cryptroot
5. mount /dev/cryptvg/root /mnt/cryptroot
6. chroot /mnt/cryptroot
7. mount /dev/sda1 /boot
8. mkinitrd -c -k 4.9.26-smp -m ext4 -f ext4 -r /dev/cryptvg/root -C /dev/sda2 -L
9. /sbin/lilo

Lilo.conf contains (as always):

boot = /dev/sda
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/cryptvg/root
Label = Linux
read-only

Last edited by brodo; 05-08-2017 at 01:45 PM.
 
Old 05-08-2017, 02:34 PM   #4
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 347

Rep: Reputation: 190Reputation: 190
After mounting your root partition and before chrooting into it, you should mount --bind /proc, /dev and /sys (one of them is not required, just don't remember which one, and mounting all of them won't hurt). I think mounting /dev/sda1 before chroot would be a good idea, too. So, it would look as follows:
Code:
mkdir /mnt/cryptroot
mount /dev/cryptvg/root /mnt/cryptroot
mount --bind /dev /mnt/cryptroot/dev
mount --bind /proc /mnt/cryptroot/proc
mount --bind /sys /mnt/cryptroot/sys
mount /dev/sda1 /mnt/cryptroot/boot
chroot /mnt/cryptroot
Your lilo.conf seems to be normal, I just don't have any at hand to compare it to yours, both of my machines with LUKS+LVM use elilo instead.

Can you post your /etc/fstab?

Does your system have another storage device? If the answer is yes, it's possible that on boot they could switch places depending on which one is probed first by kernel, so your SSD could be seen as /dev/sdb. In such case you'd need to refer to it using UUID.
 
1 members found this post helpful.
Old 05-08-2017, 03:06 PM   #5
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32
Posts: 320

Original Poster
Rep: Reputation: 24
Your latest advice worked well, the problem is gone.
Thanks a lot !!!
 
  


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
[SOLVED] No sound in 32-bit applications after upgrading -current and multilib ahc_fan Slackware 2 11-15-2015 01:50 PM
[SOLVED] Upgrading 14.0 to 14.1 with encrypted disks (LUKS+LVM) metageek Slackware 8 11-15-2013 02:36 AM
Checking for Encryption Leaks/Weaknesses (CentOS 6.2 64-bit, LVM & LUKS) mrcrilly Linux - Security 2 06-17-2012 02:48 PM
[SOLVED] Fresh Slackware64-current RAID-1 + LVM + LUKS: pvcreate not working gargamel Slackware 6 03-23-2010 02:24 PM
Any Problem After Upgrading to -current? willysr Slackware 9 04-19-2006 11:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:24 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration