Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2 - No bootable device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2405
Location: Edmonton, AB

PostPosted: Fri Sep 05, 2014 2:49 am    Post subject: grub2 - No bootable device Reply with quote

I just installed gentoo on my new SSD (intel 480GB drive SSDSC2BF-480H501)

I mostly was installing everything over ssh (easier) and using grub2 but upon rebooting I get:

"No bootable device - Insert boot disk and press any key"

I boot strap to my system:
Code:
# swapon /dev/sda3
# mount -t ext4 /dev/sda4 /mnt/gentoo
# mount /dev/sda2 /mnt/gentoo/boot
# cd /mnt/gentoo
# mount -t proc none /mnt/gentoo/proc
# mount --rbind /dev /mnt/gentoo/dev # chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile

If boot strap and try to start ssh I and get a warning (and can not login)

"You attempting to run an openrc service on a system which openrc did not boot
..."
I can ssh to the system before I boot I bootstrap

My partition:
Code:
fdisk -l /dev/sda

Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 37C37937-6310-4B04-93A6-05CD7792EF16

Device           Start          End   Size Type
/dev/sda1         2048         6143     2M BIOS boot partition
/dev/sda2         6144       268287   128M Linux filesystem
/dev/sda3       268288      4462591     2G Linux swap
/dev/sda4     4462592    937703054   445G Linux filesystem

sda2 - boot
sda4 - root

When I installed grub2 I got no errors:
Code:
grub2-install /dev/sda
Installation finished. No error reported.

but looking at grub2 configuration, it is looking for kernel on sda4 (shouldn't it be sda2?).

linux /vmlinuz-3.14.14-gentoo root=/dev/sda4 ro single

Code:
### BEGIN /etc/grub.d/00_header ###
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
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,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
 search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  00e8b950-21c6-4558-918f-855042b42d36
else
 search --no-floppy --fs-uuid --set=root 00e8b950-21c6-4558-918f-855042b42d36
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_US
 insmod gettext
fi
terminal_output gfxterm
if sleep --interruptible 0 ; then
 set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-00e8b950-21c6-4558-918f-855042b42d36' {
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  4fac7293-6a58-43a4-857b-6e3095a8e50d
        else
          search --no-floppy --fs-uuid --set=root 4fac7293-6a58-43a4-857b-6e3095a8e50d
        fi
        echo    'Loading Linux 3.14.14-gentoo ...'
        linux   /vmlinuz-3.14.14-gentoo root=/dev/sda4 ro  }
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-00e8b950-21c6-4558-918f-855042b42d36' {
        menuentry 'Gentoo GNU/Linux, with Linux 3.14.14-gentoo' --class gentoo
--class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-3.14.14-gentoo-advanced-00e8b950-21c6-4558-918f-855042b42d36' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod ext2
                set root='hd0,gpt2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  4fac7293-6a58-43a4-857b-6e3095a8e50d
                else
                  search --no-floppy --fs-uuid --set=root 4fac7293-6a58-43a4-857b-6e3095a8e50d
                fi
                echo    'Loading Linux 3.14.14-gentoo ...'
                linux   /vmlinuz-3.14.14-gentoo root=/dev/sda4 ro       }
        menuentry 'Gentoo GNU/Linux, with Linux 3.14.14-gentoo (recovery mode)'
--class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-3.14.14-gentoo-recovery-00e8b950-21c6-4558-918f-855042b42d36' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod ext2
                set root='hd0,gpt2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  4fac7293-6a58-43a4-857b-6e3095a8e50d
                else
                  search --no-floppy --fs-uuid --set=root 4fac7293-6a58-43a4-857b-6e3095a8e50d
                fi
                echo    'Loading Linux 3.14.14-gentoo ...'
                linux   /vmlinuz-3.14.14-gentoo root=/dev/sda4 ro single        }
}

### 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 ###

_________________
#Joseph


Last edited by Joseph_sys on Fri Sep 05, 2014 1:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
sebB
Apprentice
Apprentice


