1

I just upgrade Debian from Stretch to Buster. I have a Win 10 installation on another partition but before I was not able to get a Boot menu with both choices so I had to modify the BIOS settings to be able to boot from Windows.

With Buster, the situation is better, I have a rEFInd screen where I choose Windows or Debian. The remaining problem is that Windows is selected by default (EDIT: I was wrong, Windows is not selected by default, the latest booted OS is selected by default).

I have read few things but I cannot find how to set the default configuration for the boot manager.

Here is the output of parted:

GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print all                                                        
Model: ATA SAMSUNG HD204UI (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  2000GB  2000GB  primary  ext4


Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name                          Flags
 1      1049kB  473MB  472MB   ntfs            Basic data partition          hidden, diag
 2      473MB   578MB  105MB   fat32           EFI system partition          boot, esp
 3      578MB   595MB  16.8MB                  Microsoft reserved partition  msftres
 4      595MB   210GB  209GB   ntfs            Basic data partition          msftdata
 5      210GB   210GB  1049kB                                                bios_grub
 6      210GB   487GB  278GB   ext4
 7      487GB   500GB  12.8GB  linux-swap(v1)

I expected to find a refind.conf in /dev/sdb2 but I didn't find anything.

$ tree -L 3 /boot/efi/
/boot/efi/
└── EFI
    ├── Boot
    │   └── bootx64.efi
    ├── Microsoft
    │   ├── Boot
    │   ├── bootmgfw.efi
    │   └── Recovery
    └── tools

Another thing to mention is that the output of efibootmgr is unexpected :

$ efibootmgr
BootCurrent: 0000
No BootOrder is set; firmware will attempt recovery

What do I have to do to boot by default to Debian ?

EDIT: As said in the text, I thought that Windows was selected by default but it is the latest booted OS that is selected by default. I didn't succeed in changing the configuration of rEFInd but I can live with the default one.

1
+50

Per the rEFInd Documentation, the default_selection option is used to set the default operating system to boot.

Sets the default boot OS based on the loader's title, which appears in the main menu beneath the icons when you select the loader.

By default, the rEFInd configuration file should be located at either /boot/efi/EFI/Microsoft/Boot/refind.conf, if installed from Windows, or /boot/efi/EFI/refind/refind.conf, if installed from Linux.

Alternatively, one can use the following command to locate it:

find /boot/efi/EFI/ -name refind.conf

If there is no refind.conf in the EFI System Partition (ESP), simply re-install rEFInd manually,

cp -r refind /boot/efi/EFI/
  • Thanks to your answer, I had a second look at the documentation and try to execute /usr/sbin/refind-install (which I found by looking into the package file list which gives me the location of refind.conf : /boot/efi/EFI/Microsoft/Boot/refind.conf (I should also have try the find command). Can you add a little bit of this explanation so that I can accept your answer ? – Jona Aug 28 at 19:13
  • I have updated my answer accordingly. – Lucas Ramage Aug 28 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.