Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
need troubeshooting a bad GRUB install
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
Arch dude
n00b
n00b


Joined: 02 Mar 2017
Posts: 3
Location: California

PostPosted: Fri Mar 03, 2017 3:29 am    Post subject: need troubeshooting a bad GRUB install Reply with quote

I've used Gentoo since 2006, but I wandered away and then came back. I'm installing on an ASUS vivomini which I bought barebones. I installed an M.2 as its only SSD (no HDD). I installed from the minimal install CD ISO which I copied directly to a USB stick: this worked beautifully. I built Gentoo onto the SSD going for a UEFI boot, using parted instead of fdisk.

When I booted to the newly installed system, I got a GRUB rescue prompt. Problem: I cannot get to the ASUS BIOS/EFI, because the system will not respond to the (USB) keyboard before displaying the GRUB rescue prompt. I cannot debug the problem by booting the install USB stick because the BIOS/EFI finds the M.2 SSD first. I cannot remove the M.2: if I do, I cannot hot-add it because the system must be powered off to add or remove the M.2.

I learned enough about GRUB and GRUB rescue to boot to the USB key. I now know enough to get from GRUB rescue to a full GRUB, which is a reasonably rich tool set. I used this to fix various problems with my M.2 installation, and I can even build new kernels and boot them, but since grub refuses to boot from the boot partition, I must boot my new kernel from somewhere in rootfs, and this makes rootfs read-only.

In retrospect, I think I may have improperly installed a BIOS-type GRUB, and the ASUS BIOS is finding it. This is (I think) the GRUB that is dropping into rescue mode. This GRUB complains about the EFI boot partition: when I do
grub rescue>ls (hd0,2)
it responds with
(hd0,2):Filesystem is unknown.

It does this no matter what the filesystem type is (ext2, fat16, fat32).

And finally, the questions:

1) How can I find out which Grub is running? the BIOS Grub or the EFI Grub?
1a) How can I delete the BIOS Grub this is indeed the problem?
2)How can I find out why Grub cannot read (hd0,2)? Does GRUB have low-level disk analysis tools?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Fri Mar 03, 2017 11:30 am    Post subject: Reply with quote

you need a linux system booted in uefi mode from which to chroot into the installed gentoo system and run grub-install. The minimal install cd does not support booting in UEFI mode. Recommend system rescue cd/usb selected in UEFI/BIOS to boot in UEFI mode.

To quickly enter the BIOS:
• Press the power button for at least four (4) seconds to shut down
your VivoMini, then press the power button again to turn your
VivoMini back on, then press <F2> or <Del> during POST.
• When your
VivoMini is off, disconnect the power cord from your
VivoMini’s power connector. Reconnect the power cable and
press the power button to turn on your VivoMini. Press <F2> or
<Del> during POST.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Arch dude
n00b
n00b


Joined: 02 Mar 2017
Posts: 3
Location: California

PostPosted: Fri Mar 03, 2017 3:39 pm    Post subject: Reply with quote

Thanks! the power off trick works so I can now get to the BIOS. I will try the system rescue CD ISO now. I tried a grub-install using the kernel I built, (which is configured to support UEFI) but without success.
Back to top
View user's profile Send private message
Arch dude
n00b
n00b


Joined: 02 Mar 2017
Posts: 3
Location: California

PostPosted: Sat Mar 04, 2017 3:33 am    Post subject: [SOLVED] new install now works Reply with quote

Yep, just as you recommended.

1) download the system rescue CD ISO image from http://www.system-rescue-cd.org, and then FOLLOW THE DIRECTIONS to install it on a USB stick.
2) insert the stick in a USB port, remove all other USB sticks
3) unplug the vivomini (ESSENTIAL STEP). This forces a POST, which gives you the chance to get into the BIOS on the next power on.
4) plug in and push the power button
5) press F2 or DEL when the ASUS splash screen is displayed. You are now in the BIOS
6) navigate to the boot screen and select your new stick as the primary boot source. NOTE that you actually have two choices: pick the UEFI source.

System rescue now boots. It is a Gentoo system that appears to have a superset of functionality of the minimal install CD image. I got back into my chroot environment and re-ran grub-install. I then removed the USB stick and rebooted. It worked.

The Gentoo installation guide is in need of an update:
1) The "partitioning the disk" step should state that you should not try to build a UEFI system using the minimal install CD.
2) The "partitioning the disk" step should be refactored to provide a unified section for UEFI/GPT. This should explicitly include the correct command for putting the proper filesystem on the boot partition. I used "mkfs.vfat -F 32 /dev/sda2"
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Sat Mar 04, 2017 1:27 pm    Post subject: Reply with quote

Well done. Suggest edit the title on your original post to add SOLVED. Your step by step is a good one, may save the next guy. You might want to join the discussion at https://wiki.gentoo.org/wiki/Handbook_Talk:AMD64/Installation/Disks
_________________
Defund the FCC.
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