Having trouble with grub2 [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Having trouble with grub2 [Solved]

Postby ratcheer » Mon Aug 06, 2012 0:24

I deleted a distro and its partitions from my disk drive. Then I ran
Code: Select all
grub-mkconfig -o /boot/grub/grub.cfg


It somehow still detects the removed distro on the now non-existent partition. I am not sure I understand why, that never happened on Ubuntu. Here is what it says:

Found Gentoo Base System release 2.1 on /dev/sda9
/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda9. Check your device.map.
/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda9. Check your device.map.
/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda9. Check your device.map.
/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda9. Check your device.map.


So, I decided I should be able to fix it by rerunning grub-install. However, there is no grub-install command on my system, even though it is clearly documented on the Gentoo Wiki. I finally found command grub2-install, which is confusing. I ran it successfully, then reran grub-mkconfig. But, it still picks up the removed distro on the deleted partition.

I am confident that I could fix this in Ubuntu, but I am trying to use Sabayon instead of Ubuntu. How do I fix this in Sabayon?

Tim
Last edited by ratcheer on Wed Aug 08, 2012 20:28, edited 1 time in total.
ratcheer
Growing Hen
 
Posts: 103
Joined: Wed Mar 14, 2012 16:41

Re: Having trouble with grub2

Postby wolfden » Mon Aug 06, 2012 9:17

you don't have it setup in the 40_custom file do you? I have never seen anything like this before
wolfden
Sharecropper
 
Posts: 9050
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA

Re: Having trouble with grub2

Postby ratcheer » Mon Aug 06, 2012 20:15

Thank you for your reply. No, 40_custom has not been touched. The only line in it is the exec tail line.

Here is a listing of my partitions. There is no longer an sda9.

Code: Select all
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          616447   300.0 MiB   0700  Linux/Windows data
   2          616448         1640447   500.0 MiB   EF00 
   3         1640448        17851384   7.7 GiB     8200 
   5              34            2047   1007.0 KiB  EF02  BIOS boot partition
   7       158063104       262920703   50.0 GiB    0700  Linux/Windows data
   8       262920704       367778303   50.0 GiB    0700  Linux/Windows data
  11       577493504       682351103   50.0 GiB    0700  Linux/Windows data
  12       682351104       787208703   50.0 GiB    0700  Linux/Windows data
  13       787208704       892066303   50.0 GiB    0700  Linux filesystem
  14       892066304       996923903   50.0 GiB    0700  Linux filesystem
  15       996923904      1101781503   50.0 GiB    EF00  Linux filesystem
  16      1101781504      1206639103   50.0 GiB    0700  Linux filesystem


Tim
ratcheer
Growing Hen
 
Posts: 103
Joined: Wed Mar 14, 2012 16:41

Re: Having trouble with grub2

Postby ratcheer » Wed Aug 08, 2012 14:17

Does anyone have any ideas about this?

I simply deleted the partition using gdisk (aka, gpt fdisk). Does it seem that grub2 is still detecting the deleted partition, or that some file on the current Sabayon system has a record of the other Sabayon installation that was there and grub2 is trying to use it? I thought that grub2 detects what is on the disk's current partitions, but that is not what is happening, here.

Tim
ratcheer
Growing Hen
 
Posts: 103
Joined: Wed Mar 14, 2012 16:41

Re: Having trouble with grub2 [Solved]

Postby ratcheer » Wed Aug 08, 2012 20:34

Ok, I have no idea what is going on. Today, I was deeply researching the problem and reading about how grub2 detects partitions with OS's and used the info to map the devices, then create grub.cfg. Without changing anything, and just to try to get a closer look at what was happening on my system, I reran grub2-install and grub-mkconfig. The old Sabayon installation on /dev/sda9 was not included this time. My grub.cfg is now correct.

I am 100% certain that I did this before, as indicated in the top post. I have no idea why it gave those errors then, but not today. I am at a loss. :oops:

Anyway, the problem is moot.

Tim
ratcheer
Growing Hen
 
Posts: 103
Joined: Wed Mar 14, 2012 16:41


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 3 guests