Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failed to reboot after grub install. UEFI
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
EBOOT.BIN
n00b
n00b


Joined: 10 Dec 2017
Posts: 8

PostPosted: Mon Apr 30, 2018 2:52 am    Post subject: Failed to reboot after grub install. UEFI Reply with quote

Can someone show me how to get back to where I was before I rebooted and properly install grub on a uefi motherboard?

Thanks for any help :)
Back to top
View user's profile Send private message
superjaded
l33t
l33t


Joined: 05 Jul 2002
Posts: 759

PostPosted: Mon Apr 30, 2018 11:10 am    Post subject: Reply with quote

Basically do the same thing you did to do the install in the first place.

Boot with your rescue CD, mount your gentoo partition(s), and then follow the steps to enter your chrooted environment (ie; 1.3 and 1.4).
Back to top
View user's profile Send private message
EBOOT.BIN
n00b
n00b


Joined: 10 Dec 2017
Posts: 8

PostPosted: Sat May 05, 2018 7:05 am    Post subject: Reply with quote

superjaded wrote:
Basically do the same thing you did to do the install in the first place.

Boot with your rescue CD, mount your gentoo partition(s), and then follow the steps to enter your chrooted environment (ie; 1.3 and 1.4).


When I try "mount --types proc /proc /mnt/gentoo/proc" I get "mount: /proc/mnt/gentoo/proc: can't find in /etc/fstab"
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5692

PostPosted: Sat May 05, 2018 7:10 am    Post subject: Reply with quote

I think that is a typo.

Try
Code:
mount -t proc none /mnt/gentoo/proc

_________________
overlay | patches
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
EBOOT.BIN
n00b
n00b


Joined: 10 Dec 2017
Posts: 8

PostPosted: Sat May 05, 2018 7:14 am    Post subject: Reply with quote

bunder wrote:
I think that is a typo.

Try
Code:
mount -t proc none /mnt/gentoo/proc


I get the same error. I can't even cd to those directories. I'm not sure why, everything went perfect until I rebooted
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5692

PostPosted: Sat May 05, 2018 7:28 am    Post subject: Reply with quote

Chances are you didn't mount /mnt/gentoo first. This should be the partition you used to install on, back on the previous page of the handbook.

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks
_________________
overlay | patches
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12805

PostPosted: Sat May 05, 2018 4:44 pm    Post subject: Reply with quote

If you still have trouble, please post the exact command you ran and its full output. Do not say "same error." I have seen too many threads where someone classifies two distinct errors as "the same" and people go in circles debugging the wrong problem.
Back to top
View user's profile Send private message
EBOOT.BIN
n00b
n00b


Joined: 10 Dec 2017
Posts: 8

PostPosted: Sat May 05, 2018 11:37 pm    Post subject: Reply with quote

bunder wrote:
Chances are you didn't mount /mnt/gentoo first. This should be the partition you used to install on, back on the previous page of the handbook.

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks

"mount /mnt/gentoo"

output: "mount: /mnt/gentoo: can't find in fstab"
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 447
Location: Hawaii

PostPosted: Sun May 06, 2018 6:20 am    Post subject: Reply with quote

EBOOT.BIN wrote:
bunder wrote:
Chances are you didn't mount /mnt/gentoo first. This should be the partition you used to install on, back on the previous page of the handbook.

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks

"mount /mnt/gentoo"

output: "mount: /mnt/gentoo: can't find in fstab"


So mount /gentoo by device

mount /dev/sd?? /gentoo, which is where you ought to be mounting it.

Then check your fstab for errors.
_________________
Asus Prime x370 Pro
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
EBOOT.BIN
n00b
n00b


Joined: 10 Dec 2017
Posts: 8

PostPosted: Sat May 12, 2018 6:08 am    Post subject: Reply with quote

Okay I was able to mount /dev/sda3 /mnt/gentoo and chroot

However, emerge --ask sys-boot/grub:2

returns:
Code:
Failed to validate a sane '/dev'.
bash process substitution doesn't work; this may be an indication of a broken '/dev/fd'.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5692

PostPosted: Sat May 12, 2018 10:25 am    Post subject: Reply with quote

Did you forget to mount dev before chrooting? you have to mount them (/dev, /sys, /proc) all as if you were starting over from the beginning.
_________________
overlay | patches
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
EBOOT.BIN
n00b
n00b


Joined: 10 Dec 2017
Posts: 8

PostPosted: Sat May 12, 2018 11:32 pm    Post subject: Reply with quote

Okay now I'm stuck at
Code:
grub-install --target=x86_64-efi --efi-directory=/boot


output
Code:
grub-install: error: /boot doesnt look like an EFI partition
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 447
Location: Hawaii

PostPosted: Sun May 13, 2018 12:53 am    Post subject: Reply with quote

EBOOT.BIN wrote:
Okay now I'm stuck at
Code:
grub-install --target=x86_64-efi --efi-directory=/boot


output
Code:
grub-install: error: /boot doesnt look like an EFI partition


Go read up on the requirements of a valid efi system partition and fix your /boot so that it works.
_________________
Asus Prime x370 Pro
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
P.Kosunen
Apprentice
Apprentice


Joined: 21 Nov 2005
Posts: 299
Location: Finland

PostPosted: Sun May 13, 2018 11:45 am    Post subject: Reply with quote

EBOOT.BIN wrote:
Okay now I'm stuck at

https://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT

Grub2 Wiki has more info about EFI partition.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12805

PostPosted: Sun May 13, 2018 4:11 pm    Post subject: Reply with quote

bammbamm808 wrote:
Go read up on the requirements of a valid efi system partition and fix your /boot so that it works.
That advice seems a bit obvious under the circumstances. Do you have specific resources in mind that he should read? Other than trying the command that failed for him, are there particular tests he should use to identify when his /boot "works"?
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 447
Location: Hawaii

PostPosted: Mon May 14, 2018 12:30 am    Post subject: Reply with quote

Hu wrote:
bammbamm808 wrote:
Go read up on the requirements of a valid efi system partition and fix your /boot so that it works.
That advice seems a bit obvious under the circumstances. Do you have specific resources in mind that he should read? Other than trying the command that failed for him, are there particular tests he should use to identify when his /boot "works"?


If it is obvious, he ought to get to it.

No one is stopping you from spoonfeeding as much as you wish. I think the OP would be better served by doing some research and spending some time applying what he learns to his system, than by simply being handed answers that may or may not be correct for his circumstance. I am far from the most technically adept person to have learned to set up and utilize an ESP, and I did it utilizing already-existing resources, trial-and-error and time.
_________________
Asus Prime x370 Pro
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
ValerieVonck
n00b
n00b


Joined: 17 Aug 2017
Posts: 25
Location: Erpe-Mere, Oostvlaander

PostPosted: Mon May 14, 2018 10:07 am    Post subject: Re: Failed to reboot after grub install. UEFI Reply with quote

EBOOT.BIN wrote:
Can someone show me how to get back to where I was before I rebooted and properly install grub on a uefi motherboard?

Thanks for any help :)


I did the following:

Code:

<Do the partition as described in the handbook>

- mkfs.fat -F 32 /dev/sda2
- mkfs.ext4 /dev/sda4
- mkswap /dev/sda3
- swapon /dev/sda3
- mount /dev/sda4 /mnt/gentoo

<Follow the handbook>
- mount --types proc /proc /mnt/gentoo/proc
- mount --rbind /sys /mnt/gentoo/sys
- mount --make-rslave /mnt/gentoo/sys
- mount --rbind /dev /mnt/gentoo/dev
- mount --make-rslave /mnt/gentoo/dev

chroot ...

<Follow the handbook>

/etc/fstab

/dev/sda2      /boot      vfat      noatime   1 2
/dev/sda4      /      ext4      noatime      0 1
/dev/sda3      none      swap      sw      0 0

<Follow the handbook>
- echo 'GRUB_PLATFORMS="efi-64"' >> /etc/portage/make.conf
- emerge -av grub
- grub-install --target=x86_64-efi --efi-directory=/boot
- mount -o remount,rw /sys/firmware/efi/efivars (if needed)
- grub-install --target=x86_64-efi --efi-directory=/boot --removable

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

<Follow the handbook>

_________________
Inter antecessum est melius
Back to top
View user's profile Send private message
EBOOT.BIN
n00b
n00b


Joined: 10 Dec 2017
Posts: 8

PostPosted: Sat May 19, 2018 4:25 am    Post subject: Reply with quote

I'm still struggling with this.. I've done some reading but I'm not sure if I can fix this without starting over? I can provide the output to any commands
Back to top
View user's profile Send private message
tuggbuss
Apprentice
Apprentice


Joined: 20 Mar 2017
Posts: 208

PostPosted: Sat May 19, 2018 6:32 am    Post subject: Reply with quote

What installation media are/were you using to boot up the installation in the first place?
Back to top
View user's profile Send private message
ValerieVonck
n00b
n00b


Joined: 17 Aug 2017
Posts: 25
Location: Erpe-Mere, Oostvlaander

PostPosted: Sat May 19, 2018 6:40 am    Post subject: Reply with quote

EBOOT.BIN wrote:
I'm still struggling with this.. I've done some reading but I'm not sure if I can fix this without starting over? I can provide the output to any commands


EBOOT.BIN,
Please use the Sysrescuecd, which contains the EFI and ZFS driver(s) / setup (if you want to use this ofcourse):

https://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/5.2.2/systemrescuecd-x86-5.2.2.iso/download
_________________
Inter antecessum est melius
Back to top
View user's profile Send private message
tuggbuss
Apprentice
Apprentice


Joined: 20 Mar 2017
Posts: 208

PostPosted: Sat May 19, 2018 6:53 am    Post subject: Reply with quote

ValerieVonck

There's my initial thoughts, i remember first time i was to install Gentoo Linux, i used the minimal installation media (official) and didn't get it to work with EFI. Then i used systemrescue and it went flawless.It's stated on "Choosing the right installation medium"

Code:
Note
As of April 20, 2017 the official Minimal CDs are incapable of booting in UEFI mode. They boot in BIOS (MBR) mode only. Readers looking to make their system UEFI bootable must download the latest Hybrid ISO (LiveDVD).
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12805

PostPosted: Sat May 19, 2018 4:15 pm    Post subject: Reply with quote

EBOOT.BIN wrote:
I'm still struggling with this.. I've done some reading but I'm not sure if I can fix this without starting over? I can provide the output to any commands
You can (almost) always fix Gentoo without starting over. At worst, you might need to backtrack and redo a few steps. Only the most severely broken systems require you to restart from scratch. Yours is nowhere near that point. Unfortunately, I have no solid advice on how to solve your current problem. bammbamm seems to, but does not seem inclined to share it.

ValerieVonck posted advice that looks sound to me. However, beware that some of those steps will discard data, so you need to be selective in which of those commands you run now. When you first installed the system, did your commands differ from what ValerieVonck showed? If yes, where did you deviate from what was shown? We can fix your deviations with a minimum of data loss, but we need to understand your current environment first.

If I were to guess, I would suggest posting the output of file -s /dev/sd* ; cat /proc/mounts, as seen right after grub-install fails for you.

A Google search on your error message led me to https://superuser.com/questions/1053388/grub2-install-error-boot-efi-doesnt-look-like-an-efi-partition-on-a-fresh-ge, which reports the same general symptoms you reported. I cannot tell if it is the same root cause. Have you tried the advice in that thread? If so, what happened? If not, please try it and report back.
Back to top
View user's profile Send private message
EBOOT.BIN
n00b
n00b


Joined: 10 Dec 2017
Posts: 8

PostPosted: Mon May 21, 2018 3:59 am    Post subject: Reply with quote

Hmm so I can't use the minimal installation I'll have to reinstall using the 2gb hybrid iso...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12805

PostPosted: Mon May 21, 2018 4:36 am    Post subject: Reply with quote

Why do you say that? What is so broken that you need to start over?
Back to top
View user's profile Send private message
tuggbuss
Apprentice
Apprentice


Joined: 20 Mar 2017
Posts: 208

PostPosted: Mon May 21, 2018 4:54 am    Post subject: Reply with quote

EBOOT.BIN wrote:
Hmm so I can't use the minimal installation I'll have to reinstall using the 2gb hybrid iso...


You can use it, but it might be trickier to get EFI to work, hence that you are not in EFI mode when installing (efivars)
I use systemrescuecd, it has support for EFI
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
Goto page 1, 2  Next
Page 1 of 2

 
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