You are not logged in.

#1 2014-07-05 23:03:53

rbsn
Member
Registered: 2014-07-05
Posts: 3

No Bootloader Installing GRUB from Beginners Guide

This afternoon I Installed Arch Linux on my laptop (UEFI disabled, BIOS) with GRUB. When my laptop boots the backlight of the screen turns on and then off again every couple of seconds, but the GRUB screen is never reached. I can  boot into Arch by booting the installation CD and selecting the boot existing OS option after which I can see the grub bootloader and select Arch Linux.

I installed GRUB using the following command:

grub-install --target=i386-pc --recheck /dev/sda

Then setup the configuration using  grub-mkconfig -o /boot/grub/grub.cfg with the following output:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initramfs image: /boot/initramfs-linux-fallback.img
  No volume groups found
done

My GRUB configuration is as follows:

#
# 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

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 load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt 
insmod ext2
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  77c2cb82-347a-4bff-a541-4bbe02570d7a
else
  search --no-floppy --fs-uuid --set=root 77c2cb82-347a-4bff-a541-4bbe02570d7a
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_GB
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-77c2cb82-347a-4bff-a541-4bbe02570d7a' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt 
    insmod ext2
    set root='hd0,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  77c2cb82-347a-4bff-a541-4bbe02570d7a
    else
      search --no-floppy --fs-uuid --set=root 77c2cb82-347a-4bff-a541-4bbe02570d7a
    fi
    echo    'Loading Linux linux ...'
    linux    /boot/vmlinuz-linux root=UUID=77c2cb82-347a-4bff-a541-4bbe02570d7a rw  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-77c2cb82-347a-4bff-a541-4bbe02570d7a' {
    menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-77c2cb82-347a-4bff-a541-4bbe02570d7a' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt 
        insmod ext2
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  77c2cb82-347a-4bff-a541-4bbe02570d7a
        else
          search --no-floppy --fs-uuid --set=root 77c2cb82-347a-4bff-a541-4bbe02570d7a
        fi
        echo    'Loading Linux linux ...'
        linux    /boot/vmlinuz-linux root=UUID=77c2cb82-347a-4bff-a541-4bbe02570d7a rw  quiet
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initramfs-linux.img
    }
    menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-77c2cb82-347a-4bff-a541-4bbe02570d7a' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt 
        insmod ext2
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  77c2cb82-347a-4bff-a541-4bbe02570d7a
        else
          search --no-floppy --fs-uuid --set=root 77c2cb82-347a-4bff-a541-4bbe02570d7a
        fi
        echo    'Loading Linux linux ...'
        linux    /boot/vmlinuz-linux root=UUID=77c2cb82-347a-4bff-a541-4bbe02570d7a rw  quiet
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initramfs-linux-fallback.img
    }
}

### 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 ###
### 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  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###

My partitions are:

Disk /dev/sda: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 73535203-3DCD-4AFB-8C5D-A87A46067C84
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 2048-sector boundaries
Total free space is 1332909 sectors (650.8 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      1421871103   678.0 GiB   8300  
   2      1421871104      1463814143   20.0 GiB    8300  
   3      1463814144      1463818239   2.0 MiB     EF02

Alternative, I have attempted to boot using UEFI by creating a EFI System Partition and installing GRUB with efibootmgr. However, upon boot I just get a grub command line interface - no option or booting of Arch?

Offline

#2 2014-07-06 00:03:04

rbsn
Member
Registered: 2014-07-05
Posts: 3

Re: No Bootloader Installing GRUB from Beginners Guide

I've just done another clean install. Same settings following the beginners guide. Can't get my BIOS to recognise GRUB without using the Live CD?

Offline

#3 2014-07-06 15:46:58

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: No Bootloader Installing GRUB from Beginners Guide

rbsn,

Are you sure you made one of the partitions bootable?

If you use fdisk /dev/sd(x) you should see a star on the section marked too boot.
In the above command (x) represents your disk; so if you have two HDD one would be sda and the second sdb, that is my case for example.

 Device    Boot     Start        End    Blocks  Id System
/dev/sdb1           2048    2099199   1048576  82 Linux swap / Solaris
/dev/sdb2 *      2099200  421529599 209715200  83 Linux
/dev/sdb3      421529600 1953523054 765996727+ 83 Linux

Do you see something like that?

If you do not you must change it  pressing "a" and then selecting the partition number you want to be bootable.

I remember having made such error once and the machine, of course, would not boot but the OS was properly installed. wink

R.

NOTE: The bootable section has a * like mine has.

Note 2: Actually looking at your partition table it looks to me that is exactly your problem. I do not see a Boot label in that partition. Unless, of course, you just typed it "by hand" and omitted that little bit. smile

Last edited by ralvez (2014-07-06 16:13:30)

Offline

#4 2014-07-06 18:28:32

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: No Bootloader Installing GRUB from Beginners Guide

@ralvez --- the OP's disk is GPT-formatted & uses a BIOS boot partition; this is identified in gdisk with the code "EF02". The "Boot" label is used with MBR disks.
@rbsn --- maybe try UEFI using gummiboot instead of GRUB; I find the config much easier...
My BIOS boot partition is located in sectors 34-2047 & works fine; the wiki says anywhere in the first 2TiB is OK, but it maybe worth trying it at the "beginning" of the disk hmm

Offline

#5 2014-07-06 18:52:13

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: No Bootloader Installing GRUB from Beginners Guide

@Head_on_a_Stick,

I'm not familiar with GPT-formatted disks and I took that Code: EF02 would represent the OP swap partition. tongue
My bad.

R.

Offline

#6 2014-07-07 15:18:16

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: No Bootloader Installing GRUB from Beginners Guide

Try using the USB flash drive or CD-R version of my rEFInd boot manager. It should get you booting in EFI mode (whether your installation is in EFI mode or BIOS mode; you'll just need to be sure that EFI support is enabled in your firmware). Depending on the configuration, you might need to tweak your boot options by hitting F2 or Insert twice rather than hitting Enter to boot the menu entry, but if you're lucky you won't need to deal with that.

If you can boot successfully using rEFInd, then I recommend you create an EFI System Partition and install something other than GRUB 2 on it. rEFInd is a possibility, as are gummiboot, SYSLINUX, and others. IMO, GRUB 2 is the worst possible choice for EFI-mode booting because of its complexity. It's popular on many distributions because of its cross-platform nature and because it offers a few features that are critical in certain scenarios, but that aren't important for most users.

Offline

#7 2014-07-07 23:12:46

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: No Bootloader Installing GRUB from Beginners Guide

Have you tried setting the boot flag on the protective MBR installed by GPT, as suggested on the GRUB wiki page?

Offline

Board footer

Powered by FluxBB