You are not logged in.

#1 2018-08-27 10:00:49

maxpesa
Member
From: Italy
Registered: 2017-07-10
Posts: 11

[SOLVED] Refind auto-installation feature, configuration file location

Hi, I just installed Arch on my new ssd (in particular, my system uses a mechanical HD to boot Windows, and has its ESP on that same HD).
My older dual-boot configuration had refind-install automatically work. This thime, however it found Win10 correctly, but failed to set the proper boot config for Arch (failed to mount the root partition, leaving me with an emergency shell).

Disk /dev/nvme0n1: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: DC96CB3E-E47A-4E2C-819C-4DF60D9FC1B0

Device         Start       End   Sectors   Size Type
/dev/nvme0n1p1    34     32767     32734    16M Microsoft reserved
/dev/nvme0n1p2 32768 250069646 250036879 119.2G Linux filesystem


Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C5A63712-97B6-4371-9243-BAFA30C44099

Device         Start       End   Sectors   Size Type
/dev/sda1       2048    534527    532480   260M EFI System
/dev/sda2     534528    567295     32768    16M Microsoft reserved
/dev/sda3     567296 598319103 597751808   285G Microsoft basic data
/dev/sda4  615096320 922294271 307197952 146.5G Microsoft basic data
/dev/sda5  922296320 974725119  52428800    25G Microsoft basic data
/dev/sda6  974725120 976773119   2048000  1000M Windows recovery environment

My "hack" to get refind to point me to my actual Arch system was to edit the boot options in Refind (F2 presents boot options and lets you choose different ones), getting them to. Then I made it permanent modifying refind_linux.conf from within my temporarily working Arch install.

refind_linux.conf

"Boot with standard options"  "root=/dev/nvme0n1p2"
"Boot to single-user mode"    "ro root=/dev/nvme0n1p2 single"
"Boot with minimal options"   "ro root=/dev/nvme0n1p2"

The system now boots normally, but I fear that this is not a "stable configuration", ad the foundamental boot options are appended, and not completely generated/polished by/for Refind.
Navigating refind.conf I find that everything is disabled or commented, so that file is not used.

Where does the automatic install of refind store its boot stanzas?

Last edited by maxpesa (2018-09-04 18:16:47)


There are no passengers on spaceship earth. We are all crew.

Offline

#2 2018-08-27 11:51:44

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Refind auto-installation feature, configuration file location

refind does not store automatic boot stanzas in a file. It generates them in memory at run time when it boots. The aim is that refind can work without configuration at all (not even an auto generated one). It usually works when it has the proper driver to read your root partition and you keep everything inside it (including /boot and /etc/fstab). If this is not the case you can put configuration files where the kernel resides (AFAIK). It is also possible to add manual stanza in refind.conf. I have simply disabled the automatic booting and add the staza completely manually. I find it easier to know exactly what is going on.

Offline

#3 2018-08-27 18:55:03

maxpesa
Member
From: Italy
Registered: 2017-07-10
Posts: 11

Re: [SOLVED] Refind auto-installation feature, configuration file location

Thanks for your reply, I will try to create the config file myself. Would you point me to a known working refind.conf? The given examples and comments are well written, but I'd prefer being 100% confident when doing this (I hate having to get on the live environment every time big_smile).


There are no passengers on spaceship earth. We are all crew.

Offline

#4 2018-08-27 19:24:22

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Refind auto-installation feature, configuration file location

Here (https://bpaste.net/show/8daff98a4301) is the refind.conf I use but you need to adapt it to your case. Look at this page for explanation: https://www.rodsbooks.com/refind/configfile.html. I keep the whole arch system within a single partition (including /boot). Only refind (and the Microsoft boot loader for Windows 10) resides in the EFI partition. I use the ext4 refind driver to read my ext4 partition.

Offline

Board footer

Powered by FluxBB