Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 does not see any disks/partitions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
are
Apprentice
Apprentice


Joined: 03 Jan 2006
Posts: 179

PostPosted: Tue Aug 13, 2013 4:30 am    Post subject: Grub2 does not see any disks/partitions Reply with quote

Dear All,

the first time since 10 years I am really stuck. I've installed Gentoo on my new Samsung Series 9, chrooting from a SLAX USB.
I installed GRUB to /dev/sda and after rebooting I get the grub-rescue terminal, when (hd0,gpt3) is not found.

My main problems are:

a) (hd0,gpt3) should be there (it is a btrfs, which hosts /boot)
b) ls does NOT SHOW ANY disks or partitions (while it should show hd0 at least)

I assume, problem a) depends on b) -- but why/how/where does it come from? I googled for hours but did not find anything useful.

Please help, I am really stuck!
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 420
Location: Woonsocket, RI

PostPosted: Tue Aug 13, 2013 1:37 pm    Post subject: Reply with quote

First, you must identify your boot mode (BIOS or EFI). If this is a new computer and if you've left Windows 8 installed for a dual-boot scenario, then Windows is booting in EFI mode, and your Linux installation (and therefore GRUB) should also be in EFI mode in order to work. It's not clear from your description if you're dual-booting with Windows or how you've installed GRUB and Linux. It's unlikely that a mismatched installation mode would cause the problem you're describing, but even if it's not the cause, getting this detail right is important, so you should start with that.

Second, if you are booting in EFI mode, you should study EFI boot loader options for Linux. IMHO, GRUB 2 is the worst of these options (with the possible exception of SYSLINUX EFI, simply because of its newness). It's conceivable that using another boot loader would fix your problem.
Back to top
View user's profile Send private message
are
Apprentice
Apprentice


Joined: 03 Jan 2006
Posts: 179

PostPosted: Wed Aug 14, 2013 4:24 am    Post subject: Reply with quote

srs5694 wrote:
First, you must identify your boot mode (BIOS or EFI).


Of course, otherwise I would not have been able to install grub2 and to get into grub-rescue. I actually tried both GPT and MBR.

srs5694 wrote:

how you've installed GRUB and Linux.


grub2-install /dev/sda
--> suceeded in all combinations (GBT and MBR)

srs5694 wrote:
IMHO, GRUB 2 is the worst of these options (with the possible exception of SYSLINUX EFI, simply because of its newness). It's conceivable that using another boot loader would fix your problem.


I could not agree more and I hate so much where all this nonsense goes to! I lost 2 days in getting something up and running:

1) Grub2 from Gentoo did not work
2) Syslinux-5 from Gentoo did not work

I finally solved it by masking Syslinux-5, copying a MINT-Live USB and booting it, executing the same! command "grub2-install /dev/sda" from there and immediately it worked. Can not prove anything, but I guess the Gentoo Grub2 build is somehow broken.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 420
Location: Woonsocket, RI

PostPosted: Wed Aug 14, 2013 11:08 pm    Post subject: Reply with quote

are wrote:
srs5694 wrote:
First, you must identify your boot mode (BIOS or EFI).


Of course, otherwise I would not have been able to install grub2 and to get into grub-rescue. I actually tried both GPT and MBR.


You did not identify your boot mode. Note that BIOS vs. EFI is entirely distinct from MBR vs. GPT. BIOS and EFI are two competing types of firmware. EFI supports a compatibility layer (known as the CSM or "legacy" mode) that enables it to boot BIOS-mode OSes. This is similar to WINE in Linux, and makes it impossible to know what the computer's boot mode is for modern computers based on hardware identification alone. PCs sold more than a couple of years ago are likely to be BIOS-based, and therefore to boot in BIOS mode, but there are exceptions to that rule.

MBR and GPT are two different partition table types. Although old computers almost invariably use BIOS and MBR, it's possible to use GPT with BIOS-based computers and MBR with EFI-based computers. (Windows is more limited, though; it can only boot from MBR disks in BIOS mode, and from GPT disks in EFI mode.)

Quote:
srs5694 wrote:

how you've installed GRUB and Linux.


grub2-install /dev/sda
--> suceeded in all combinations (GBT and MBR)


I was thinking in terms of boot mode (EFI vs. BIOS). The installation to /dev/sda suggests a BIOS-mode install, but with some versions of GRUB, an EFI-mode install might work with that command, so I can't really rule out an EFI-mode install.

Quote:
I finally solved it by masking Syslinux-5, copying a MINT-Live USB and booting it, executing the same! command "grub2-install /dev/sda" from there and immediately it worked. Can not prove anything, but I guess the Gentoo Grub2 build is somehow broken.


I'm glad you got it working, and given that fact, I understand if you don't want to continue pursuing this issue; but it's still unclear whether you're booting in BIOS/CSM/legacy mode or in EFI mode. If you don't understand these differences or know which mode you're using, you'll be floundering in the dark if and when you need to modify your configuration.

You might want to read this page of the rEFInd documentation to learn more about this topic. You can also run the Boot Info Script to learn a lot about your partitions and boot modes. You can post the RESULTS.txt file it creates (be sure to do it between code tags) if you want help interpreting the output.
Back to top
View user's profile Send private message
are
Apprentice
Apprentice


Joined: 03 Jan 2006
Posts: 179

PostPosted: Fri Aug 16, 2013 1:21 pm    Post subject: Reply with quote

Dear srs5694,

first o all thank you very much for your kind response and help.

I was clearly in CSM, as GRUB RESCUE came up (but I also set it in the BIOS setup). I also understand clearly the differences between BIOS Mode/EFI and Partition Tables. However none of these is related to my problem, as GRUB came up, which means:

a) Grub was installed and found
b) Grub did not find its image because
c) Grub did not see ANY! partititions

In my understanding you description clearly points to scenarios when no GRUB is loaded at all or when the grub-config is wrong (e.g. hd0,mdos1 vs. hd0,gpt1). But in my case, GRUB itself did not find any partition! (In the rescue shell, "ls" returned nothing!). How is that possible?

I clearly consider that as a very anoying bug, especially after grub-install returned a success-message. However, this error is almost impossible to file. I know from other posts that you have a great understanding of this topic, but you see from our discussion how difficult it is to convince you that the general matter is understood well.

(Reminds me a lttle bit in calls to my network provider, when I tell them on problems of their DHCP Server and they tell me to reboot. :))

Thanks again and best regards!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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