alternate installer doesn't ask where to install GRUB and overwrites MBR which may contain other bootloaders

Bug #337957 reported by Antti Kaijanmäki
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
Triaged
High
Unassigned

Bug Description

Binary package hint: debian-installer

I installed kubuntu alpha5 from alternative CD on my laptop. MBR contained TrueCrypt bootloader and /dev/sda1 contains encrypted Windows XP installation. I decided to do a fully encrypted installation and created /boot on /dev/sda2 and crypto+lvm on /dev/sda5 containin root + swap. Installation proceeded after partitioning, but when it was time to install GRUB the installer didn't ask where I want it to be installed and it didn't detect my existing Windows installation. This resulted in GRUB being installed on MBR and overwriting my TC bootloader.

I had left some extra space to the hard drive so that I could do a second install, boot in /dev/sda3, crypto+lvm root and swap in /dev/sda6. On second install the installer didn't recognize Windows and not even earlier installed Kubuntu.

Tags: jaunty
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote : Re: [Jaunty] installer doesn't ask where to install GRUB and overwrites MBR which contains TrueCrypt Bootloader

Attaching logs from the second install. At least it should have detected the previous install on different partion, but it didn't.

description: updated
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :
Colin Watson (cjwatson)
Changed in os-prober:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

Looks like os-prober can't detect this (by TrueCrypt design). We might just have to make grub-installer have a more sophisticated check for whether we're alone on the disk - perhaps test for the presence of partitions we didn't create.

Changed in os-prober:
assignee: nobody → cjwatson
status: Confirmed → Triaged
Revision history for this message
Tiago Bello Torres (tiago-t-terra) wrote :

I've noticed a similar behavior in Kubuntu Jaunty Beta. The advanced installation window shows a drop-down box with a single option, which is installing GRUB in the MBR. I couldn't find a way to install the bootloader in a specific partition.

This issue was discussed in the following threads as well:

http://kubuntuforums.net/forums/index.php?topic=3102394.0
http://ubuntuforums.org/showthread.php?t=1123945

Revision history for this message
Tiago Bello Torres (tiago-t-terra) wrote :

I forgot to mention that I don't have TrueCrypt, just a standard multi-boot setup. I was trying to install GRUB in the Linux root partition (ext3), which was created by the Ubuntu installer.

summary: [Jaunty] installer doesn't ask where to install GRUB and overwrites MBR
- which contains TrueCrypt Bootloader
+ which may contain other bootloaders
Revision history for this message
mhi (martin-hinner) wrote : Re: [Jaunty] installer doesn't ask where to install GRUB and overwrites MBR which may contain other bootloaders

I have created this page http://martin.hinner.info/fs/truecrypt/ couple of months ago.

Grub-install destroyed my Win system-encrypted windows (it's bootloader). I have recovered it, however I wasn't able to boot to Linux using GRUB then. Problem was with overwritten track0 of my boot disk (where grub likely placed stage1.5).

I think it would enormously help if grub is not installed only in MBR, but also in boot sectors of / and /boot. Plus it should automatically save a copy of MBR and track0 (both separately!) to /boot/backup/mbr-date.bin and track0-date.bin. Having a backup is always a very good option!

Then you can put grub.bin (=boot from / partition) to BOOT.INI in Windows and boot it from there. Or install grub properly and switch between truecrypt and grub.

So solution for skilled people is to have grub not only in MBR and have install-time backup of mbr and track0.

Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

Just installed lucid beta1 on my laptop with the alternate installer and this bug is still present. Desktop installer let's me choose where to install grub under the "advanced settings". Alternate installer should let me do the same. Time to hunt down my truecrypt recovery cd again...

summary: - [Jaunty] installer doesn't ask where to install GRUB and overwrites MBR
+ alternate installer doesn't ask where to install GRUB and overwrites MBR
which may contain other bootloaders
Colin Watson (cjwatson)
Changed in grub-installer (Ubuntu):
assignee: Colin Watson (cjwatson) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.