Joined: 02 Mar 2011
Posts: 243
Location: S.O. France

PostPosted: Fri Sep 05, 2014 1:29 pm    Post subject: Reply with quote

Code:
/dev/sda2         6144       268287   128M Linux filesystem
/dev/sda2     4462592    937703054   445G Linux filesystem

Can you post your fstab?
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2405
Location: Edmonton, AB

PostPosted: Fri Sep 05, 2014 1:41 pm    Post subject: Reply with quote

sebB wrote:
Code:
/dev/sda2         6144       268287   128M Linux filesystem
/dev/sda4     4462592    937703054   445G Linux filesystem

Can you post your fstab?



My BIOS is from around 2008 so it is not EFI type.

Code:
cat /etc/fstab
/dev/sda2      /boot      ext2      noauto,noatime   1 2
/dev/sda4      /      ext4      defaults,relatime,discard   0 1
/dev/sda3      none      swap      sw,pri=3,discard      0 0

# for USB stick camera devices
/dev/sdb1   /media/stick   auto   noauto,rw,users,exec    0 0
/dev/sdc1   /media/stick   auto   noauto,rw,users,exec,umask=0077    0 0

shm          /dev/shm    tmpfs       defaults,nodev,nosuid,mode=1777 0 0

_________________
#Joseph
Back to top
View user's profile Send private message
sebB
Apprentice
Apprentice


Joined: 02 Mar 2011
Posts: 243
Location: S.O. France

PostPosted: Fri Sep 05, 2014 2:04 pm    Post subject: Reply with quote

Did you run ?
Code:
grub2-mkconfig -o /boot/grub/grub.cfg
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2405
Location: Edmonton, AB

PostPosted: Fri Sep 05, 2014 2:08 pm    Post subject: Reply with quote

sebB wrote:
Did you run ?
Code:
grub2-mkconfig -o /boot/grub/grub.cfg


Yes, I did.
Code:
grub2-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.14.14-gentoo
done

_________________
#Joseph
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2405
Location: Edmonton, AB

PostPosted: Fri Sep 05, 2014 4:49 pm    Post subject: Reply with quote

I think my problem is I have a GPT partition and old BIOS 2008 system so I can not use EIF

I make /dev/sda1 as BIOS boot partition but it is not mark with "*" as bootable in addition I fink it need to be formatted as DOS isn't it?
I do not dual boot.
_________________
#Joseph
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31977
Location: 56N 3W

PostPosted: Fri Sep 05, 2014 7:46 pm    Post subject: Reply with quote

Joseph_sys,

With a GPT partition and old BIOS 2008 system, you need to set the bootable flag on the protective MSDOS partition. Thats all your BIOS can see.

Use an older fdisk and ignore the dire warning about a GPT partition table being detected.
You are only changing a flag, which is quite safe.

Setting the bootable flag on one of the GPT partitions is totally ineffective, as the BIOS can't see it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2405
Location: Edmonton, AB

PostPosted: Fri Sep 05, 2014 7:58 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Joseph_sys,

With a GPT partition and old BIOS 2008 system, you need to set the bootable flag on the protective MSDOS partition. Thats all your BIOS can see.

Use an older fdisk and ignore the dire warning about a GPT partition table being detected.
You are only changing a flag, which is quite safe.

Setting the bootable flag on one of the GPT partitions is totally ineffective, as the BIOS can't see it.


Thank you, which version of "gptfdisk" will allow me to do that?
current gptfdisk-0.8.8 contain fdisk = util-linux 2.24.1

In addition I'm in chroot evn. and booted from ISO.
_________________
#Joseph
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31977
Location: 56N 3W

PostPosted: Fri Sep 05, 2014 8:16 pm    Post subject: Reply with quote

Joseph_sys,

I don't know version numbers - sorry.

Until recently ordinary fdisk was good for this. Now it understands GPT, it will only show you the GPT.
If all else fails a hex editor will work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum