[Bug 1466047] Re: Install in UEFI mode installs grub-pc

CDSRV TechSupport ubuntu.support at coastaldataservices.net
Mon Oct 19 02:07:05 UTC 2015


confirming this 'bug' - the problem is that the installer calls 'grub-
pc' (which is for 32bit 'bios' scheme, and installs it if its missing)
even after selecting the correct options during installation.  it should
be calling grub-mkconfig but does not, and the system is left in an un-
bootable state on first boot or anytime after updating the kernel where
update-grub would be called.

system config:
toshiba satellite booting in EFI mode
Samsung EVO SE-SSD
Ubuntu 15 (64bit)
btrfs root volume


here are some commands to work-around the problem, try running this after updating linux kernel.  


---------------

## procedure to add efiboot on btrfs subvolume with grub

## configurable
chroot=/mnt
bootdisk=/dev/sda
rootpartition=3
efipartition=1

echo "##> updating efi grub"
echo "##> chroot=${chroot}"
echo "##> bootdisk=${bootdisk}"
echo "##> rootpartition=${bootdisk}/${rootpartition}"
echo "##> efipartition=${bootdisk}/${efipartition}"

## 
## ROOT : btrfs
mount -o subvol=@ ${bootdisk}/${rootpartition} ${chroot}
## add some logic here to use ext4

## EFI : ext2
mount ${bootdisk}/${efipartition} ${chroot}/boot/efi

apt-get install efibootmgr

efibootmgr -c -d ${bootdisk} -p 1 -w -L ubuntu

apt-get install grub-efi grub-efi-amd64

grub-install --root-directory=${chroot} --boot-directory=${chroot}/boot
--bootloader-id=ubuntu  --target=x86_64-efi --efi-
directory=${chroot}/boot/efi --recheck  --debug ${bootdisk}

## 
echo "##> entering chroot"
chroot $chroot

for i in dev dev/pts sys proc run; do sudo mount --bind /$i
${chroot}/$i; done

mkdir /boot/efi/EFI/GRUB
grub-mkconfig -o /boot/efi/EFI/GRUB/grub.cfg

##
echo "##> exit this shell to exit the chroot"

#
exit

-----------

 these commands were assembled from numerous sources and the code has
not been tested extensively, since the system affected is actually
working now.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1466047

Title:
  Install in UEFI mode installs grub-pc

Status in ubiquity package in Ubuntu:
  New

Bug description:
  Installing Kubuntu 15.04 to a self built machine with Gigabyte GA-
  F2A85X-UP4 motherboard with new 4TB disk.

  Got machine to boot DVD in UEFI mode and when into "Try Ubuntu" mode
  so that I could check it was running in UEFI.  Then hit "Install
  Kubuntu".  Used manual partitioning,  created new partition table and
  set up partitions, including EFI.  Completed install and rebooted.

  Machine booted OK but when checked it was not running in EFI mode.
  Disk had been formatted as GPT, EFI partition created and mounted but
  empty.  grub-pc had been installed, not grub-efi.

  I manually removed grub-pc and installed grub-efi, plus a few tweaks,
  and everything then OK.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1466047/+subscriptions



More information about the foundations-bugs mailing list