LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (http://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Combining LUKS and LVM... LILO fails to boot (http://www.linuxquestions.org/questions/slackware-installation-40/combining-luks-and-lvm-lilo-fails-to-boot-812265/)

STDOUBT 06-05-2010 01:49 AM

Combining LUKS and LVM... LILO fails to boot
 
Trying to install
Using slackware64 DVD 13.1, install goes fine, but LILO won't boot
and there is no error. My system simply can't see anything to boot.
(No LILO error)

Following the directions in README_CRYPT.TXT,
I make a smallish boot partition (/dev/sde1)
and use the rest of the disk (/dev/sde2) as LVM
with three volumes; root, home, and swap.

The creation of the LVM and the installation of
packages seems to go fine. LILO seems to install just fine to MBR
on /dev/sde.

After the chroot, and making the initrd (which seems to go fine)
and editing /etc/lilo.conf to

Code:

image = /boot/vmlinuz-generic-2.6.33.4
  initrd = /boot/initrd.gz
  root = /dev/cryptvg/root
  label = linux
  read-only

(for some reason there is no vmlinuz-generic-smp-2.6.33.4-smp on my installed system like the directions say)
...I save, run lilo, and ctrl+alt+del to reboot. Then nothing happens.
No boot message at all.

So, questions:
1) Is my LVM partition (/dev/sde2) supposed to be flagged "bootable" ala fdisk?
1a) If so, is the boot partition (/dev/sde1) supposed to also be bootable?

2) When "liloconfig" asks where to install to MBR, should I change the default "/dev/sde" to "/dev/sde1" <---<<< AKA the unencrypted boot partition??

3)"Warning: The boot sector and map file are on different disks"
Is this one of the LILO warnings that is "safe to ignore" per the instructions in README_CRYPT.TXT ??

Also,
Code:

/dev/cryptvg/root  /   
/dev/cryptvg/home  /home
/dev/sde1          /boot

..and I have selected to mount /dev/sde1 on "/boot"
(A regular install with no LVM went perfectly on this same hardware)

Many thanks for the guidance of a guru!

STDOUBT 06-06-2010 02:37 PM

Well, thanks for looking, all 94 of you.
I finally got it to work by following an
amalgamation of tips and instructions
elsewhere on LQ. What I did was :

1) finished the install as directed in README_CRYPT.TXT
2) configed LILO like the instructions said then ran
3) vgscan --mknodes and vgchange -ay *while still in the
chroot*
3a) re-ran the mkinird -c -k etc, command
4) then I ran "liloconfig" manually, and chose the "simple"
install of LILO.
5) edited my /etc/lilo.conf (which was missing the boot
parameter and other things --it looked mangled).
6) ran lilo, noticed the warnings didn't seem so dire this time,
and rebooted. No fancy boot pic, but it works!
Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
lba32 # Allow booting past 1024th cylinder with a recent BIOS
#
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sde
delay = 5
# VESA framebuffer at 1024x768x256
vga = 773
# End LILO global section
# Linux root partition section
initrd = /boot/initrd.gz
image = /boot/vmlinuz-generic-2.6.33.4
root = /dev/darkstar/root
label = Linux
read-only
# End root Linux partition section


halvy 06-06-2010 03:00 PM

Quote:

Originally Posted by STDOUBT (Post 3993085)
Trying to install
Using slackware64 DVD 13.1, install goes fine, but LILO won't boot
and there is no error. My system simply can't see anything to boot.
(No LILO error)

Following the directions in README_CRYPT.TXT,
I make a smallish boot partition (/dev/sde1)
and use the rest of the disk (/dev/sde2) as LVM
with three volumes; root, home, and swap.

The creation of the LVM and the installation of
packages seems to go fine. LILO seems to install just fine to MBR
on /dev/sde.

After the chroot, and making the initrd (which seems to go fine)
and editing /etc/lilo.conf to

Code:

image = /boot/vmlinuz-generic-2.6.33.4
  initrd = /boot/initrd.gz
  root = /dev/cryptvg/root
  label = linux
  read-only

(for some reason there is no vmlinuz-generic-smp-2.6.33.4-smp on my installed system like the directions say)
...I save, run lilo, and ctrl+alt+del to reboot. Then nothing happens.
No boot message at all.

So, questions:
1) Is my LVM partition (/dev/sde2) supposed to be flagged "bootable" ala fdisk?
1a) If so, is the boot partition (/dev/sde1) supposed to also be bootable?

2) When "liloconfig" asks where to install to MBR, should I change the default "/dev/sde" to "/dev/sde1" <---<<< AKA the unencrypted boot partition??

3)"Warning: The boot sector and map file are on different disks"
Is this one of the LILO warnings that is "safe to ignore" per the instructions in README_CRYPT.TXT ??

Also,
Code:

/dev/cryptvg/root  /   
/dev/cryptvg/home  /home
/dev/sde1          /boot

..and I have selected to mount /dev/sde1 on "/boot"
(A regular install with no LVM went perfectly on this same hardware)

Many thanks for the guidance of a guru!

hay man.. I have not used lilo in quite some time because well i have no need to ..

I use the older grub (0.97-64 legacy version NOT the new 2.0 (because it is horribly buggy).

I just started using luks/dm-crypt.. and it took me a few daze also to get used to it.

If you are booting from a ext4 filesys.. then that could be an issue.. it is with legacy grub.

The whole process is quirky to say the least.. but I got it going eventually.

I know the updating of the initrd is important.. i just rename mine: initrd.img-2.6.32-4-amd64-mylinux (replace the mylinux with your host name or whatever). This is to keep track of which initrd goes with which partition/os.

Keeping the original initrid is helpful in case you want to roll back and try it as well.

As far as your: root = /dev/cryptvg/root ..well I use /dev/mapper/... as my line. I am not sure where you read that using cryptvg is good.. all though I am not using lvm.

If you mean by LVM.. you are using 'logical' drives ONLY.. that may be a glitch.. even tho it may not be well documented.

And on the set the partition for 'boot'.. well I think that is only for dos/ntfs sys... but I am not positive. I do not believe that Linux cares about that.. especially if you are using grub.. where you tell it specifically where the boot files are.. and where you put the actual grub program to be stored (ie. mbr.. or sdaX..etc).

Well good luck.. lettuce know :)

Thom1b 06-07-2010 06:17 AM

What's your "mkinitrd" command STDOUBT ?

Oops, already solved !

STDOUBT 06-10-2010 09:58 PM

Quote:

What's your "mkinitrd" command STDOUBT ?
In the name of Completeness:

Code:

# mkinitrd -c -k 2.6.33.4 -m ext3 -f ext3 -r /dev/darkstar/root -C /dev/sde2 -L
Note the absence of the "smp" suffix. And yes, my LVM is called darkstar ;-)


All times are GMT -5. The time now is 06:36 AM.