[SOLVED] No bootloader installed? (UEFI + GPT custom part

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
misGnomer
Level 2
Level 2
Posts: 75
Joined: Tue Aug 24, 2010 2:09 pm

[SOLVED] No bootloader installed? (UEFI + GPT custom part

Post by misGnomer »

Background: replaced laptop's failing HDD with a Samsung 840 Evo 250GB SSD. Partitioned the latter with gdisk (1536 KB sector alignment as elsewhere suggested) as follows:
sda1 FAT32 300M for EFI boot
sda2 EXT4 15G /
sda3 EXT4 15G / (other distro like LMDE)
sda4 EXT4 30G /home
sda5 swap 12G
sda6 EXT4 150G
I restored /home and other data from backups with FS Archiver, booted Mint 17 64-bit (v2) and hit install, selected custom partitioning, gave it the above instructions and at the bottom selected /dev/sda1 (300M FAT32) for the boot loader location.

Everything seemed to go well as usual except upon next reboot I was greeted with:

"Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key..."


I booted into live session and found the FAT32 EFI partition unused and /boot had no signs on EFI either. I did find the directory /sys/firmware/efi which Rod Smith (*) says indicates Mint was aware I booted in EFI mode.

For good measure I did everything again from the very start, but as they say... well, the result was the same.

This was virgin drive territory with an inviting FAT32 EFI partition to boot, but Mint 17 failed to install working EFI boot loader. I grabbed the rEFInd boot manager USB image, dd'ed it onto a vacant SD card and it booted up the default (and only present) Mint 17 install in just seconds.

Punch line: Any ideas on how to figure out what went wrong and how to get a working EFI bootloader installed? GPT disks and (U)EFI will only become more common and hopefully so do installs without preinstalled windows setups.


(*) For all his guiding and Free software Rod deserves more than the free beer voucher I've sent his way... big thanks mate.
Last edited by misGnomer on Sat Jul 26, 2014 12:10 pm, edited 1 time in total.

User avatar
mbohets
Level 2
Level 2
Posts: 97
Joined: Sun Apr 28, 2013 8:26 am
Location: Belgium

Re: No bootloader installed? (UEFI + GPT custom partitionin

Post by mbohets »

Why do you need GPT/uefi when you don't use windows 8 ?

Just partition your disk with gparted in the 'old' way, and disable uefi in the bios of the pc, it will make your life a lot easier.
Je suis Charlie, how many more people have to die for religion

srs5694
Level 6
Level 6
Posts: 1390
Joined: Mon Feb 27, 2012 1:42 pm

Re: No bootloader installed? (UEFI + GPT custom partitionin

Post by srs5694 »

Try installing the rEFInd Debian package after you've booted your system via the rEFInd USB drive. If that fails, post back with more details:

Code: Select all

df -h
sudo gdisk -l /dev/sda
ls -R /boot
sudo efibootmgr -v

misGnomer
Level 2
Level 2
Posts: 75
Joined: Tue Aug 24, 2010 2:09 pm

Re: No bootloader installed? (UEFI + GPT custom partitionin

Post by misGnomer »

srs5694 wrote:Try installing the rEFInd Debian package after you've booted your system via the rEFInd USB drive. If that fails, post back with more details:

Code: Select all

df -h
sudo gdisk -l /dev/sda
ls -R /boot
sudo efibootmgr -v
OK, tried installing the Debian package (not the ubuntu) but it didn't work and after reboot I still got the "select proper boot device" notice. Also, /boot/efi/ remained empty afterwards:

Code: Select all

$ sudo dpkg -i refind_0.8.3-1_amd64.deb 
[sudo] password: 
Selecting previously unselected package refind.
(Reading database ... 147673 files and directories currently installed.)
Preparing to unpack refind_0.8.3-1_amd64.deb ...
Unpacking refind (0.8.3-1) ...
Setting up refind (0.8.3-1) ...
/var/lib/dpkg/info/refind.postinst: line 4: efibootmgr: command not found
Installing rEFInd on Linux....
The ESP doesn't seem to be mounted! Trying to find it....
Mounting ESP at //boot/efi
ESP was found at //boot/efi using vfat
Found rEFInd installation in //boot/efi/EFI/BOOT; upgrading it.
Note: IA32 (x86) binary not installed!
Installing driver for ext4 (ext4_x64.efi)
Copied rEFInd binary files

Notice: Backed up existing icons directory as icons-backup.
cp: error writing ‘//boot/efi//EFI/BOOT/icons/os_centos.png’: No space left on device
cp: failed to extend ‘//boot/efi//EFI/BOOT/icons/os_centos.png’: No space left on device
cp: error writing ‘//boot/efi//EFI/BOOT/icons/os_freebsd.png’: No space left on device
cp: failed to extend ‘//boot/efi//EFI/BOOT/icons/os_freebsd.png’: No space left on device
cp: error writing ‘//boot/efi//EFI/BOOT/icons/os_ubuntu.png’: No space left on device
cp: failed to extend ‘//boot/efi//EFI/BOOT/icons/os_ubuntu.png’: No space left on device
cp: error writing ‘//boot/efi//EFI/BOOT/icons/os_debian.png’: No space left on device
cp: failed to extend ‘//boot/efi//EFI/BOOT/icons/os_debian.png’: No space left on device
cp: error writing ‘//boot/efi//EFI/BOOT/icons/os_mac.png’: No space left on device
cp: failed to extend ‘//boot/efi//EFI/BOOT/icons/os_mac.png’: No space left on device
mkdir: cannot create directory ‘//boot/efi//EFI/BOOT/keys’: No space left on device
Existing refind.conf file found; copying sample file as refind.conf-sample
to avoid overwriting your customizations.

cp: error writing ‘//boot/efi//EFI/BOOT/refind.conf-sample’: No space left on device
cp: failed to extend ‘//boot/efi//EFI/BOOT/refind.conf-sample’: No space left on device

ALERT:
Installation has completed, but problems were detected. Review the output for
error messages and take corrective measures as necessary. You may need to
re-run this script or install manually before rEFInd will work.
$
The root partition (/boot/efi ) has some 10 GB of free space but it's not getting found here.

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

Code: Select all

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        15G  4.4G  9.6G  32% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            3.9G  8.0K  3.9G   1% /dev
tmpfs           789M  1.3M  788M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.9G   80K  3.9G   1% /run/shm
none            100M   24K  100M   1% /run/user
/dev/sda6       148G   60M  140G   1% /Data
/dev/sda4        30G  6.4G   22G  23% /home
/dev/sdb1       3.5M  3.5M     0 100% /boot/efi
$
Oh, and here's why: the actually mounted /boot/efi is taken from the SD card boot (rEFInd boot manager v0.83) on /dev/sdb1 !!

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

Code: Select all

$ sudo gdisk -l /dev/sda
[sudo] password: 
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): BB04A1BF
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 2048-sector boundaries
Total free space is 22215205 sectors (10.6 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            6144          620543   300.0 MiB   0700  EFI System
   2          620544        32077575   15.0 GiB    8300  Linux filesystem
   3        32077824        63535103   15.0 GiB    8300  Linux filesystem
   4        63535104       126449663   30.0 GiB    8300  Linux filesystem
   5       126449664       151615487   12.0 GiB    8200  Linux swap
   6       151615488       466188287   150.0 GiB   8300  Linux filesystem
$
-------------------------

Code: Select all

$ sudo efibootmgr -v
sudo: efibootmgr: command not found
$
When I looked in Synaptic for "efi" nothing was installed...
and here's what installing efibootmanager would pull/push:
To be removed
- grub-gfxpayloads-lists
- grub-pc

To be installed
- efibootmanager
- grub-efi-amd64
- grub-efi-amd64-bin

To be upgraded
- grub-common
- grub-pc-bin
- grub2-common
-------------------------

Code: Select all

$ ls -R /boot
/boot:
abi-3.13.0-24-generic         memtest86+.bin
config-3.13.0-24-generic      memtest86+.elf
efi                           memtest86+_multiboot.bin
grub                          System.map-3.13.0-24-generic
initrd.img-3.13.0-24-generic  vmlinuz-3.13.0-24-generic

/boot/efi:
EFI  shellia32.efi  shellx64.efi

/boot/efi/EFI:
boot  tools

/boot/efi/EFI/boot:
bootia32.efi  drivers_ia32  icons         refind.conf
bootx64.efi   drivers_x64   icons-backup  refind.conf-sample

/boot/efi/EFI/boot/drivers_ia32:
btrfs_ia32.efi  ext4_ia32.efi  iso9660_ia32.efi  LICENSE.txt
ext2_ia32.efi   hfs_ia32.efi   LICENSE_GPL.txt   reiserfs_ia32.efi

/boot/efi/EFI/boot/drivers_x64:
btrfs_x64.efi  ext4_x64.efi  iso9660_x64.efi  LICENSE.txt
ext2_x64.efi   hfs_x64.efi   LICENSE_GPL.txt  reiserfs_x64.efi

/boot/efi/EFI/boot/icons:
arrow_left.png     os_debian.png       os_linux.png      os_suse.png
arrow_right.png    os_ecomstation.png  os_lubuntu.png    os_ubuntu.png
boot_linux.png     os_fatdog.png       os_mac.png        os_unknown.png
boot_win.png       os_fedora.png       os_mageia.png     os_win.png
func_about.png     os_freebsd.png      os_mandriva.png   tool_apple_rescue.png
func_exit.png      os_freedos.png      os_manjaro.png    tool_memtest.png
func_firmware.png  os_funtoo.png       os_mythbuntu.png  tool_mok_tool.png
func_reset.png     os_gentoo.png       os_netbsd.png     tool_part.png
func_shutdown.png  os_gummiboot.png    os_openbsd.png    tool_shell.png
os_altlinux.png    os_haiku.png        os_opensuse.png   tool_windows_rescue.png
os_arch.png        os_hwtest.png       os_redhat.png     transparent.png
os_centos.png      os_kubuntu.png      os_refind.png     vol_external.png
os_chrome.png      os_legacy.png       os_refit.png      vol_internal.png
os_clover.png      os_linuxmint.png    os_slackware.png  vol_optical.png

/boot/efi/EFI/boot/icons-backup:
arrow_left.png     os_debian.png       os_linux.png      os_suse.png
arrow_right.png    os_ecomstation.png  os_lubuntu.png    os_ubuntu.png
boot_linux.png     os_fatdog.png       os_mac.png        os_unknown.png
boot_win.png       os_fedora.png       os_mageia.png     os_win.png
func_about.png     os_freebsd.png      os_mandriva.png   tool_apple_rescue.png
func_exit.png      os_freedos.png      os_manjaro.png    tool_memtest.png
func_firmware.png  os_funtoo.png       os_mythbuntu.png  tool_mok_tool.png
func_reset.png     os_gentoo.png       os_netbsd.png     tool_part.png
func_shutdown.png  os_gummiboot.png    os_openbsd.png    tool_shell.png
os_altlinux.png    os_haiku.png        os_opensuse.png   tool_windows_rescue.png
os_arch.png        os_hwtest.png       os_redhat.png     transparent.png
os_centos.png      os_kubuntu.png      os_refind.png     vol_external.png
os_chrome.png      os_legacy.png       os_refit.png      vol_internal.png
os_clover.png      os_linuxmint.png    os_slackware.png  vol_optical.png

/boot/efi/EFI/tools:

/boot/grub:
fonts  gfxblacklist.txt  grub.cfg  grubenv  i386-pc  locale

/boot/grub/fonts:
unicode.pf2

/boot/grub/i386-pc:
915resolution.mod     gcry_whirlpool.mod        password_pbkdf2.mod
acpi.mod              gdb.mod                   pata.mod
adler32.mod           geli.mod                  pbkdf2.mod
affs.mod              gettext.mod               pbkdf2_test.mod
afs.mod               gfxmenu.mod               pcidump.mod
ahci.mod              gfxterm_background.mod    pci.mod
all_video.mod         gfxterm_menu.mod          plan9.mod
aout.mod              gfxterm.mod               play.mod
archelp.mod           gptsync.mod               png.mod
ata.mod               gzio.mod                  priority_queue.mod
at_keyboard.mod       halt.mod                  probe.mod
backtrace.mod         hashsum.mod               procfs.mod
bfs.mod               hdparm.mod                progress.mod
biosdisk.mod          hello.mod                 pxechain.mod
bitmap.mod            help.mod                  pxe.mod
bitmap_scale.mod      hexdump.mod               raid5rec.mod
blocklist.mod         hfs.mod                   raid6rec.mod
boot.img              hfspluscomp.mod           read.mod
boot.mod              hfsplus.mod               reboot.mod
bsd.mod               http.mod                  regexp.mod
btrfs.mod             hwmatch.mod               reiserfs.mod
bufio.mod             iorw.mod                  relocator.mod
cat.mod               iso9660.mod               romfs.mod
cbfs.mod              jfs.mod                   scsi.mod
cbls.mod              jpeg.mod                  search_fs_file.mod
cbmemc.mod            keylayouts.mod            search_fs_uuid.mod
cbtable.mod           keystatus.mod             search_label.mod
cbtime.mod            ldm.mod                   search.mod
chain.mod             legacycfg.mod             sendkey.mod
cmdline_cat_test.mod  legacy_password_test.mod  serial.mod
cmosdump.mod          linux16.mod               setjmp.mod
cmostest.mod          linux.mod                 setjmp_test.mod
cmp.mod               loadenv.mod               setpci.mod
command.lst           loopback.mod              sfs.mod
configfile.mod        lsacpi.mod                signature_test.mod
core.img              lsapm.mod                 sleep.mod
cpio_be.mod           lsmmap.mod                sleep_test.mod
cpio.mod              ls.mod                    spkmodem.mod
cpuid.mod             lspci.mod                 squash4.mod
crc64.mod             luks.mod                  syslinuxcfg.mod
cryptodisk.mod        lvm.mod                   tar.mod
crypto.lst            lzopio.mod                terminal.lst
crypto.mod            macbless.mod              terminal.mod
cs5536.mod            macho.mod                 terminfo.mod
datehook.mod          mda_text.mod              test_blockarg.mod
date.mod              mdraid09_be.mod           testload.mod
datetime.mod          mdraid09.mod              test.mod
diskfilter.mod        mdraid1x.mod              testspeed.mod
disk.mod              memdisk.mod               tftp.mod
div_test.mod          memrw.mod                 tga.mod
dm_nv.mod             minicmd.mod               time.mod
drivemap.mod          minix2_be.mod             trig.mod
echo.mod              minix2.mod                tr.mod
efiemu32.o            minix3_be.mod             truecrypt.mod
efiemu64.o            minix3.mod                true.mod
efiemu.mod            minix_be.mod              udf.mod
ehci.mod              minix.mod                 ufs1_be.mod
elf.mod               mmap.mod                  ufs1.mod
eval.mod              moddep.lst                ufs2.mod
exfat.mod             modinfo.sh                uhci.mod
exfctest.mod          morse.mod                 usb_keyboard.mod
ext2.mod              mpi.mod                   usb.mod
extcmd.mod            msdospart.mod             usbms.mod
fat.mod               multiboot2.mod            usbserial_common.mod
file.mod              multiboot.mod             usbserial_ftdi.mod
font.mod              nativedisk.mod            usbserial_pl2303.mod
freedos.mod           net.mod                   usbserial_usbdebug.mod
fshelp.mod            newc.mod                  usbtest.mod
fs.lst                nilfs2.mod                vbe.mod
functional_test.mod   normal.mod                verify.mod
gcry_arcfour.mod      ntfscomp.mod              vga.mod
gcry_blowfish.mod     ntfs.mod                  vga_text.mod
gcry_camellia.mod     ntldr.mod                 video_bochs.mod
gcry_cast5.mod        odc.mod                   video_cirrus.mod
gcry_crc.mod          offsetio.mod              video_colors.mod
gcry_des.mod          ohci.mod                  video_fb.mod
gcry_dsa.mod          part_acorn.mod            videoinfo.mod
gcry_idea.mod         part_amiga.mod            video.lst
gcry_md4.mod          part_apple.mod            video.mod
gcry_md5.mod          part_bsd.mod              videotest_checksum.mod
gcry_rfc2268.mod      part_dfly.mod             videotest.mod
gcry_rijndael.mod     part_dvh.mod              xfs.mod
gcry_rmd160.mod       part_gpt.mod              xnu.mod
gcry_rsa.mod          partmap.lst               xnu_uuid.mod
gcry_seed.mod         part_msdos.mod            xnu_uuid_test.mod
gcry_serpent.mod      part_plan.mod             xzio.mod
gcry_sha1.mod         part_sun.mod              zfscrypt.mod
gcry_sha256.mod       part_sunpc.mod            zfsinfo.mod
gcry_sha512.mod       parttool.lst              zfs.mod
gcry_tiger.mod        parttool.mod
gcry_twofish.mod      password.mod

/boot/grub/locale:
en_AU.mo  en_CA.mo  en_GB.mo
$
So, it would appear that the straying /boot directory should be redirected to the root hierarchy on /dev/sda2 (SSD), some missing efi packages should be installed and the FAT32 EFI partition on /dev/sda1 should also be involved somehow...

misGnomer
Level 2
Level 2
Posts: 75
Joined: Tue Aug 24, 2010 2:09 pm

Re: No bootloader installed? (UEFI + GPT custom partitionin

Post by misGnomer »

Well I thought I'd try something and uninstalled rEFInd and installed efibootmanager as above.

It didn't populate /boot/efi or the EFI partition on sda1 so next reboot resulted in the same "select proper boot device" message, but booting back with the rEFInd boot stick I ran:

Code: Select all

$ sudo efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0001,0000,0002,0003
Boot0000* Hard Drive	BIOS(2,0,00)
Boot0001* Linux	HD(1,1800,96000,779fb604-de10-4285-a903-41902ddfc11e)File(\elilo.efi)
Boot0002* CD/DVD Drive	BIOS(3,0,00)P2: PIONEER DVD-RW DVRTD11RS  .
Boot0003* UEFI: ChipBankSD/MM Reader 4080	ACPI(a0341d0,0)PCI(1c,3)PCI(0,0)USB(3,0)HD(1,800,23df,597b1339-b2e9-4a4a-93a9-43668b258344)
$
feeling confident (not) I reinstalled grub-efi-amd64 and that simply resulted in a second identical and nonworking Linux entry (also in the laptop's UEFI menu's boot options).

Why do /boot/efi and the EFI partition refuse my advances? Could I try installing the rEFInd debian package again but direct it to the proper locations?

Then again "efibootmanager -c --disk /dev/sda --part 1" didn't seem to do the trick either.

User avatar
mbohets
Level 2
Level 2
Posts: 97
Joined: Sun Apr 28, 2013 8:26 am
Location: Belgium

Re: No bootloader installed? (UEFI + GPT custom partitionin

Post by mbohets »

As I said before, you don't seem to use windows, so save yourself a lot of trouble and wipe the GPT partition layout with gparted and install a normal well known partition sheme.
I did this to on my daughters new laptop. she hated the pre installed W8,
So in Bios I switched off secure boot and uefi, with the live cd I used gparted to replace the GPT partitioning sheme by a normal one
and proceeded to install mint in the normal way.
Je suis Charlie, how many more people have to die for religion

misGnomer
Level 2
Level 2
Posts: 75
Joined: Tue Aug 24, 2010 2:09 pm

Re: No bootloader installed? (UEFI + GPT custom partitionin

Post by misGnomer »

Well the UEFI + GPT install ended up being very straightforward once user error was ruled out...

Before installing Mint 17 I had just run some utilities from USB boot that required IDE instead of AHCI and UEFI off so either UEFI was still turned off during installation or I had picked the non-[UEFI] option during USB boot but there is it. (where's facepalm when I need it :mrgreen: )

Install syslog showed that Mint's ubiquity installer wasn't getting efi-love from the hardware...

So I reinstalled on the vacant sda3 root partition and, as some endearingly dyslexic string instrument lovers say, Viola!

/boot/efi/ubuntu was populated with happy campers, /dev/sda1 now shows up mounted as /boot/efi not to mention that the system finally boots normally into a working boot menu.


Now I have two more non-critical issues left:

1) EFI still lists those unsuccessful "Linux HD" efforts in its boot list so where does one edit and remove them?

2) The original installation on sda2 already has all current updates and various customization (incl. SSD optimization) done. Could that botched UEFI-less install on sda2 still be converted to UEFI mode post-install? On second thought It's proven so resistant to efforts so far that it's probably best to just leave it until I put LMDE there...

In the future maybe the ubiquity installer will get some additional failsafes or alerts warning the user about the status of boot loader.


PS. mbohets, sorry to have ignored your advice. My 2013 vintage pure Linux desktop has been just fine using GPT + UEFI. The 2011 laptop used in this exercise came with ms-win7 and was repartitioned with Linux before I even read the MS EULA and the original install on HDD used the old MBR + msdos scheme and worked just fine, but I just wanted to leave the old behind when moving to SSD.

Post Reply

Return to “Installation & Boot”