View previous topic :: View next topic |
Author |
Message |
VectorPrimeSM n00b
Joined: 13 Jan 2024 Posts: 13
|
Posted: Sat Jan 13, 2024 9:06 pm Post subject: System doesn't boot after update [SOLVED] |
|
|
Hi!
I'm new to Gentoo, so there're a good amount of things I still don't understand.
I've done a system update, and now my system won't boot. It doesn't even go to the GRUB screen. When I start my PC it shows the UEFI logo, then the screen flickers, the keyboard backlighting shuts off and it promts me to the UEFI utility.
I've done emerge --depclean after the update and the only thing that was removed was the kernel, so it is entirely possible that I've somehow nuked the kernel itself. Though it deleted it every time I did an update priviously.
I neither know what the problem is or how to fix it. Frankly, I don't even know how to get to the disk now to start fixing the problem.
This has never happened to me previously, so I'm not really sure what to do form here, so I'd be glad, if anyone could help me with this situation.
This is a cry for help.
Also, English isn't my native language, so I'm really sorry if my words sound off.
UPDATE:
My system finally works. I've figured out the boot partition problem. By doing 'mount -a' and then mounting /dev/sda1 at /efi.
After that I was successfully able to install the kernel, which was picked up by grub, but only on my second try.
The way I did it doens't seem right, so I won't recommend anyone to do it this way, but my system now boots and works as it used to.
To recap, the problem was that system update nuked both my grub and my kernel, so reinstalling both did the trick.
Last edited by VectorPrimeSM on Mon Jan 15, 2024 10:13 pm; edited 1 time in total |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Sat Jan 13, 2024 10:06 pm Post subject: |
|
|
Hi so good news this isn't just you... I was hit by this and a few others.
https://bugs.gentoo.org/920708. You will need to boot off a liveUSB and run grub-install
Check /boot for old EFI files and if removing the older one doesn't work then writing grub back to your efi partition will be needed
Essentially think of this like a selective following of the gentoo handbook
1. boot off a LiveUSB (gentoo, kali etc..)
2. mount your RootFS and chroot as per: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Chrooting ( you don't need to worry about the dns)
3. Check where your EFI partition is... (mine was all of /boot with an EFI subdirectory but I took the opportunity to re-align to the mainual)
4. Grub install https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#UEFI_systems (this is to the EFI section, if you are using legacy go back one... I don't even know if legacy was impacted)
Wrapped the bug URL within URL tags to prevent the period from being included in the clickable. —Chiitoo _________________
Quote: | Removed by Chiitoo |
Last edited by Naib on Sat Jan 13, 2024 10:18 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54337 Location: 56N 3W
|
Posted: Sat Jan 13, 2024 10:16 pm Post subject: |
|
|
VectorPrimeSM,
Welcome to Gentoo,
I've been here 20 years and theres a good amount of things I still don't understand.
The things i do understand keep changing, so that keeps me on my toes. :)
Quote: | It doesn't even go to the GRUB screen. When I start my PC it shows the UEFI logo, then the screen flickers, the keyboard backlighting shuts off and it promts me to the UEFI utility. |
That sounds like your efivars have been mangled.
Find your install media. Follow the handbook to mount your install at /mnt/gentoo. Do not make any partitions. Do not make any filesystems. Those steps would destroy your install.
Don't forget /dev/, /proc and /sys.
Now do the chroot steps.
Its all still there, you have to put the pieces together again.
All my installs have a script called humptdumpty.sh that does that. After the English nursery rhyme.
Once you are back in your install, have a look at the output of
Is the boot order correct?
Is there even an entry that starts grub?
Post the output if you want someone else to look at it.
You can get quite good at this recovery process if you need to. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
VectorPrimeSM n00b
Joined: 13 Jan 2024 Posts: 13
|
Posted: Sun Jan 14, 2024 8:57 am Post subject: |
|
|
Fristly, thank you everyone for your help!
However, it seems I'm more stupid than originally thought.
I seem to be unable to mount the partitions (Probably that's down to my stupidity). I'm using gentoo minimal installations CD as a liveUSB (maybe that's the problem). When I try to mount anything, I get a reply that there no file or directory '/mnt/gentoo'.
After reviewing my drive, I've found that my /boot, /mnt and /proc are empty.
Any suggestions? |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Sun Jan 14, 2024 12:21 pm Post subject: |
|
|
The minimal is more than enough (unless you are using some esoteric root filesystem or your hardware is soo new there isn't any storage drivers)
When I try to mount anything, I get a reply that there no file or directory '/mnt/gentoo'.
Interesting... a Gentoo liveDisc has this directory premade as it aligns nicely with the handbook: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks#Mounting_the_root_partition
No fear, if the liveDisc is old it can simply be made:
Code: |
mkdir --parents /mnt/gentoo |
Quote: |
After reviewing my drive, I've found that my /boot, /mnt and /proc are empty. |
so /proc is meant to be empty as this is used by the kernel and it mounts proc onto this area
Likewise /mnt typically is empty as aspects of xdg moved to /media
now /boot being empty could be correct but it depends on how your system was configured
IF /boot is its own partition then the rootfs /boot will be empty as you would mount another partition to contain the information.
Likewise if you have an EFI system it use to be prefered that /boot was the entire EFI partition (containing the kernels maps stages efi stubs...)
If you boot back into the liveDisc and use the lsblk command as well as post your fstab, aspect can we corrected
For reference:
Code: | cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
PARTLABEL=efi /efi vfat noauto,noatime 1 2 # UEFI boot partition
PARTLABEL=rootfs / ext4 noatime,nodiratime 0 1 # M.2
LABEL=RAG /var/tmp ext4 noatime,nodiratime 0 2 # rag SDD for compiling
tmpfs /tmp tmpfs size=1G,noatime 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
|
Code: | lsblk --ascii
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 238.5G 0 disk
`-sda1 8:1 0 238.5G 0 part /var/tmp
nvme0n1 259:0 0 931.5G 0 disk
|-nvme0n1p1 259:1 0 130M 0 part
`-nvme0n1p2 259:2 0 931.4G 0 part / |
For reference I used to have all of /boot as a partition ( nvme0n1p1 ) and EFI was a directory in there that was created by grub-install . As a result my /boot in my rootFS was empty and the mounted partition at /boot contained my kernels and EFI.
So let's stick with the assumption that is just a case of removing the stale efi stubs rather than rewriting grub
The command Neddy recommended, efibootmgr, basically shows what the efi finds and you should see 2 UEFI entries (assuming gentoo is the only OS on your system)
Boot0000* gentoo HD(1,GPT,6f2bbc12-9088-4a2a-9caa-ee50363c994b,0x800,0x41000)/File(\EFI\GENTOO\GRUBX64.EFI)
Boot0002* UEFI OS HD(1,GPT,6f2bbc12-9088-4a2a-9caa-ee50363c994b,0x800,0x41000)/File(\EFI\BOOT\BOOTX64.EFI)
the key is only ONE GRUBX64.EFI, any additional ones need to be removed. _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
VectorPrimeSM n00b
Joined: 13 Jan 2024 Posts: 13
|
Posted: Sun Jan 14, 2024 2:42 pm Post subject: |
|
|
So, I think my LiveUSB was borked, as after a reflash everything was working as expected.
I was successful in mounting the partitions and running grub-install and grub-mkconfig.
One small problem -- grub didn't find any kernel. /boot is empty; no kernel.
By the way, I'm doing EFI, not legacy, so my /dev/sda1 is mounted at /efi.
Naturally I tried to emerge --ask sys-kernel/gentoo-kernel-bin. No luck there.
Error is: "Your boot partition is not mounted at /boot.
But, since I'm running EFI (no MBR) I have no idea, where the it should be mouned.
And thanks again for help. I really do appreciate that. |
|
Back to top |
|
|
|
|
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
|
|