Results 1 to 4 of 4

Thread: Grub 2: Disk not found error after adding menu entry in 40_custom

  1. #1
    Join Date
    Apr 2009
    Location
    Dublin, Ireland
    Beans
    10
    Distro
    Ubuntu UNR

    Unhappy Grub 2: Disk not found error after adding menu entry in 40_custom

    Hi,

    I'm trying to add a new entry to the Grub 2 boot menu. The goal is to have the option to boot into a live linux OS called Bankix (derived from Ubuntu 12.04 and geared towards safe online banking). Bankix is installed on a SD memory card on /dev/sdc1. From what I understand, I need to edit /etc/grub.d/40_custom to make a new entry appear in the Grub 2 boot menu. I added the following:


    menuentry 'Bankix' {
    insmod chain
    set root=(hd2,1)
    chainloader +1
    }


    When I select this option from the Grub 2 menu on startup, I get an error: disk 'hd2,1' not found. I'm at a loss as to why Grub 2 can't find the memory card. I'm using Ubuntu 12.10 with Windows 8 dual boot. Can anybody help?

    Thanks, Thomas
    Last edited by actetylcholine; April 6th, 2013 at 12:41 AM.

  2. #2
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub 2: Disk not found error after adding menu entry in 40_custom

    I'm not sure if it will solve your issue, but if the Bankix bootloader is installed on the MBR of the card, /dev/sdc, and not on the partition /dev/sdc1, the entry should be like:
    set root=(hd2)

    Since the bootloader is on the MBR of the disk, you don't specify the partition. If the bootloader is on the partition on the other hand, the (hd2,1) was correct.

    Did you check whether grub2 has sdc referenced as hd2? If the card was not present it could have not created a mapping hd2 for it. I think you can make grub2 remake the device map with:
    sudo grub-mkdevicemap

    Make sure the card is plugged in when you run that.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  3. #3
    Join Date
    Apr 2009
    Location
    Dublin, Ireland
    Beans
    10
    Distro
    Ubuntu UNR

    Re: Grub 2: Disk not found error after adding menu entry in 40_custom

    Thanks Darko for the quick reply! Since I tried both your suggestions, I'm not sure which one did the trick, but at least now I get a different error message :/ Will create a new thread for that though. Thanks again!

  4. #4
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub 2: Disk not found error after adding menu entry in 40_custom

    The other issue is grub's drive number. I have several drives and normally boot from sdc. Then with grub sdc is hd0, and then BIOS/grub numbers drives in same order as ports on motherboard or sda is hd1. But if I boot sda then that is hd0.
    And my system gets mixed up as I skipped a port and sometime my USB flash drive is sdc and sometimes sdf which also changes hd number in grub. Or I use from grub menu e and have to change hd3 to hd5 or something to make it work.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •