Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] LiveUSB recognises SATA controller, BIOS doesn't.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tindomieru
n00b
n00b


Joined: 01 May 2023
Posts: 6

PostPosted: Sat Feb 15, 2025 5:19 pm    Post subject: [Solved] LiveUSB recognises SATA controller, BIOS doesn't. Reply with quote

Hello,

Last night I completed installing Gentoo, then turned off the laptop and pulled the adapter plug. My laptop doesn't have a battery othet than a 3V CMOS battery.
Today, when I turned my laptop on, the boot screen showed me several messages saying "CMOS battery is bad or was lately replaced. A first boot or NVRAM reset condition has been detected. The CMOS defaults were loaded." and wanted me to check the user guide if I continued to see this. After the messages ended, it prompted me the "Reboot and select proper boot device" screen.
BIOS detected the SATA drive I had, yet it did not detect the SATA controller. I replaced the CMOS battery with a brand new one, it didn't cause a difference in the behaviour of the system. I checked the PCI devices and drives using lspci and lsblk, respectively. My SATA controller was there and /dev/sda, the drive Gentoo was installed on, was there too. fsck didn't detect anything odd with the partitions either.

SATA mode chosen in the BIOS menu is AHCI, boot is by UEFI.

What might have caused this issue and how can I solve this issue? Thank you in advance.


Last edited by tindomieru on Sat Feb 15, 2025 8:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9898
Location: almost Mile High in the USA

PostPosted: Sat Feb 15, 2025 7:07 pm    Post subject: Reply with quote

Not sure I totally understand what's going on, but I suspect you may need to reinstall the boot option running efibootmgr that was used when installing if you didn't use "removable boot" (and grub).
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
tindomieru
n00b
n00b


Joined: 01 May 2023
Posts: 6

PostPosted: Sat Feb 15, 2025 7:31 pm    Post subject: Reply with quote

I used grub. I tried to reinstall grub, it detected the kernel etc. but BIOS still has no boot option.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54875
Location: 56N 3W

PostPosted: Sat Feb 15, 2025 7:54 pm    Post subject: Reply with quote

tindomieru,

efibootmgr writes the UEFI boot options. It can be invoked by grub or you can do it yourself.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tindomieru
n00b
n00b


Joined: 01 May 2023
Posts: 6

PostPosted: Sat Feb 15, 2025 8:34 pm    Post subject: Reply with quote

Thank you both for your replies, I solved it by adding a boot entry with the mentioned efibootmgr.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9898
Location: almost Mile High in the USA

PostPosted: Sun Feb 16, 2025 3:59 am    Post subject: Reply with quote

I used the 'removable boot' option for grub and thus did not need to use efibootmgr. Otherwise a boot menu option is needed whether you use grub with a fixed install or using UEFI to load a kernel directly.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3950
Location: Rasi, Finland

PostPosted: Sun Feb 16, 2025 9:02 am    Post subject: Reply with quote

eccerr0r wrote:
I used the 'removable boot' option for grub
I needed to do exactly that with my newest build as its UEFI seems to be broken.
The 'removable boot' is somewhat misleading, as it simply copies grub into the default EFI loader location in ESP and doesn't touch efi variables. Meaning one can use that option with non-removable boot drives too.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5407
Location: Bavaria

PostPosted: Sun Feb 16, 2025 9:20 am    Post subject: Reply with quote

Zucca wrote:
The 'removable boot' is somewhat misleading, as it simply copies grub into the default EFI loader location in ESP and doesn't touch efi variables. Meaning one can use that option with non-removable boot drives too.

No, the grub-install (with this parameter) does a bit more: It renames the “grubx64.efi” to “bootx64.efi”. According to the UEFI specification, this must ALWAYS be recognized WITHOUT a UEFI entry pointing to it. The intention for this was NOT to create a workaround for broken UEFIs, but to be able to boot from a CD-ROM or USB stick without having to find out what the bootable file on the USB stick is called beforehand - and without having to create a UEFI entry for it beforehand (because “bootx64.efi” is simply always recognized) ...

... and because it is actually intended to boot from a “removable” device, this parameter has been given this name.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3950
Location: Rasi, Finland

PostPosted: Mon Feb 17, 2025 5:46 pm    Post subject: Reply with quote

pietinger,

I think we both said the same.
I said
Zucca wrote:
as it simply copies grub into the default EFI loader location in ESP and doesn't touch efi variables
by which I meant it installs grub into ${ESP}/BOOT/BOOTX64.EFI and by efi variables I meant efi boot entries.

I needed to use this removable boot option on my newest install because its UEFI seems to be broken.
So one can actually use this removable boot option (like eccerr0r and I have) to install grub on an disk that's non-removable.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5407
Location: Bavaria

PostPosted: Mon Feb 17, 2025 7:31 pm    Post subject: Reply with quote

Zucca wrote:
[...] So one can actually use this removable boot option (like eccerr0r and I have) to install grub on an disk that's non-removable.

Yes, of course ...
Zucca wrote:
[...] I think we both said the same.

...
Zucca wrote:
[...] The 'removable boot' is somewhat misleading [...]

... I just wanted to explain why this parameter is called what it is. The main application for this parameter is actually to install a grub on a usb stick.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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