Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I installed Fedora 14 first, then Ubuntu 10.04. I installed them using dm_crypt/aes256/lvm, so I used encrypted VolumeGroups. At the end of the Ubuntu install it said it cannot install GRUB, so I had to use SuperGRUBdisk to start Fedora and give the command:

# grub-install /dev/sda

Now I can boot to Fedora normally, without using supergrubdisk, but the problem is, I can't boot to Ubuntu!

Is there any working way to install Fedora 14 & Ubuntu 10.04 using (separated) encrypted VolumeGroups (each volumegroup with other password)? Such that 2 users (who knows the root passwords of their own distro) can use 1 PC but not see each other's files?

Update: I tried it in reverse order: I first installed the Ubuntu, then the Fedora. Fedora didn't gave error messages regarding grub when installing, but it's still the same: I can't see the Ubuntu in the "grub boot list", when booting the PC.

What could be the problem? The boot manager doesn't recongize that, that there is another distro on the HDD? Why? What should i do?

Update#2: Here is my idea on a picture :) (on other pict. host)

Update#3: I'm trying this whole thing in VirtualBox (VirtualBox-3.2-3.2.12_68302_fedora14-1.i686)

share|improve this question
    
nobody has ideas about this? :\ –  LanceBaynes Apr 16 '11 at 9:51
add comment

4 Answers

When using LVM or dm-crypt, I'd recommend a non-LVM non-dm-crypt boot partition. Just create a disk with a snall 100meg normal boot partition. Then allocate the rest of the disk to the encrypted LVM VG. I've also done this kind of set-up when using RAID. I create the first partition as RAID1 across all disks. Grub has no trouble booting since in RAID1 all disks are identical and look like a normal non-RAID disk (minus a small RAID superblock at the end of the partition) and the rest of the disk might be RAID5 with LVM and/or dm-crypt on top.

share|improve this answer
    
Your advice is a requirement with Grub 1; Grub 2 copes with LVM and nontrivial dm-raid modes including encryption just fine. Ubuntu 10.04 ships with Grub 2, but Fedora 14 with Grub 1. –  Gilles Apr 14 '11 at 23:09
    
but i did create a separated /boot partition for each distro, and the /boot's are not encrypted! –  LanceBaynes Apr 15 '11 at 6:05
1  
@johnny How far does Ubuntu get when booting? Did you run grub-install manually for Ubunut or Fedora? Can you boot up with an Ubuntu LiveCD and mount your Ubuntu partition? If you can try chrooting to your Ubuntu root directory and run grub-install. –  penguin359 Apr 16 '11 at 23:06
    
I updated the OP. –  LanceBaynes Apr 16 '11 at 23:14
    
@johnny Did Ubuntu boot before Fedora was installed? If so, I think I have an answer. –  penguin359 Apr 17 '11 at 0:03
add comment

The boot partition has to be bigger than 100 mb

I am using a boot partition of 100 mb and ubuntu 10.10 and as there constantly is published new kernel versions, the 100 mb is quickly used up.

A long time ago a 100 mb /boot was plenty but not now.

share|improve this answer
    
thank you for the answer but the boot partitions was: 256 and 270 MBytes in the two instances :\ –  LanceBaynes Apr 17 '11 at 9:21
add comment
up vote 1 down vote accepted

I manually edited the Fedoras /boot:
I appended a few things to the "/boot/grub/menu.lst"!!! and i could boot in to Ubuntu!

The Fedora's "/boot/grub/menu.lst" before editing it:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,2)
#          kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-LogVol01
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=0
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.35.6-45.fc14.i686)
    root (hd0,2)
    kernel /vmlinuz-2.6.35.6-45.fc14.i686 ro root=/dev/mapper/VolGroup-LogVol01 rd_LVM_LV=VolGroup/LogVol01 rd_LUKS_UUID=luks-af599498-b495-483f-bd1b-fb8d10c8b37a rd_LVM_LV=VolGroup/LogVol00 rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
    initrd /initramfs-2.6.35.6-45.fc14.i686.img

I appended this, and it worked:

title ubuntu
    root (hd0,0)
    kernel /vmlinuz-2.6.32-28-generic
    initrd /initrd.img-2.6.32-28-generic

Ok. But there are still two questions:
1) is this booting method ok? (i mean there are many things declared in the fedora's kernel line, and in the ubuntu kernel line, i had just wrote "vmlinuz-2.6.32-28-generic" - i couldn't just copy from the ubuntu's /boot/grub/menu.lst, because there is just grub.cfg..other syntax: http://pastebin.com/raw.php?i=b4DLweKv )

2) is this manual modification to the menu.lst permanent? Is it ok in long-term?
I mean if the ubuntu get's a kernel update, and ubuntu isn't handling/updating the boot manager (because fedora does it, if i install fedora lastly) - then how could the boot manager know, that ubuntu must boot with a new kernel?? or i have to find out what to write in the "kernel" and "initrd" line manually?

share|improve this answer
1  
I recommend having one of the Grubs chainload the other, rather than have it directly load the kernel. Don't modify menu.lst or grub.cfg manually, your modifications may/will be lost when a kernel upgrade comes in. In a nutshell, install the Fedora grub on a partition boot sector, and make the Ubuntu grub chainload it (it's easier to customize Ubuntu's Grub2 than Fedora's Grub1). –  Gilles Apr 17 '11 at 12:16
    
I think I found a Virtualbox bug :( - unix.stackexchange.com/questions/11518/… –  LanceBaynes Apr 17 '11 at 15:40
add comment

You can boot your grub2 Ubuntu from legacy grub like this:-

title Ubuntu
root (hd0,0)
kernel /boot/grub/core.img

That way you will still see the full Ubuntu grub2 menu which will be updated when the kernel updates.

share|improve this answer
    
that's the same I said. –  LanceBaynes Apr 17 '11 at 15:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.