LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 12-27-2012, 07:26 PM   #1
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Rep: Reputation: 30
almost upgraded ext4 LUKS and LVM to 3.7.1, but missing /proc/partitions ...


Well, I (almost) upgraded my encryped LUKS/LVM ext4 volumes to the latest current 3.7.1-smp kernel, but rebooting failed.

The action after booting from 13.37 pendrive was as follows:

cryptsetup luksOpen /dev/hda2 slackluks
vgscan --mknodes
vgchange -ay
mkswap /dev/cryptvg/swap

mount /dev/cryptvg/root /root
chroot /root
Next I mounted /dev/sda1 as /boot and issued:

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

then mkinitrd and lilo warned about non existing /proc/partitions file.
Rebooting failed. Why ?

How to pass the proper content of the /proc/partitions file into the chrooted environment ?
 
Old 12-27-2012, 07:37 PM   #2
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
mount --bind /proc /root/proc

BUT, I for one, I will want to mount an temporary mountpoint into /mnt/tmp or /mnt from an installation system, instead of /root.

Last edited by Darth Vader; 12-27-2012 at 07:41 PM.
 
Old 12-28-2012, 03:54 AM   #3
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
Well, I did that, but no luck ...
Rebooting lands only on "BIOS data check successful" message at boot, not going forward as it always did.

In the meantime I copied the content of the /proc/partitions into the text file named "partitions" and placed it after chrooting directly into the already empty /proc directory.
That way, both mkinitrd and lilo seemed to be working properly, issuing typical messages.

But rebooting machine stopped at "BIOS data check successful" again ...
 
Old 12-28-2012, 06:53 AM   #4
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
For using an encrypted root filesystem you need an separate /boot partition, which is not encrypted.

The BIOS boot loader is not capable directly to use an encrypted device as boot device. The "problem" is common also to Windows (7/8), which use an separate boot partition (aka system partition) with 100MB size, for be able to boot an encrypted disk C:.
 
Old 12-28-2012, 08:04 AM   #5
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
I have a separated and unencrypted /dev/sda1 as boot partition!

My LVM/Luks combination on the older machine worked like a charm for several years, surviving lots of kernel upgrades including the 3.7.1 one.
The one difference is that it uses ext3 as a main filesystem.

My newer LVM/Luks machine uses ext4 and I have an upgrading problem with it.
 
Old 12-28-2012, 08:11 AM   #6
Stephen Morgan
Member
 
Registered: Feb 2011
Location: England
Distribution: Slackware
Posts: 164

Rep: Reputation: 19
Shouldn't /dev/hda be /dev/sda?

You also need to mount --bind /proc /root/proc, and the same with /dev and /sys, before chroot. Then mount your /boot partition.

Can't install lilo if you haven't bound /dev to /root/dev, certainly.

Last edited by Stephen Morgan; 12-28-2012 at 08:12 AM.
 
Old 12-28-2012, 09:22 AM   #7
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
Of course, we're talking about /dev/sda, not the hda - it is a typo from ancient times ...
All I entered was certainly /dev/sda based, otherwise nothing could be done.

For now, I'll try this:

1. mount --bind /proc /root/proc, and the same with /dev and /sys, before chroot.
2. after chroot - mount /boot partition.

We'll see what happens, but upgrading my older ext3 based LVM/Luks machine didn't need these steps at all.
 
Old 12-28-2012, 11:49 AM   #8
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
I did that.
But after chrooting I see empty /proc and /sys directories and mkinitrd/lilo make usual warnings. :-(
 
Old 12-28-2012, 04:27 PM   #9
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
Thanks to all of you - problem is solved - there was a mismatch in defining vmlinuz in /etc/lilo.conf .
 
  


Reply



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
Lvm+luks siddartha Linux - Newbie 1 01-10-2013 09:18 PM
LUKS on LVM musiqdefunk Linux - Newbie 3 08-11-2012 05:07 AM
EXT4 goes kaput, had luks NukeRpm Linux - Newbie 1 01-01-2012 06:09 AM
Luks/Lvm after dd duplication brodo Slackware 10 03-12-2009 03:56 PM
Resize ext4 partition with LUKS encryption wsduvall Linux - Software 1 03-09-2009 10:14 AM

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

All times are GMT -5. The time now is 10:55 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
Open Source Consulting | Domain Registration