Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot run efibootmgr -O "Read-only file system" [SOLVED]
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
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3081
Location: Illinois, USA

PostPosted: Tue Oct 31, 2017 9:23 pm    Post subject: Cannot run efibootmgr -O "Read-only file system" [ Reply with quote

After creating partitions with gdisk and installing gentoo, I tried to set the hard disk as the primary boot.
I am using sysrecuecd-5.1.1 on USB stick. The target is an HP pavilion netbook with E2-1800 CPU and 4G RAM.
I am trying to use refind not grub.
Code:
sysresccd / # efibootmgr
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 2001,2002
Boot0000* USB Hard Drive (UEFI) - UFD     USB Flash Drive
Boot2001* USB Drive (UEFI)
sysresccd / # efibootmgr -O
Could not remove entry from BootOrder: Read-only file system
sysresccd / # umount /dev/sda1
sysresccd / # mount -w /dev/sda1
sysresccd / # efibootmgr -O
Could not remove entry from BootOrder: Read-only file system
There is no DVD drive so I can't use the live DVD. When I try to boot, the BIOS reports it can't find a bootable medium, unless I put the USB stick in. With the USB stick if I try to boot "existing hard drive" the boot process starts but fails on "can't find /sbin/init. but from within the chroot
Code:
sysresccd / # ls -l /sbin/init
-rwxr-xr-x 1 root root 40504 Oct 29 17:09 /sbin/init

I'm stumped. How can I change the boot order? Do I have to give up and try legacy boot? Windows 8 booted with UEFI and I'm willing to try to fake out the BIOS into thinking refind is Windows, but how?


Last edited by Tony0945 on Thu Nov 02, 2017 1:45 am; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2613

PostPosted: Tue Oct 31, 2017 9:30 pm    Post subject: Reply with quote

See https://wiki.gentoo.org/wiki/Efibootmgr#EFI_vars
or https://wiki.gentoo.org/wiki/Talk:EFI_stub_kernel#efivarfs_mounted_ro_by_default_in_.3E.3D_sys-apps.2Fopenrc-0.28
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3081
Location: Illinois, USA

PostPosted: Tue Oct 31, 2017 10:36 pm    Post subject: Reply with quote

Thanks, Charles17. Magic incantations:
Code:


# fix stupid read-only default
mount -o remount,rw -t efivarfs efivarfs /sys/firmware/efi/efivars

#change boot order to boot refind first

efibootmgr -c -l \\EFI\\refind\\refind_x64.efi -L rEFInd

Success! of a sort, refind boots but doesn't find the kernel. I'll look into refind.conf

I had tried to mount the actual partition as read/write rather than /sys/firmware/efi/efivars
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Tue Oct 31, 2017 11:11 pm    Post subject: Reply with quote

There is no partition, efivars is in firmware. :)
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5761

PostPosted: Wed Nov 01, 2017 12:08 am    Post subject: Reply with quote

efivarfs defaults to read-only because of an infamous systemd bug report where someone typed rm -rf /* and it recursed into the efivars tree, bricking their motherboard. The motherboard manufacturer was the one at fault for writing a garbage firmware that violated the UEFI spec, but now everyone's room becomes a little more padded for it.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3081
Location: Illinois, USA

PostPosted: Wed Nov 01, 2017 12:10 am    Post subject: Reply with quote

Jaglover wrote:
There is no partition, efivars is in firmware. :)
To clarify, I had tried to mount the efi ef00 partition, /dev/sda1. I thought that was the one that was being complained about.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3081
Location: Illinois, USA

PostPosted: Thu Nov 02, 2017 1:44 am    Post subject: Reply with quote

refind couldn't find the kernel because when I built it apparently I was not in the chroot. I ssh'd in and was in the sysrescue root, not the chroot. Built it again and it boots.
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