LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   installed Jaunty (new partition)--now Hardy will not boot (crypto issue) (https://www.linuxquestions.org/questions/linux-software-2/installed-jaunty-new-partition-now-hardy-will-not-boot-crypto-issue-725291/)

Mountain 05-11-2009 05:23 PM

installed Jaunty (new partition)--now Hardy will not boot (crypto issue)
 
I wanted to keep my Hardy installation and install Jaunty on a separate partition. I did this, and Jaunty boots up, but Hardy will no longer boot up.

Before starting I got some advice here.
Quote:

Jaunty should find the other grub settings for 8.04 automatically and include it in the Jaunty bootloader. I just installed the beta alongside my intrepid install and it has all my grub settings.
I don't know about it working with encryption though.
Apparently this does not work when encryption is used...

Here is my status:
1. Jaunty boots fine and works as expected.
2. I can manually luksOpen and mount my Hardy root partition
3. I can manually luksOpen and mount my Hardy data partition
4. all the data is intact. Nothing was lost when installing Jaunty.

But Jaunty did alter things in /boot that make Hardy fail to boot up and I need to boot Hardy to work.
The error is:
Quote:

Starting up...
Loading, please wait...
Setting up cryptographic volume sda3_crypt (based on /dev/disk/by-uuid/snip-uuid-3e36c)
cryptsetup: failed to setup lvm device
[snip - typing by hand because not sure how to copy/paste]
Found volume group "vg1-lvHardyRoot" using metadata type lvm2
Found volume group "vg2-lvJauntyRoot_crypt" using metadata type lvm2
ALERT! does not exist. Dropping to a shell!
So far I have restored the Hardy-related stanzas for menu.lst according to the way they were in Hardy before the Jaunty install.

I also tried copying back initrd.img for 2.26.24-23 (Hardy) and booting from this grub menu selection, but that gives the exact same error message.

Any ideas what I can try?

amani 05-12-2009 09:51 AM

where is the /boot of hardy?

encrypted / do not boot

Mountain 05-12-2009 10:01 AM

my partitions:

/dev/sda1 63 61,448,624 61,448,562 8e Linux LVM
/dev/sda2 * 61,448,625 61,834,184 385,560 83 Linux
/dev/sda3 61,834,185 120,423,239 58,589,055 83 Linux
/dev/sda4 120,423,240 293,041,664 172,618,425 83 Linux

sda1 is Jaunty. It works. It boots from sda2.
sda2 is /boot (unencrypted, of course)
sda3 is Hardy (encrypted) - worked before installing Jaunty, boots from sda2 (same as Jaunty)
sda4 is just some data (mounted in Hardy) (encrypted)

Disillusionist 05-12-2009 10:09 AM

So sda2 is the /boot for Jaunty

You would need a seperate /boot partition for Hardy, I suspect this is the issue.

Do you have a backup of the original sda2 partition?

Mountain 05-12-2009 11:11 AM

Quote:

Originally Posted by Disillusionist (Post 3538328)
You would need a seperate /boot partition for Hardy

Really? I don't see why... (but I am far from an expert)

This guy (http://ubuntuforums.org/showpost.php...96&postcount=2) told me he did it without making a separate boot partition. (Anyway, I think that's what he was saying.)

Also this site (http://syrlug.org/contrib/grublinux.html) seems to indicate a single /boot partition is all that is required:

Quote:

A single Linux partition dedicated solely to controlling the GRUB configuration that allows a multi-boot environment.

ronlau9 05-12-2009 11:39 AM

What is contents of the menu.lst of jaunty ?

Mountain 05-12-2009 12:56 PM

1 Attachment(s)
Quote:

Originally Posted by ronlau9 (Post 3538411)
What is contents of the menu.lst of jaunty ?

The attached file was generated by boot_info_script when run from within Jaunty. It shows the menu.lst. At the point I ran the script I had slightly edited menu.lst.


The new entries look like this:
Code:

title        Ubuntu 9.04, kernel 2.6.28-11-generic
uuid        snip-uuid-27_27
kernel        /vmlinuz-2.6.28-11-generic root=/dev/mapper/vg2-lvJauntyRoot_crypt ro quiet splash
initrd        /initrd.img-2.6.28-11-generic
quiet

Obviously, that's OK for Jaunty, but not for Hardy. So I carefully changed the entries for the older kernels back to the way they were before:

Code:

title        Ubuntu 8.04.2, kernel 2.6.24-24-generic
root                (hd0,1)
kernel        /vmlinuz-2.6.24-24-generic /dev/mapper/vg1-lvHardyRoot ro quiet splash
initrd        /initrd.img-2.6.24-24-generic
quiet

At this point, all the menu.lst stanzas related to Hardy are exactly the same as they were before I installed Jaunty.

Let me know what other info you would like to see. I appreciate the help!

amani 05-13-2009 12:23 PM

check the filesystem in /boot

Did Jaunty create any symlinks in /boot? ... but it seems to be ok

anyway list files

Mountain 05-13-2009 12:28 PM

Quote:

Originally Posted by amani (Post 3539632)
check the filesystem in /boot

Do Jaunty create any symlinks in /boot? ... but it seems to be ok

anyway list files

/boot/ # ls -hogaR
.:
total 92M
drwxr-xr-x 4 32K 2009-05-11 17:52 .
drwxr-xr-x 28 4.0K 2009-05-12 15:32 ..
-rw-r--r-- 1 413K 2008-10-21 23:12 abi-2.6.24-21-generic
-rw-r--r-- 1 413K 2008-11-24 17:47 abi-2.6.24-22-generic
-rw-r--r-- 1 413K 2009-04-01 21:17 abi-2.6.24-23-generic
-rw-r--r-- 1 413K 2009-04-15 16:10 abi-2.6.24-24-generic
-rw-r--r-- 1 514K 2009-04-16 23:34 abi-2.6.28-11-generic
-rw-r--r-- 1 79K 2008-10-21 23:12 config-2.6.24-21-generic
-rw-r--r-- 1 79K 2008-11-24 17:47 config-2.6.24-22-generic
-rw-r--r-- 1 79K 2009-04-01 21:17 config-2.6.24-23-generic
-rw-r--r-- 1 79K 2009-04-15 16:10 config-2.6.24-24-generic
-rw-r--r-- 1 89K 2009-04-16 23:34 config-2.6.28-11-generic
-rwxrwxrwx 1 6.0K 2009-03-27 20:27 fstab_fdisk.notes.txt
drwxr-xr-x 2 1.0K 2009-05-11 17:54 grub
-rw-r--r-- 1 8.0M 2009-04-09 23:15 initrd.img-2.6.24-21-generic
-rw-r--r-- 1 8.0M 2009-04-09 19:17 initrd.img-2.6.24-21-generic.bak
-rw-r--r-- 1 8.0M 2009-04-09 23:15 initrd.img-2.6.24-22-generic
-rw-r--r-- 1 8.0M 2009-04-09 19:17 initrd.img-2.6.24-22-generic.bak
-rw-r--r-- 1 8.0M 2009-04-20 18:38 initrd.img-2.6.24-23-generic
-rw-r--r-- 1 8.0M 2009-04-09 23:14 initrd.img-2.6.24-23-generic.bak
-rw-r--r-- 1 8.0M 2009-05-11 17:18 initrd.img-2.6.24-24-generic
-rw-r--r-- 1 8.0M 2009-05-08 12:34 initrd.img-2.6.24-24-generic.bak
-rw-r--r-- 1 8.4M 2009-05-11 16:04 initrd.img-2.6.28-11-generic
drwx------ 2 12K 2008-03-26 12:29 lost+found
-rw-r--r-- 1 126K 2009-03-27 16:12 memtest86+.bin
-rw-r--r-- 1 885K 2008-10-21 23:12 System.map-2.6.24-21-generic
-rw-r--r-- 1 885K 2008-11-24 17:47 System.map-2.6.24-22-generic
-rw-r--r-- 1 885K 2009-04-01 21:17 System.map-2.6.24-23-generic
-rw-r--r-- 1 885K 2009-04-15 16:10 System.map-2.6.24-24-generic
-rw-r--r-- 1 1.8M 2009-04-16 23:34 System.map-2.6.28-11-generic
-rw-r--r-- 1 1.2K 2009-04-16 23:39 vmcoreinfo-2.6.28-11-generic
-rw-r--r-- 1 1.9M 2008-10-21 23:12 vmlinuz-2.6.24-21-generic
-rw-r--r-- 1 1.9M 2008-11-24 17:47 vmlinuz-2.6.24-22-generic
-rw-r--r-- 1 1.9M 2009-04-01 21:17 vmlinuz-2.6.24-23-generic
-rw-r--r-- 1 1.9M 2009-04-15 16:10 vmlinuz-2.6.24-24-generic
-rw-r--r-- 1 3.4M 2009-04-16 23:34 vmlinuz-2.6.28-11-generic

./grub:
total 230K
drwxr-xr-x 2 1.0K 2009-05-11 17:54 .
drwxr-xr-x 4 32K 2009-05-11 17:52 ..
-rw-r--r-- 1 197 2009-05-11 01:06 default
-rw-r--r-- 1 15 2008-03-26 13:01 device.map
-rw-r--r-- 1 8.1K 2009-05-11 01:06 e2fs_stage1_5
-rw-r--r-- 1 7.7K 2009-05-11 01:06 fat_stage1_5
-rw-r--r-- 1 16 2009-05-11 01:06 installed-version
-rw-r--r-- 1 8.6K 2009-05-11 01:06 jfs_stage1_5
-rw-r--r-- 1 6.2K 2009-05-11 01:06 menu (copy).lst
-rw-r--r-- 1 4.8K 2009-05-11 17:54 menu.lst
-rw-r--r-- 1 6.0K 2009-05-11 15:08 menu.lst~
-rw-r--r-- 1 7.2K 2009-05-11 01:06 minix_stage1_5
-rw-r--r-- 1 9.6K 2009-05-11 01:06 reiserfs_stage1_5
-rw-r--r-- 1 512 2009-05-11 01:06 stage1
-rw-r--r-- 1 119K 2009-05-11 01:06 stage2
-rw-r--r-- 1 9.4K 2009-05-11 01:06 xfs_stage1_5

./lost+found:
total 45K
drwx------ 2 12K 2008-03-26 12:29 .
drwxr-xr-x 4 32K 2009-05-11 17:52 ..

Mountain 05-15-2009 03:27 PM

Anyone see anything wrong? I'm still banging my head over this.

Mountain 05-16-2009 09:37 AM

I just want to let everyone know that I'm still looking for a solution...

Mountain 05-22-2009 02:56 PM

...still looking...

ronlau9 05-22-2009 11:32 PM

Quote:

Originally Posted by Mountain (Post 3549658)
...still looking...

Is the menu.lst of hardy crypted or not ?
If it is not crypted what happens if you call the menu.lst from hardy
from within the menu.lst form Jaunty
Example
title Hardy
root (hd0,?) where ? is the partition of the grub of hardy
configfile /boot/grub/menu.lst

Mountain 05-23-2009 10:41 AM

Quote:

Originally Posted by ronlau9 (Post 3549916)
Is the menu.lst of hardy crypted or not ?

No, it is not encrypted. It is on /boot/grub

Quote:

Originally Posted by ronlau9 (Post 3549916)
what happens if you call the menu.lst from hardy
from within the menu.lst form Jaunty?

I only have one menu.lst.
It contains entries like this for Jaunty:
Code:

title        Ubuntu 9.04, kernel 2.6.28-11-generic
uuid        snip-uuid-27_27
kernel        /vmlinuz-2.6.28-11-generic root=/dev/mapper/vg2-lvJauntyRoot_crypt ro quiet splash
initrd        /initrd.img-2.6.28-11-generic
quiet

And it contains other entries like this for Hardy:
Code:

title        Ubuntu 8.04.2, kernel 2.6.24-24-generic
root                (hd0,1)
kernel        /vmlinuz-2.6.24-24-generic /dev/mapper/vg1-lvHardyRoot ro quiet splash
initrd        /initrd.img-2.6.24-24-generic
quiet

If I select a Jaunty entry, the system boots up. But I get an error when I select a Hardy entry.

Both Jaunty and Hardy share the same /boot partition, so /boot/grub is exactly the same. But /boot contains the correct initrd.img-* files for Jaunty and Hardy.

ronlau9 05-23-2009 01:29 PM

Quote:

Originally Posted by Mountain (Post 3550332)
No, it is not encrypted. It is on /boot/grub



I only have one menu.lst.
It contains entries like this for Jaunty:
Code:

title        Ubuntu 9.04, kernel 2.6.28-11-generic
uuid        snip-uuid-27_27
kernel        /vmlinuz-2.6.28-11-generic root=/dev/mapper/vg2-lvJauntyRoot_crypt ro quiet splash
initrd        /initrd.img-2.6.28-11-generic
quiet

And it contains other entries like this for Hardy:
Code:

title        Ubuntu 8.04.2, kernel 2.6.24-24-generic
root                (hd0,1)
kernel        /vmlinuz-2.6.24-24-generic /dev/mapper/vg1-lvHardyRoot ro quiet splash
initrd        /initrd.img-2.6.24-24-generic
quiet

If I select a Jaunty entry, the system boots up. But I get an error when I select a Hardy entry.

Both Jaunty and Hardy share the same /boot partition, so /boot/grub is exactly the same. But /boot contains the correct initrd.img-* files for Jaunty and Hardy.

Yes that what you and I did different I have install Jaunty and Hardy on two different partitions and Hardy GRUB and Menu.lst is on his OWN partitions.
And even Jaunty do recognize Hardy I call Hardy Menu.lst to boot up from
Jaunty .
Let say I was NOT in favor to use the SAME boot partition


All times are GMT -5. The time now is 01:25 AM.