[Bug 979971] [NEW] grub install to partition fails with 12.04 alternate & LUKS multiboot setup

Launchpad Bug Tracker 979971 at bugs.launchpad.net
Thu Apr 12 16:43:24 UTC 2012


You have been subscribed to a public bug:

[A lot about this is at
https://answers.launchpad.net/ubuntu/+source/grub2/+question/193122 but
I'm now fairly convinced that it's a bug, not something I'm doing
wrong.]

I'm installing 12.04 alternate onto a Toshiba Satellite L750-170.  I
want to set things up with a multiboot configuration with a Truecrypt
encrypted Windows 7 installation and a LUKS/LVM installation of Unbuntu
that is also encrypted.  That means that I can't let Ubuntu write the
grub2 menu to the MBR of /dev/sda as it would destroy the Truecrypt
bootloader there.  It's clear from various pages on the internet that
earlier versions of Ubuntu (and other Linuces I think) have been fine
for this.  You installed the grub menu to a separate /boot partition
(that may no longer be necessary as I think grub2 is LUKS/LVM aware but
I haven't risked that), you let Truecrypt load but don't enter the
passphrase to boot to encrypted windoze, just hit Esc and the Truecrypt
bootloader hands off the booting and my understanding is that it should
then find the grub entry on /dev/sda5 (say) and boot fine.  At least,
it's clear that that worked for several people with earlier versions of
Ubuntu.

What happens now is this:
1) I know that U12.04 installs fine before I Truecrypt encrypted the windoze system partition: grub2 installed the menu to the MBR and windoze and Unbuntu booted fine so I know that Ubuntu is fairly happy on the Toshiba
2) HOWEVER, if I ask the U12.04 installation to ask to a 2Gb small partition on either /dev/sda3 or /dev/sda5 (I've tried both) it simply refuses (*** I think this is bug #1 here as I _think_ it may actually have succeeded in doing the installation but is locking on the warnings, alternatively, it may have failed to use the --force option to override the warnings, either is a bug to my mind ***)
3) IF I use the rescue disc approach and try to force grub to install to /dev/sda5 from a root console I get the warning messages but the grub that gets installed doesn't work (more below)
4) when I say it doesn't work, what I mean is that the Truecrypt hand over just locks the machine saying:
   "Error: No bootable partition found".  I appreciate that this may be a bug in Truecrypt but there are still bugs in the Ubuntu/grub combination  because ...
5) One way that I heard I could rescue things was to use Boot Repair it simply won't show me options to move grub.cfg etc. to any partition but only to rewrite the MBR (which will kill the Truecrypt encrypted windoze)
6) I also found about Super Grub2 Disk (www.supergrubdisk.org) ... this helped me identify a few more things that make me think there are bugs in U12.04/grub since ...
7) it finds the grub.cfg on /dev/sda5 fine showing me three menu lines: linux, linux rescue and windows 7
8) linux rescue boots me into single user root OK after prompting correctly for the LUKS passphrase
9) plain linux just locks with a black screen ... but
10) if I remove "quiet splash vt.handoff=7" from 
 linux /vmlinuz-3.2.0-20-generic-pae root=/dev/mapper/sda5_crypt-root ro quiet splash vt.handoff=7
I get a nice boot, I get prompted for the passphrase (*** so one definite bug, my bug #2 here, is that "quiet splash vt.handoff=7" is incompatible with LUKS encryption)
11) BUT I end up with a multiuser mode line/curses login prompt and seem to get in fine as chris, the ordinary user I defined when doing the U12.04 installation, but no Gnome (*** is this bug #3? ***)

Here's what cfdisk shows from a rescue root terminal:

Disk drive: /dev/sda
If I go into that cfdisk shows
Disk drive: /dev/sda
Size: 750156374016 bytes, 750.1 GB
Heads: 255 Sectors per track: 63 Cylinders: 91201

		Primary	Free Space			1.05*
sda1	Primary	ntfs		[SYSTEM]	418.39*
sda2	Boot	Primary HPFS/NTFS/exFAT		191572.74*
		Pri/Log	Free Space			1.05*
sda5	NC	Logical	ext2				1998.59*
sda6	NC	Logical	crypto_LUKS			556163.67*
		Pri/Log	Free Space			0.91*	

(sorry for formatting there).

Here's the whole of grub.cfg from /boot on /dev/sda5

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.2.0-20-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root b373189d-0999-47a6-a925-0fe6d2511e49
	linux	/vmlinuz-3.2.0-20-generic-pae root=/dev/mapper/sda5_crypt-root ro   quiet splash vt.handoff=7
	initrd	/initrd.img-3.2.0-20-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-20-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root b373189d-0999-47a6-a925-0fe6d2511e49
	echo	'Loading Linux 3.2.0-20-generic-pae ...'
	linux	/vmlinuz-3.2.0-20-generic-pae root=/dev/mapper/sda5_crypt-root ro single nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-3.2.0-20-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 04FC772AFC771560
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

I'm happy to supply any other information and try anything.  I'd really
like to get this working and suspect that this multiboot combination is
one quite a lot of people will want.

** Affects: debian-installer (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bot-comment grub luks lvm multiboot partitioning
-- 
grub install to partition fails with 12.04 alternate & LUKS multiboot setup
https://bugs.launchpad.net/bugs/979971
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to debian-installer in Ubuntu.




More information about the foundations-bugs mailing list