1

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)

1
  • nobody has ideas about this? :\ Commented Apr 16, 2011 at 9:51

4 Answers 4

2

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.

5
  • 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. Commented Apr 14, 2011 at 23:09
  • but i did create a separated /boot partition for each distro, and the /boot's are not encrypted! Commented Apr 15, 2011 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. Commented Apr 16, 2011 at 23:06
  • I updated the OP. Commented Apr 16, 2011 at 23:14
  • @johnny Did Ubuntu boot before Fedora was installed? If so, I think I have an answer. Commented Apr 17, 2011 at 0:03
1

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?

2
  • 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). Commented Apr 17, 2011 at 12:16
  • I think I found a Virtualbox bug :( - unix.stackexchange.com/questions/11518/… Commented Apr 17, 2011 at 15:40
0

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.

1
  • thank you for the answer but the boot partitions was: 256 and 270 MBytes in the two instances :\ Commented Apr 17, 2011 at 9:21
0

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.

1
  • that's the same I said. Commented Apr 17, 2011 at 15:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.