You are not logged in.

#1 2012-07-21 06:39:22

velusip
Member
Registered: 2010-12-01
Posts: 18

grub-bios does not detect any hard drives

I have not yet found anyone else with this issue, so it could simply be my sketchy motherboard...

When booting grub2 I get the prompt and the error:

error: disc 'hd0' not found.

When I type "ls" nothing shows up.  grub2 is simply not detecting the discs.

Mind you, this setup works fine with grub-legacy.  In fact, I just reinstalled grub from an old arch iso and it booted up just fine.  It's an older Gigabyte AM2 motherboard with an onboard AMD raid controller configured as pure raid -- no native IDE or AHCI support enabled.  When the raid bios boots it does detect the two discs, both Western Digital.  One is a bit older and configured with 512k blocks and starting on cyl 63 (like usual) and the second is formatted with large block advanced format and only used as backup/storage.

I've never experienced anything quite like this, so I'm not even sure where to start looking for solutions.  I figured I would post this, hoping someone with a good understanding of how grub2 grabs hardware/disc information and if there is something I can adjust in bios to make the discs available to grub2.  Any ideas are welcome.

Offline

#2 2012-07-21 09:43:10

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 456

Re: grub-bios does not detect any hard drives

i do'nt think there is  hd0 in grub2.

ezik

Offline

#3 2012-07-21 12:07:50

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: grub-bios does not detect any hard drives

shulamy wrote:

i do'nt think there is  hd0 in grub2.

ezik

there is,
from the wiki page "Partitions are numbered from 1 instead of 0 while drives are still numbered from 0, and prefixed with partition-table type"


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#4 2012-07-22 07:29:16

skarphace
Member
Registered: 2009-01-07
Posts: 22

Re: grub-bios does not detect any hard drives

Can you post the contents of /boot/grub/grub.cfg?  Also, after grub install, don't forget generate a new grub.cfg file for good measure.  The install process never seems to generate a proper grub.cfg for me using the wiki guide.

To generate a new file(assuming /boot is mounted if setup separate):

# grub-mkconfig -o /boot/grub/grub.cfg

Offline

#5 2012-07-23 04:25:34

velusip
Member
Registered: 2010-12-01
Posts: 18

Re: grub-bios does not detect any hard drives

skarphace wrote:

/boot/grub/grub.cfg?

Certainly.  From what I've read it's rather barebones.

While my speculation may be unrelated/deprecated, my understanding of grub-legacy suggests that a config file is read from a suitable partition (and filesystem).   If grub2 operates in a similar way then grub2 never sees my config file when booting.  I assume some missing feature of the grub2 binary in MBR may be at fault, or as mentioned earlier in the thread my motherboard's raid controller is buggy.

If this binary is generated upon writing to MBR -- utilizing the config file -- then I better understand why you want to see it.

#
# 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
set default="0"

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_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  bac9f0cf-8263-444c-b15a-5860ea885244
else
  search --no-floppy --fs-uuid --set=root bac9f0cf-8263-444c-b15a-5860ea885244
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1280x1024
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_CA
  insmod gettext                                                                        
fi                                                                                      
terminal_input console
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  637c49e2-af99-4515-8cc2-89d810c2cbd8
else
  search --no-floppy --fs-uuid --set=root 637c49e2-af99-4515-8cc2-89d810c2cbd8
fi
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-bac9f0cf-8263-444c-b15a-5860ea885244' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  637c49e2-af99-4515-8cc2-89d810c2cbd8
        else
          search --no-floppy --fs-uuid --set=root 637c49e2-af99-4515-8cc2-89d810c2cbd8
        fi
        echo    'Loading Linux core repo kernel ...'
        linux   /vmlinuz-linux root=UUID=bac9f0cf-8263-444c-b15a-5860ea885244 ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-linux.img
}
menuentry 'Arch GNU/Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-bac9f0cf-8263-444c-b15a-5860ea885244' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  637c49e2-af99-4515-8cc2-89d810c2cbd8
        else
          search --no-floppy --fs-uuid --set=root 637c49e2-af99-4515-8cc2-89d810c2cbd8
        fi
        echo    'Loading Linux core repo kernel ...'
        linux   /vmlinuz-linux root=UUID=bac9f0cf-8263-444c-b15a-5860ea885244 ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-linux-fallback.img
}

### END /etc/grub.d/10_linux ###

Offline

#6 2012-07-23 06:05:32

skarphace
Member
Registered: 2009-01-07
Posts: 22

Re: grub-bios does not detect any hard drives

It is looking for hd0 alright.  With an MSDOS partition type for the boot directory. entry. Sound about right?

set root='hd0,msdos2'

Does the disk with the UUID 'bac9f0cf-8263-444c-b15a-5860ea885244' exist?  You can see that from the live CD, by `ls /dev/disk/by-uuid/`.

I still think the best bet is to regenerate grub.cfg. By running the command from my previous post while /boot is mounted.

While my speculation may be unrelated/deprecated, my understanding of grub-legacy suggests that a config file is read from a suitable partition (and filesystem).   If grub2 operates in a similar way then grub2 never sees my config file when booting.

I'm no expert, but it's my understanding that grub does see /boot/grub/grub.cfg during boot after grub is loaded from your MBR.  What you generally only edit from a user perspective is /etc/default/grub and run the command from my previous post to generate grub.cfg.

Maybe someone else on the forum that recognizes what stage of the grub2 boot process this shows up at to give you a better idea of the problem.  My default goto is regenerating grub.cfg.

EDIT: You don't really state where in the process you see the original error.  Is it before or after you get the OS choice menu?

Last edited by skarphace (2012-07-23 06:06:29)

Offline

Board footer

Powered by FluxBB