Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo doesn't boot after uefi-bios update [SOLVED-THANKS!]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
Pinnjail
n00b
n00b


Joined: 21 Feb 2019
Posts: 8

PostPosted: Thu Feb 21, 2019 5:13 pm    Post subject: Gentoo doesn't boot after uefi-bios update [SOLVED-THANKS!] Reply with quote

After updating from Asus UEFI 2501 to Asus UEFI 2901, gentoo doesn't boot anymore. In the list of bootable devices it finds the disk in which gentoo is installed, but it doesn't find anything on it. If I try to boot from that disk the system tells me that there are no OS. I've also another disk with Windows that is able to boot with no problem. I tried to disable fast boot and secure boot, but nothing changed. I also tried to reconfigure GRUB2 via the liveUSB but the problem persist.
I was thinking of recompiling the kernel, but is it a good move? Are there other things that I should do?
Thanks you in advance
And excuse me for my bad English but unfortunately it is not my mothertongue


Last edited by Pinnjail on Sat Feb 23, 2019 11:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
joanandk
Apprentice
Apprentice


Joined: 12 Feb 2017
Posts: 169

PostPosted: Thu Feb 21, 2019 7:47 pm    Post subject: Reply with quote

Hi Pinnjail,

Do you have a gpt partition table? Is the first partition a fat32 file system and has the boot flag? Is the size of the first partition smaller than 250MB?

If yes to all the above questions, please try to use efi stub on the kernel, place the compiled kernel into EFI/BOOT/BOOTX64.EFI on the root of the first partition.

If booting the Kernel fails too, you might have encountered the same bug I have on my HP desktop PC!

My problem with HP desktop PC:
a) It boots from Samsung EVO 850 250GB without issues and with EFI.
b) It does not boot the same image from Samsung Pro 860 512GB with EFI!
c) It boots from Seagate 500GB HDD and with EFI.
d) It boots from USB-flash with the same Kernel on the Samsung Pro 860 512GB with EFI, where the Kernel is placed on the root of the USB-flash under "EFI/BOOT/BOOTX64.EFI". The rest of the system lies on the Samsung SSD.

I in the meantime am using legacy boot (=BIOS emulation) on the HP and Lilo on the 512GB SSD. I see no disadvantage by using legacy boot.

BR
Back to top
View user's profile Send private message
Pinnjail
n00b
n00b


Joined: 21 Feb 2019
Posts: 8

PostPosted: Fri Feb 22, 2019 8:40 pm    Post subject: Reply with quote

Thank for your reply joanandk!
Yes I have a GPT partition table, the boot flag is set correctly and the size of the boot partition is less the 250MB. The file system is FAT16; but the Handbook says that it should work just fine.
I tried to use uefi stub but it also didn't work correctly; the system will just boot from the next bootable option in the order.

At the end, scared that it could be a bug with ASUS UEFI 2901, I decided to go back to UEFI 2501 that worked perfectly. Unfortunately the problem is still present and I am not able to boot my Gentoo system.

I supect now that it is a problem inside the BIOS, but I disabled fast boot and secure boot and I have CSM on, so I don't know from where that can come from.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1468
Location: Earth

PostPosted: Fri Feb 22, 2019 9:31 pm    Post subject: Reply with quote

hello,

did you ' reset your BIOS to default settings ' after update ?

on my MSI Mainboards i had to login twice into the BIOS, to see or set the first Boot device!

and did you try to boot via BIOS boot menue and choose your device, eg F11 or F12 ?

goog luck :)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Pinnjail
n00b
n00b


Joined: 21 Feb 2019
Posts: 8

PostPosted: Fri Feb 22, 2019 11:12 pm    Post subject: Reply with quote

Hi CooSee,
The BIOS resetted itself automatically to default after the update; that's why I think that the problem might be some BIOS settings that stop GRUB 2 from starting.
I have choose the device in which I have installed Gentoo in the boot menu; but the boot menu didn't even label it as Gentoo. So when i tried to boot from that device I obtain a no system found error.

So i decided to change the filetype to FAT 32 and I remerged and reinstalled GRUB2. Now it finally appears again in the boot menu, but when I try to boot from it nothing happens and the system goes back to BIOS. It is like GRUB 2 can't even start
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Feb 22, 2019 11:17 pm    Post subject: Reply with quote

