* [gentoo-user] Dual Booting - selection from command line
@ 2024-01-10 0:18 thelma
2024-01-10 2:22 ` [gentoo-user] " Nikos Chantziaras
0 siblings, 1 reply; 9+ messages in thread
From: thelma @ 2024-01-10 0:18 UTC (permalink / raw
To: Gentoo mailing list
I have a box that is two HD's and both are bootable; using "refind" instead of grub.
So the selection I choose at boot which drive to boot will be the default (during reboot, from command line) until I select the second drive.
The box will be installed in a remote location, so I have no option to select which drive to boot from (unless I'm in front of the box).
Is it possible to select which drive I want to "boot" from the command line (reboot #2 etc)?
--
Thelma
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: Dual Booting - selection from command line
2024-01-10 0:18 [gentoo-user] Dual Booting - selection from command line thelma
@ 2024-01-10 2:22 ` Nikos Chantziaras
2024-01-10 17:23 ` thelma
0 siblings, 1 reply; 9+ messages in thread
From: Nikos Chantziaras @ 2024-01-10 2:22 UTC (permalink / raw
To: gentoo-user
On 10/01/2024 02:18, thelma@sys-concept.com wrote:
> I have a box that is two HD's and both are bootable; using "refind"
> instead of grub.
> So the selection I choose at boot which drive to boot will be the
> default (during reboot, from command line) until I select the second drive.
>
> The box will be installed in a remote location, so I have no option to
> select which drive to boot from (unless I'm in front of the box).
> Is it possible to select which drive I want to "boot" from the command
> line (reboot #2 etc)?
Maybe this helps:
https://gist.github.com/Darkhogg/82a651f40f835196df3b1bd1362f5b8c
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: Dual Booting - selection from command line
2024-01-10 2:22 ` [gentoo-user] " Nikos Chantziaras
@ 2024-01-10 17:23 ` thelma
2024-01-10 22:14 ` Mark Knecht
0 siblings, 1 reply; 9+ messages in thread
From: thelma @ 2024-01-10 17:23 UTC (permalink / raw
To: gentoo-user
On 1/9/24 19:22, Nikos Chantziaras wrote:
> On 10/01/2024 02:18, thelma@sys-concept.com wrote:
>> I have a box that is two HD's and both are bootable; using "refind" instead of grub.
>> So the selection I choose at boot which drive to boot will be the default (during reboot, from command line) until I select the second drive.
>>
>> The box will be installed in a remote location, so I have no option to select which drive to boot from (unless I'm in front of the box).
>> Is it possible to select which drive I want to "boot" from the command line (reboot #2 etc)?
>
> Maybe this helps: https://gist.github.com/Darkhogg/82a651f40f835196df3b1bd1362f5b8c
Thank you for the link.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: Dual Booting - selection from command line
2024-01-10 17:23 ` thelma
@ 2024-01-10 22:14 ` Mark Knecht
2024-01-17 15:40 ` thelma
0 siblings, 1 reply; 9+ messages in thread
From: Mark Knecht @ 2024-01-10 22:14 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
On Wed, Jan 10, 2024 at 2:38 PM <thelma@sys-concept.com> wrote:
>
> On 1/9/24 19:22, Nikos Chantziaras wrote:
> > On 10/01/2024 02:18, thelma@sys-concept.com wrote:
> >> I have a box that is two HD's and both are bootable; using "refind"
instead of grub.
> >> So the selection I choose at boot which drive to boot will be the
default (during reboot, from command line) until I select the second drive.
> >>
> >> The box will be installed in a remote location, so I have no option to
select which drive to boot from (unless I'm in front of the box).
> >> Is it possible to select which drive I want to "boot" from the command
line (reboot #2 etc)?
> >
> > Maybe this helps:
https://gist.github.com/Darkhogg/82a651f40f835196df3b1bd1362f5b8c
>
> Thank you for the link.
I have no experience with refind but for my UEFI systems I accomplish this
using efibootmgr and a simple batch file. The machine always boots Linux
by default but from within Linux I can tell it to reboot into Windows
mark@science2:~$ sudo efibootmgr
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0000
Boot0000* Windows Boot Manager
Boot0003* ubuntu
mark@science2:~$ cat bin/RebootWindows
sudo efibootmgr -n 0000
reboot
mark@science2:~$
HTH,
Mark
[-- Attachment #2: Type: text/html, Size: 1682 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: Dual Booting - selection from command line
2024-01-10 22:14 ` Mark Knecht
@ 2024-01-17 15:40 ` thelma
2024-01-17 16:54 ` Michael
2024-01-17 17:21 ` Mark Knecht
0 siblings, 2 replies; 9+ messages in thread
From: thelma @ 2024-01-17 15:40 UTC (permalink / raw
To: gentoo-user
On 1/10/24 15:14, Mark Knecht wrote:
>
>
> On Wed, Jan 10, 2024 at 2:38 PM <thelma@sys-concept.com <mailto:thelma@sys-concept.com>> wrote:
> >
> > On 1/9/24 19:22, Nikos Chantziaras wrote:
> > > On 10/01/2024 02:18, thelma@sys-concept.com <mailto:thelma@sys-concept.com> wrote:
> > >> I have a box that is two HD's and both are bootable; using "refind" instead of grub.
> > >> So the selection I choose at boot which drive to boot will be the default (during reboot, from command line) until I select the second drive.
> > >>
> > >> The box will be installed in a remote location, so I have no option to select which drive to boot from (unless I'm in front of the box).
> > >> Is it possible to select which drive I want to "boot" from the command line (reboot #2 etc)?
> > >
> > > Maybe this helps: https://gist.github.com/Darkhogg/82a651f40f835196df3b1bd1362f5b8c <https://gist.github.com/Darkhogg/82a651f40f835196df3b1bd1362f5b8c>
> >
> > Thank you for the link.
>
> I have no experience with refind but for my UEFI systems I accomplish this
> using efibootmgr and a simple batch file. The machine always boots Linux
> by default but from within Linux I can tell it to reboot into Windows
>
> mark@science2:~$ sudo efibootmgr
> BootCurrent: 0003
> Timeout: 1 seconds
> BootOrder: 0003,0000
> Boot0000* Windows Boot Manager
> Boot0003* ubuntu
>
>
> mark@science2:~$ cat bin/RebootWindows
> sudo efibootmgr -n 0000
> reboot
> mark@science2:~$
Thank you, yes that work perfectly
"efibootmgr -n " is one time entry for one reboot; to set it permanently one should use:
"efibootmgr -o + arrange entries"
Does anybody know how to rename the boot entries, in my case I have:
efibootmgr
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0000,0004,0002
Boot0000* rEFInd Boot Manager HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(\EFI\REFIND\REFIND_X64.EFI)
Boot0002* UEFI OS HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
Boot0004* rEFInd Boot Manager HD(1,GPT,9d2481cf-8c35-4d9d-88ee-1d0d6e06cc68,0x800,0x1dc800)/File(\EFI\refind\refind_x64.efi)
This is cryptic,
0000 - is sda disk
0004 - nvme disk
How to rename them to SDA and NVME respectively
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: Dual Booting - selection from command line
2024-01-17 15:40 ` thelma
@ 2024-01-17 16:54 ` Michael
2024-01-17 17:21 ` Mark Knecht
1 sibling, 0 replies; 9+ messages in thread
From: Michael @ 2024-01-17 16:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2894 bytes --]
On Wednesday, 17 January 2024 15:40:50 GMT thelma@sys-concept.com wrote:
> On 1/10/24 15:14, Mark Knecht wrote:
> > On Wed, Jan 10, 2024 at 2:38 PM <thelma@sys-concept.com
<mailto:thelma@sys-concept.com>> wrote:
> > > On 1/9/24 19:22, Nikos Chantziaras wrote:
> > > > On 10/01/2024 02:18, thelma@sys-concept.com <mailto:thelma@sys-
concept.com> wrote:
> > > >> I have a box that is two HD's and both are bootable; using "refind"
> > > >> instead of grub. So the selection I choose at boot which drive to
> > > >> boot will be the default (during reboot, from command line) until I
> > > >> select the second drive.
> > > >>
> > > >> The box will be installed in a remote location, so I have no option
> > > >> to select which drive to boot from (unless I'm in front of the
> > > >> box). Is it possible to select which drive I want to "boot" from
> > > >> the command line (reboot #2 etc)?> > >
> > > > Maybe this helps:
> > > > https://gist.github.com/Darkhogg/82a651f40f835196df3b1bd1362f5b8c
> > > > <https://gist.github.com/Darkhogg/82a651f40f835196df3b1bd1362f5b8c>>
>
> > > Thank you for the link.
> >
> > I have no experience with refind but for my UEFI systems I accomplish this
> > using efibootmgr and a simple batch file. The machine always boots Linux
> > by default but from within Linux I can tell it to reboot into Windows
> >
> > mark@science2:~$ sudo efibootmgr
> > BootCurrent: 0003
> > Timeout: 1 seconds
> > BootOrder: 0003,0000
> > Boot0000* Windows Boot Manager
> > Boot0003* ubuntu
> >
> >
> > mark@science2:~$ cat bin/RebootWindows
> > sudo efibootmgr -n 0000
> > reboot
> > mark@science2:~$
>
> Thank you, yes that work perfectly
>
> "efibootmgr -n " is one time entry for one reboot; to set it permanently
> one should use: "efibootmgr -o + arrange entries"
>
> Does anybody know how to rename the boot entries, in my case I have:
>
> efibootmgr
> BootCurrent: 0004
> Timeout: 1 seconds
> BootOrder: 0000,0004,0002
> Boot0000* rEFInd Boot
> Manager HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(
> \EFI\REFIND\REFIND_X64.EFI) Boot0002* UEFI
> OS HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/
File(\EFI\
> BOOT\BOOTX64.EFI)0000424f Boot0004* rEFInd Boot
> Manager HD(1,GPT,9d2481cf-8c35-4d9d-88ee-1d0d6e06cc68,0x800,0x1dc800)/File(
> \EFI\refind\refind_x64.efi)
>
> This is cryptic,
> 0000 - is sda disk
> 0004 - nvme disk
>
> How to rename them to SDA and NVME respectively
You can try using the '--label' option, but I understand this only works when
you create a new menu in the firmware, e.g.:
efibootmgr --create --disk /dev/sda --part X --label "SDA" --loader
"\EFI\REFIND\REFIND_X64.EFI"
I don't know if running this would create a duplicate, but you can delete the
entry first and then recreate it as above.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: Dual Booting - selection from command line
2024-01-17 15:40 ` thelma
2024-01-17 16:54 ` Michael
@ 2024-01-17 17:21 ` Mark Knecht
2024-01-17 18:54 ` thelma
1 sibling, 1 reply; 9+ messages in thread
From: Mark Knecht @ 2024-01-17 17:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]
On Wed, Jan 17, 2024 at 9:58 AM <thelma@sys-concept.com> wrote:
>
> On 1/10/24 15:14, Mark Knecht wrote:
> >
> >
> > On Wed, Jan 10, 2024 at 2:38 PM <thelma@sys-concept.com <mailto:
thelma@sys-concept.com>> wrote:
<SNIP>
>
> Thank you, yes that work perfectly
>
> "efibootmgr -n " is one time entry for one reboot; to set it permanently
one should use:
> "efibootmgr -o + arrange entries"
>
> Does anybody know how to rename the boot entries, in my case I have:
>
> efibootmgr
> BootCurrent: 0004
> Timeout: 1 seconds
> BootOrder: 0000,0004,0002
> Boot0000* rEFInd Boot Manager
HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(\EFI\REFIND\REFIND_X64.EFI)
> Boot0002* UEFI OS
HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
> Boot0004* rEFInd Boot Manager
HD(1,GPT,9d2481cf-8c35-4d9d-88ee-1d0d6e06cc68,0x800,0x1dc800)/File(\EFI\refind\refind_x64.efi)
>
> This is cryptic,
> 0000 - is sda disk
> 0004 - nvme disk
>
> How to rename them to SDA and NVME respectively
man efibootmgr shows a 'label' option but
I've never used it. Try it at your own risk.
If I was going to try it I would first create the
new one with the new label using the data from
an existing option, test it, and if it worked then
delete the one with the less useful name.
From Google Bard:
<QUOTE>
Use efibootmgr -c -d <disk> -p <partition> -l <new_label> -L <loader_path>
to create a new entry with the desired label and correct path to the
bootloader:
<disk>: The disk where the bootloader resides (e.g., /dev/sda)
<partition>: The partition number where the bootloader is located (e.g., 1)
<new_label>: The desired label for the boot option
<loader_path>: The full path to the bootloader file (e.g.,
\\EFI\\ubuntu\\shimx64.efi)
</QUOTE>
[-- Attachment #2: Type: text/html, Size: 2375 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: Dual Booting - selection from command line
2024-01-17 17:21 ` Mark Knecht
@ 2024-01-17 18:54 ` thelma
2024-01-17 19:24 ` Peter Humphrey
0 siblings, 1 reply; 9+ messages in thread
From: thelma @ 2024-01-17 18:54 UTC (permalink / raw
To: gentoo-user
On 1/17/24 10:21, Mark Knecht wrote:
>
>
> On Wed, Jan 17, 2024 at 9:58 AM <thelma@sys-concept.com <mailto:thelma@sys-concept.com>> wrote:
> >
> > On 1/10/24 15:14, Mark Knecht wrote:
> > >
> > >
> > > On Wed, Jan 10, 2024 at 2:38 PM <thelma@sys-concept.com <mailto:thelma@sys-concept.com> <mailto:thelma@sys-concept.com <mailto:thelma@sys-concept.com>>> wrote:
> <SNIP>
> >
> > Thank you, yes that work perfectly
> >
> > "efibootmgr -n " is one time entry for one reboot; to set it permanently one should use:
> > "efibootmgr -o + arrange entries"
> >
> > Does anybody know how to rename the boot entries, in my case I have:
> >
> > efibootmgr
> > BootCurrent: 0004
> > Timeout: 1 seconds
> > BootOrder: 0000,0004,0002
> > Boot0000* rEFInd Boot Manager HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(\EFI\REFIND\REFIND_X64.EFI)
> > Boot0002* UEFI OS HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
> > Boot0004* rEFInd Boot Manager HD(1,GPT,9d2481cf-8c35-4d9d-88ee-1d0d6e06cc68,0x800,0x1dc800)/File(\EFI\refind\refind_x64.efi)
> >
> > This is cryptic,
> > 0000 - is sda disk
> > 0004 - nvme disk
> >
> > How to rename them to SDA and NVME respectively
>
> man efibootmgr shows a 'label' option but
> I've never used it. Try it at your own risk.
>
> If I was going to try it I would first create the
> new one with the new label using the data from
> an existing option, test it, and if it worked then
> delete the one with the less useful name.
>
> From Google Bard:
> <QUOTE>
> Use efibootmgr -c -d <disk> -p <partition> -l <new_label> -L <loader_path> to create a new entry with the desired label and correct path to the bootloader:
>
> <disk>: The disk where the bootloader resides (e.g., /dev/sda)
> <partition>: The partition number where the bootloader is located (e.g., 1)
> <new_label>: The desired label for the boot option
> <loader_path>: The full path to the bootloader file (e.g., \\EFI\\ubuntu\\shimx64.efi)
> </QUOTE>
Thank you! It worked as you suggested.
In my case, I created a new label:
efibootmgr -c -d /dev/nvme0n1p1 -p 1 -L i5_new -l /EFI/REFIND/REFIND_X64.EFI
device name and partition number can be derived from "fdisk -l"
I'm not sure why "/EFI/REFIND/REFIND_X64.EFI" are all caps letters, in /boot dir it is: "/EFI/refind/refind_x64.efi"
but now my entries are less cryptic,
efibootmgr
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0001,0003,0002
Boot0001* Gentoo_sda HD(1,GPT,9d2481cf-8c35-4d9d-88ee-1d0d6e06cc68,0x800,0x1dc800)/File(\EFI\refind\refind_x64.efi)
Boot0002* UEFI OS HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
Boot0003* i5_new HD(1,GPT,87a5c5b6-c0a8-024c-b1c0-622907add992,0x800,0x200000)/File(\EFI\REFIND\REFIND_X64.EFI)
Switching can easily be done, with "efibootmgr and number" eg. efibootmgr 3
but this is only one reboot, it will go to default setup as per: BootOrder: 0001,0003,0002
To make it permanent change it has to be done with eg:
efibootmgr -o 0003,0001,0002
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: Dual Booting - selection from command line
2024-01-17 18:54 ` thelma
@ 2024-01-17 19:24 ` Peter Humphrey
0 siblings, 0 replies; 9+ messages in thread
From: Peter Humphrey @ 2024-01-17 19:24 UTC (permalink / raw
To: gentoo-user
On Wednesday, 17 January 2024 18:54:46 GMT thelma@sys-concept.com wrote:
> I'm not sure why "/EFI/REFIND/REFIND_X64.EFI" are all caps letters, in /boot
> dir it is: "/EFI/refind/refind_x64.efi"
Because it's a FAT partition?
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-01-17 19:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10 0:18 [gentoo-user] Dual Booting - selection from command line thelma
2024-01-10 2:22 ` [gentoo-user] " Nikos Chantziaras
2024-01-10 17:23 ` thelma
2024-01-10 22:14 ` Mark Knecht
2024-01-17 15:40 ` thelma
2024-01-17 16:54 ` Michael
2024-01-17 17:21 ` Mark Knecht
2024-01-17 18:54 ` thelma
2024-01-17 19:24 ` Peter Humphrey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox