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
mount /dev/cryptvg/root /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 ?
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.
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 ...
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:.
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.
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.
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.
I did that.
But after chrooting I see empty /proc and /sys directories and mkinitrd/lilo make usual warnings. :-(
Thanks to all of you - problem is solved - there was a mismatch in defining vmlinuz in /etc/lilo.conf .
|All times are GMT -5. The time now is 10:59 AM.|