Use efibootmgr to activate entries in the firmaware.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
nick_gentoo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2019
Posts: 140

PostPosted: Sat Feb 23, 2019 8:06 am    Post subject: Reply with quote

Pinnjail wrote:

So i decided to change the filetype to FAT 32 and I remerged and reinstalled GRUB2. Now it finally appears again in the boot menu, but when I try to boot from it nothing happens and the system goes back to BIOS. It is like GRUB 2 can't even start


Hi, Pinnjail

The re-emerge was not necessary, only the re-installation on the boot partition. What command did you use for re-installing?
What is your partition layout on this drive? You can see that by running parted -l or fdisk -l on your drive, depending on the tool you used for partitioning.
Also, please post the output of efibootmgr -v.
Back to top
View user's profile Send private message
Pinnjail
n00b
n00b


Joined: 21 Feb 2019
Posts: 8

PostPosted: Sat Feb 23, 2019 10:35 am    Post subject: Reply with quote

Sorry for the noob question, but how can I post the output of the commands without having to copy it world by world?
Back to top
View user's profile Send private message
nick_gentoo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2019
Posts: 140

PostPosted: Sat Feb 23, 2019 10:59 am    Post subject: Reply with quote

Pinnjail, by "copy it word by word" do you mean to manually type here the output of the commands? There is an easier way.
I assume you have a working install/rescue CD, that you used to reinstall grub, and that you chroot into the existing Gentoo installation, is this correct?

To copy text between 2 different windows under X, do the following:
  • in the first window (e.g. the terminal where you are running the commands) select (highlight) the output using the mouse
  • in the 2nd window (e.g. the browser where you are writing on these forums) click in the text box where you want to paste the text and middle-click on the mouse
Back to top
View user's profile Send private message
Pinnjail
n00b
n00b


Joined: 21 Feb 2019
Posts: 8

PostPosted: Sat Feb 23, 2019 11:46 am    Post subject: Reply with quote

Thank you very much for the reply. I couldn't start an X server from the LiveCD. So I saved the output in txt files and I am using another machine to post here.

The output of parted is the following (the disk in which gentoo is installed is /dev/sdd)


Code:
Model: ATA ST31000528AS (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
                                                                                                                                                                                               
Number  Start   End     Size   Type      File system  Flags                                                                                                                                     
 1      32.3kB  210GB   210GB  primary   ntfs         boot                                                                                                                                     
 2      232GB   1000GB  768GB  extended               lba                                                                                                                                       
 5      232GB   1000GB  768GB  logical   ntfs                                                                                                                                                   
                                                                                                                                                                                               
                                                                                                                                                                                               
Model: ATA ST31000528AS (scsi)                                                                                                                                                                 
Disk /dev/sdb: 1000GB                                                                                                                                                                           
Sector size (logical/physical): 512B/512B                                                                                                                                                       
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type      File system  Flags
 2      8225kB  1000GB  1000GB  extended               lba
 5      8258kB  1000GB  1000GB  logical   ntfs


Model: ATA KINGSTON SV300S3 (scsi)
Disk /dev/sdc: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End    Size   File system  Name                          Flags
 1      1049kB  316MB  315MB  ntfs         Basic data partition          hidden, diag
 2      316MB   420MB  105MB  fat32        EFI system partition          boot, esp
 3      420MB   555MB  134MB               Microsoft reserved partition  msftres
 4      555MB   239GB  239GB  ntfs         Basic data partition          msftdata
 5      239GB   240GB  472MB  ntfs                                       hidden, diag
 6      240GB   240GB  473MB  ntfs                                       hidden, diag


Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sdd: 480GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name    Flags
 1      1049kB  3146kB  2097kB               grub    bios_grub
 2      3146kB  137MB   134MB   fat32        boot    boot, esp
 3      137MB   33.7GB  33.6GB               swap
 4      33.7GB  210GB   176GB   ext4         rootfs
 5      210GB   480GB   270GB   ext4         home


Model: Lexar USB Flash Drive (scsi)
Disk /dev/sde: 8020MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 2      81.9kB  6693kB  6611kB  primary               esp


The output of efibootmgr -v is:

Code:
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0003,0001,0000,0004,0005
Boot0000  Windows Boot Manager  HD(2,GPT,6b12ed39-c8a6-4cb2-911d-ca7cb696ef98,0x96800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...o................
Boot0001  UEFI: Lexar USB Flash Drive   PciRoot(0x0)/Pci(0x15,0x3)/Pci(0x0,0x0)/USB(3,0)/HD(1,MBR,0x67b16c0a,0xa0,0x3270)AMBO
Boot0003* Gentoo        HD(2,GPT,9a9bf3b3-91c5-41bf-9d9c-6421c86f60e7,0x1800,0x40000)/File(\boot\EFI\gentoo\bzImage.efi)
Boot0004  Hard Drive    BBS(HD,,0x0)AMGOAMNO........u.K.I.N.G.S.T.O.N. .S.A.4.0.0.S.3.7.4.8.0.G....................A.................................>..Gd-.;.A..MQ..L.0.5.2.0.B.6.6.7.2.8.D.5.2.3.A.1. . . . ......AMBOAMNO........o.S.T.3.1.0.0.0.5.2.8.A.S....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .V.5.6.P.5.G.D.T......AMBOAMNO........o.S.T.3.1.0.0.0.5.2.8.A.S....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .V.9.9.P.7.X.9.W......AMBOAMNO........o.K.I.N.G.S.T.O.N. .S.V.3.0.0.S.3.7.A.2.4.0.G....................A...........................>..Gd-.;.A..MQ..L.0.5.2.0.B.6.2.7.5.4.2.0.F.8.C.A. . . . ......AMBOAMNO........s.L.e.x.a.r. .U.S.B. .F.l.a.s.h. .D.r.i.v.e....................A.............................@..Gd-.;.A..MQ..L.L.e.x.a.r. .U.S.B. .F.l.a.s.h. .D.r.i.v.e......AMBO
Boot0005  UEFI OS       HD(2,GPT,9a9bf3b3-91c5-41bf-9d9c-6421c86f60e7,0x1800,0x40000)/File(\EFI\BOOT\BOOTX64.EFI)


But I find it pretty unreadable so I decided to print also the output of efibootmgr:

Code:
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0003,0001,0000,0004,0005
Boot0000  Windows Boot Manager
Boot0001  UEFI: Lexar USB Flash Drive
Boot0003* Gentoo
Boot0004  Hard Drive
Boot0005  UEFI OS


To install grub 2 I followed the Handbook for AMD64 UEFI and I used:
Code:
grub-install --target=x86_64-efi --efi-directory=/boot --removable
Back to top
View user's profile Send private message
nick_gentoo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2019
Posts: 140

PostPosted: Sat Feb 23, 2019 2:04 pm    Post subject: Reply with quote

Did you also mount the EFI partition before running grub-install? As the handbook says at https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader .
Code:
Boot0003* Gentoo        HD(2,GPT,9a9bf3b3-91c5-41bf-9d9c-6421c86f60e7,0x1800,0x40000)/File(\boot\EFI\gentoo\bzImage.efi)

shows that the boot entry is not the Grub image, but rather a Linux kernel image - maybe your earlier attempt with the EFI stub. The correct Grub image after installation should be \boot\EFI\boot\BOOTX64.EFI.
Back to top
View user's profile Send private message
Pinnjail
n00b
n00b


Joined: 21 Feb 2019
Posts: 8

PostPosted: Sat Feb 23, 2019 11:49 pm    Post subject: Reply with quote

I finally made it!!

nick_gentoo made me notice that the boot entry was pointing at the wrong image, so I decided to reinstall GRUB 2. This time I didn't use the removable flag but I don't know if it really helped. After the reinstall Gentoo has reappeared in the boot menu of BIOS under the name of OTHER UEFI SYSTEM, but it boots just fine!! Thank you very much guys, you were very helpful!!

If it is possible I would like to ask a last question, that it is more a doubt then a problem. When I was working inside the liveCD I noticed that in /home/user/ some documents were missing. In the last week I was working at an university project that was totally disappeared! The same is valid for the Download folder, in which the downloads that I made recently were missing. It was like my system resetted itself in the state it was a month ago. But when I finally was able to boot the system all the documents were back! I really can't explain why this has happened!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 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