public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Is a USB-key-to-hard-drive-tap-dance-boot possible?
@ 2020-12-23  4:05 Walter Dnes
  2020-12-23  4:16 ` [gentoo-user] " Grant Edwards
  2020-12-23 12:46 ` [gentoo-user] " Neil Bothwick
  0 siblings, 2 replies; 24+ messages in thread
From: Walter Dnes @ 2020-12-23  4:05 UTC (permalink / raw
  To: Gentoo Users List

  Situation; I have a Dell XPS8940 with that abomination known as UEFI,
and no "legacy boot".  UEFI claims there are no bootable partitions on
the hard drive (/dev/sda).  Yet it will automatically boot up properly
from a USB key (/dev/sdb) with Gentoo minimal install.  Question; is it
possible to install grub/lilo/syslinux/whatever on the USB key
(/dev/sdb) so that it boots up and hands off control of the boot process
to the hard drive (/dev/sda1)?

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-23  4:05 [gentoo-user] Is a USB-key-to-hard-drive-tap-dance-boot possible? Walter Dnes
@ 2020-12-23  4:16 ` Grant Edwards
  2020-12-23  5:37   ` Walter Dnes
  2020-12-23 12:46 ` [gentoo-user] " Neil Bothwick
  1 sibling, 1 reply; 24+ messages in thread
From: Grant Edwards @ 2020-12-23  4:16 UTC (permalink / raw
  To: gentoo-user

On 2020-12-23, Walter Dnes <waltdnes@waltdnes.org> wrote:

> Situation; I have a Dell XPS8940 with that abomination known as
> UEFI, and no "legacy boot". UEFI claims there are no bootable
> partitions on the hard drive (/dev/sda).  Yet it will automatically
> boot up properly from a USB key (/dev/sdb) with Gentoo minimal
> install.

Yea, where I work, we've run into similar issues with some Dell
machines that IT insisted they procure for us to use in manufacturing
as production test stations. There seems to be no way to get them to
boot Linux from internal hard-drives, though they're quite happy
booting Linux from external USB drives. After wasting days of
engineering time, we finally told IT the machines were useless to us.

> Question; is it possible to install grub/lilo/syslinux/whatever on
> the USB key (/dev/sdb) so that it boots up and hands off control of
> the boot process to the hard drive (/dev/sda1)?

Does the UEFI BIOS recognize that /dev/sda1 exists, but just isn't
bootable? If yes, then it should be possible to install Grub on a USB
key and boot a kernel on /dev/sda1. It might be simpler to just put
the kernel and initrd on the USB key also. Though boot time might be
slightly slower that way, it won't affect performance after that.

I think...

--
Grant





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-23  4:16 ` [gentoo-user] " Grant Edwards
@ 2020-12-23  5:37   ` Walter Dnes
  2020-12-23 12:44     ` Michael
  2020-12-24 22:49     ` Dan Egli
  0 siblings, 2 replies; 24+ messages in thread
From: Walter Dnes @ 2020-12-23  5:37 UTC (permalink / raw
  To: gentoo-user

On Wed, Dec 23, 2020 at 04:16:46AM -0000, Grant Edwards wrote

> Does the UEFI BIOS recognize that /dev/sda1 exists, but just isn't
> bootable? If yes, then it should be possible to install Grub on a USB
> key and boot a kernel on /dev/sda1. It might be simpler to just put
> the kernel and initrd on the USB key also. Though boot time might be
> slightly slower that way, it won't affect performance after that.

  The point of this excercise is to bypass UEFI BIOS as much as
possible.  The machine will happily automatically boot from the Gentoo
minimal install USB key, which I believe is grub, so that works.  And
the minimal install does indeed recognize /dev/sda, which is why I was
able to install linux in the first place.  What I'm looking for is the
grub "recipie" to automatically hand off control to /dev/sda1 at bootup.
This will require leaving a USB key permanently in one of the 6 USB
ports in the back of the machine.

  I've been using lilo for 20 years plus, so I don't have a clue about
grub and how it works.  I generally have 2 kernels available on the lilo
boot menu, "production" and "experimental".  I test the "expermental"
kernel for a while before copying it over the "production" kernel.  My
menu normally waits up to 15 seconds.  If no keypress, it defaults to
the "production" kernel.  Grub would need to load one of
/boot/kernel.experimental or /boot/kernel.production.  I could
re-arrange the layout if necessary.  Here's my current /boot layout...

[d531][waltdnes][~] ll /boot
total 18412
drwxr-xr-x  2 root root    4096 Dec 22 21:42 .
drwxr-xr-x 21 root root    4096 Oct 24 12:14 ..
-rw-r--r--  1 root root       0 Oct 11 19:55 .keep
-rw-r--r--  1 root root       0 Oct 13 05:57 .keep_sys-boot_lilo-0
-rw-------  1 root root  139264 Dec 22 21:42 .map
-rw-r--r--  1 root root 2979997 Dec 21 19:31 System.map.experimental
-rw-r--r--  1 root root 2991033 Oct 13 06:03 System.map.production
-rw-r--r--  1 root root     512 Oct 13 06:04 boot.0800
-rw-r--r--  1 root root   90538 Dec 21 19:31 config.experimental
-rw-r--r--  1 root root   90579 Oct 13 06:03 config.production
-rw-r--r--  1 root root 6214192 Dec 21 19:31 kernel.experimental
-rw-r--r--  1 root root 6271536 Oct 13 06:03 kernel.production

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-23  5:37   ` Walter Dnes
@ 2020-12-23 12:44     ` Michael
  2020-12-24 22:49     ` Dan Egli
  1 sibling, 0 replies; 24+ messages in thread
From: Michael @ 2020-12-23 12:44 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 4062 bytes --]

On Wednesday, 23 December 2020 05:37:01 GMT Walter Dnes wrote:
> On Wed, Dec 23, 2020 at 04:16:46AM -0000, Grant Edwards wrote
> 
> > Does the UEFI BIOS recognize that /dev/sda1 exists, but just isn't
> > bootable? If yes, then it should be possible to install Grub on a USB
> > key and boot a kernel on /dev/sda1. It might be simpler to just put
> > the kernel and initrd on the USB key also. Though boot time might be
> > slightly slower that way, it won't affect performance after that.
> 
>   The point of this excercise is to bypass UEFI BIOS as much as
> possible.  

From what I've read in the interwebs Intel have been moving to UEFI Class-3 
without the legacy BIOS Compatibility Support Module (CSM).  Dell who are 
mostly a Wintel shop would be early adopters I imagine.

With no CSM one has to use UEFI and an ESP partition to boot from.  Any 
applications/drivers requiring 16-bit BIOS will no longer work on bare metal.  
I suppose they should work in QEMU with sgabios.bin as long as QEMU can 
emulate the interface to the hardware.

As far as I know, Intel have not made Secure Boot mandatory, so no need to use 
Microsoft-RHL keys to sign your kernel images, but either way you will need to 
drop these in the ESP VFAT formatted partition under an EFI/ directory, or 
EFI/<OS_name>/ subdirectory.

At some point in this /progress/ towards UEFI Class-3, Dell disabled booting 
internal drives with CSM.  Only external drives/media can be booted if CSM is 
enabled - I think you need to press F12 to select the external bootable 
device.


> The machine will happily automatically boot from the Gentoo
> minimal install USB key, which I believe is grub, so that works.  And
> the minimal install does indeed recognize /dev/sda, which is why I was
> able to install linux in the first place.  What I'm looking for is the
> grub "recipie" to automatically hand off control to /dev/sda1 at bootup.
> This will require leaving a USB key permanently in one of the 6 USB
> ports in the back of the machine.

You could install GRUB to a USB device, you need to pass the '--removable' 
option to the grub-install command.


>   I've been using lilo for 20 years plus, so I don't have a clue about
> grub and how it works.  I generally have 2 kernels available on the lilo
> boot menu, "production" and "experimental".  I test the "expermental"
> kernel for a while before copying it over the "production" kernel.  My
> menu normally waits up to 15 seconds.  If no keypress, it defaults to
> the "production" kernel.  Grub would need to load one of
> /boot/kernel.experimental or /boot/kernel.production.  I could
> re-arrange the layout if necessary.  Here's my current /boot layout...
> 
> [d531][waltdnes][~] ll /boot
> total 18412
> drwxr-xr-x  2 root root    4096 Dec 22 21:42 .
> drwxr-xr-x 21 root root    4096 Oct 24 12:14 ..
> -rw-r--r--  1 root root       0 Oct 11 19:55 .keep
> -rw-r--r--  1 root root       0 Oct 13 05:57 .keep_sys-boot_lilo-0
> -rw-------  1 root root  139264 Dec 22 21:42 .map
> -rw-r--r--  1 root root 2979997 Dec 21 19:31 System.map.experimental
> -rw-r--r--  1 root root 2991033 Oct 13 06:03 System.map.production
> -rw-r--r--  1 root root     512 Oct 13 06:04 boot.0800
> -rw-r--r--  1 root root   90538 Dec 21 19:31 config.experimental
> -rw-r--r--  1 root root   90579 Oct 13 06:03 config.production
> -rw-r--r--  1 root root 6214192 Dec 21 19:31 kernel.experimental
> -rw-r--r--  1 root root 6271536 Oct 13 06:03 kernel.production

GRUB will install its UEFI image grubx64.efi in the ESP partition and then 
boot with that any OS kernel images you have included in the ESP partition.  
GRUB will scan the ESP partition and create its grub.cfg file to include in 
its boot menu automagically any kernel/initramfs images, when you run update-
grub.

Alternatively, instead of booting a mini OS (UEFI firmware), to boot another 
mini OS (GRUB), to boot your intended OS (Gentoo), you can skip GRUB 
altogether and just use efibootmgr to manipulate the UEFI firmware boot menu 
for your kernel images in the ESP partition.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-23  4:05 [gentoo-user] Is a USB-key-to-hard-drive-tap-dance-boot possible? Walter Dnes
  2020-12-23  4:16 ` [gentoo-user] " Grant Edwards
@ 2020-12-23 12:46 ` Neil Bothwick
  1 sibling, 0 replies; 24+ messages in thread
From: Neil Bothwick @ 2020-12-23 12:46 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

On Tue, 22 Dec 2020 23:05:28 -0500, Walter Dnes wrote:

>   Situation; I have a Dell XPS8940 with that abomination known as UEFI,
> and no "legacy boot".  UEFI claims there are no bootable partitions on
> the hard drive (/dev/sda).

Have you set up a partition of type EFI System (EF00)? This Dell XPS
laptop boots perfectly from a UEFI system partition with no need for GRUB.


-- 
Neil Bothwick

Bumper Sticker: If you can read this, you are in phaser range.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-23  5:37   ` Walter Dnes
  2020-12-23 12:44     ` Michael
@ 2020-12-24 22:49     ` Dan Egli
  2020-12-25 16:41       ` Walter Dnes
  1 sibling, 1 reply; 24+ messages in thread
From: Dan Egli @ 2020-12-24 22:49 UTC (permalink / raw
  To: gentoo-user, Walter Dnes

I see your problem, I think. You don't have your ESP mounted, so grub 
can't write the EFI files to it. You are likely trying to use grub with 
grub-install /dev/sda. That won't work for EFI. Try this (as root):

mkdir /boot/efi
mount -t vfat /dev/sda1 /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg

you MAY need to add --removable to the grub-install line. Some EFI 
setups prefer that.

On 12/22/2020 10:37 PM, Walter Dnes wrote:
> [d531][waltdnes][~] ll /boot
> total 18412
> drwxr-xr-x  2 root root    4096 Dec 22 21:42 .
> drwxr-xr-x 21 root root    4096 Oct 24 12:14 ..
> -rw-r--r--  1 root root       0 Oct 11 19:55 .keep
> -rw-r--r--  1 root root       0 Oct 13 05:57 .keep_sys-boot_lilo-0
> -rw-------  1 root root  139264 Dec 22 21:42 .map
> -rw-r--r--  1 root root 2979997 Dec 21 19:31 System.map.experimental
> -rw-r--r--  1 root root 2991033 Oct 13 06:03 System.map.production
> -rw-r--r--  1 root root     512 Oct 13 06:04 boot.0800
> -rw-r--r--  1 root root   90538 Dec 21 19:31 config.experimental
> -rw-r--r--  1 root root   90579 Oct 13 06:03 config.production
> -rw-r--r--  1 root root 6214192 Dec 21 19:31 kernel.experimental
> -rw-r--r--  1 root root 6271536 Oct 13 06:03 kernel.production


Yea, see, no directories except . and .., which is no good at all for 
EFI. Try what I said above, and see if that doesn't help.

-- 
Dan Egli
 From my Test Server



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-24 22:49     ` Dan Egli
@ 2020-12-25 16:41       ` Walter Dnes
  2020-12-25 18:24         ` Neil Bothwick
                           ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Walter Dnes @ 2020-12-25 16:41 UTC (permalink / raw
  To: gentoo-user

On Thu, Dec 24, 2020 at 03:49:35PM -0700, Dan Egli wrote
> I see your problem, I think. You don't have your ESP mounted, so
> grub can't write the EFI files to it. You are likely trying to use
> grub with grub-install /dev/sda. That won't work for EFI.
> 
> mkdir /boot/efi
> mount -t vfat /dev/sda1 /boot/efi
> grub-install --target=x86_64-efi --efi-directory=/boot/efi
> grub-mkconfig -o /boot/grub/grub.cfg
> 
> you MAY need to add --removable to the grub-install line. Some EFI 
> setups prefer that.

  I have this sinking feeling in my stomach that I need to blow away
the install (after scp'ing config files to my desktop) and start over.
There is no room for another partition.  Apparently, using fdisk (like I
did) to partition a GPT system is begging for problems down the road.

  After 20 years on linux, I've been reduced to a newbie.  BIOS boot,
Lilo, and fdisk served me well for 2 decades.  Now I'm going to have to
learn UEFI, grub, and parted all at once.  I'll start a new thread
tomorrow once I have my config files copied off.  Then I'll install UEFI
mode properly.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 16:41       ` Walter Dnes
@ 2020-12-25 18:24         ` Neil Bothwick
  2020-12-27  1:07           ` antlists
  2020-12-25 18:45         ` Jorge Almeida
  2020-12-26 19:33         ` Dan Egli
  2 siblings, 1 reply; 24+ messages in thread
From: Neil Bothwick @ 2020-12-25 18:24 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]

On Fri, 25 Dec 2020 11:41:03 -0500, Walter Dnes wrote:

>   After 20 years on linux, I've been reduced to a newbie.  BIOS boot,
> Lilo, and fdisk served me well for 2 decades.  Now I'm going to have to
> learn UEFI, grub, and parted all at once.  I'll start a new thread
> tomorrow once I have my config files copied off.  Then I'll install UEFI
> mode properly.

UEFI is dead simple, and you can use gdisk, which is the GPT variant of
fdisk. So that only leave the boot manager to learn, and if you don't
already know GRUB, I'd say start with something simpler.


-- 
Neil Bothwick

The number one cause of computer problems is computer solutions.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 16:41       ` Walter Dnes
  2020-12-25 18:24         ` Neil Bothwick
@ 2020-12-25 18:45         ` Jorge Almeida
  2020-12-25 19:17           ` Walter Dnes
  2020-12-26 19:33         ` Dan Egli
  2 siblings, 1 reply; 24+ messages in thread
From: Jorge Almeida @ 2020-12-25 18:45 UTC (permalink / raw
  To: gentoo-user

On Fri, Dec 25, 2020 at 4:41 PM Walter Dnes <waltdnes@waltdnes.org> wrote:
>

>   After 20 years on linux, I've been reduced to a newbie.  BIOS boot,
> Lilo, and fdisk served me well for 2 decades.  Now I'm going to have to
> learn UEFI, grub, and parted all at once.  I'll start a new thread
> tomorrow once I have my config files copied off.  Then I'll install UEFI
> mode properly.
Learning about UEFI: https://www.rodsbooks.com/refind/
Suggestion: forget about grub; refind is the way to go (link above)
Also: you don't need parted; gdisk is fine if you're OK with fdisk

Cheers

Jorge Almeida


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 18:45         ` Jorge Almeida
@ 2020-12-25 19:17           ` Walter Dnes
  2020-12-25 19:32             ` Jorge Almeida
  2020-12-25 22:24             ` Peter Humphrey
  0 siblings, 2 replies; 24+ messages in thread
From: Walter Dnes @ 2020-12-25 19:17 UTC (permalink / raw
  To: gentoo-user

On Fri, Dec 25, 2020 at 06:45:42PM +0000, Jorge Almeida wrote

> Learning about UEFI: https://www.rodsbooks.com/refind/
> Suggestion: forget about grub; refind is the way to go (link above)
> Also: you don't need parted; gdisk is fine if you're OK with fdisk

  Thanks for the pointers.  Are there any changes I have to make in my
linux kernel to boot UEFI?  Note; legacy BIOS boot is *NOT* an option
on my new Dell XPS8940.  It's UEFI boot only.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 19:17           ` Walter Dnes
@ 2020-12-25 19:32             ` Jorge Almeida
  2020-12-25 20:55               ` Walter Dnes
  2020-12-25 22:24             ` Peter Humphrey
  1 sibling, 1 reply; 24+ messages in thread
From: Jorge Almeida @ 2020-12-25 19:32 UTC (permalink / raw
  To: gentoo-user

On Fri, Dec 25, 2020 at 7:17 PM Walter Dnes <waltdnes@waltdnes.org> wrote:
>

>   Thanks for the pointers.  Are there any changes I have to make in my
> linux kernel to boot UEFI?  Note; legacy BIOS boot is *NOT* an option
> on my new Dell XPS8940.  It's UEFI boot only.
>
I'm not sure that it is really necessary for refind, but it doesn't hurt:

 Processor type and features -> EFI runtime service support
" ->  EFI stub support

Jorge


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 19:32             ` Jorge Almeida
@ 2020-12-25 20:55               ` Walter Dnes
  2020-12-25 21:01                 ` Jorge Almeida
  2020-12-25 21:07                 ` Neil Bothwick
  0 siblings, 2 replies; 24+ messages in thread
From: Walter Dnes @ 2020-12-25 20:55 UTC (permalink / raw
  To: gentoo-user

On Fri, Dec 25, 2020 at 07:32:42PM +0000, Jorge Almeida wrote
> On Fri, Dec 25, 2020 at 7:17 PM Walter Dnes <waltdnes@waltdnes.org> wrote:
> >
> 
> >   Thanks for the pointers.  Are there any changes I have to make in my
> > linux kernel to boot UEFI?  Note; legacy BIOS boot is *NOT* an option
> > on my new Dell XPS8940.  It's UEFI boot only.
> >
> I'm not sure that it is really necessary for refind, but it doesn't hurt:
> 
>  Processor type and features -> EFI runtime service support
> " ->  EFI stub support

  One other thing, looking at the docs, it seems that refind requires
initrd.  Am I reading it correctly?  If so, I may as well go with grub.
Grub usually requires setting up stuff once.  Initrd requires running
more often.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 20:55               ` Walter Dnes
@ 2020-12-25 21:01                 ` Jorge Almeida
  2020-12-25 21:04                   ` Jorge Almeida
  2020-12-25 21:07                 ` Neil Bothwick
  1 sibling, 1 reply; 24+ messages in thread
From: Jorge Almeida @ 2020-12-25 21:01 UTC (permalink / raw
  To: gentoo-user

On Fri, Dec 25, 2020 at 8:55 PM Walter Dnes <waltdnes@waltdnes.org> wrote:
>

>
>   One other thing, looking at the docs, it seems that refind requires
> initrd.  Am I reading it correctly?  If so, I may as well go with grub.
> Grub usually requires setting up stuff once.  Initrd requires running
> more often.
>
No. I use refind and I don't have an initrd.
The initrd documentation can be a bit overwhelming. Still, much better
than the Grub documentation, IMO.

Jorge


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 21:01                 ` Jorge Almeida
@ 2020-12-25 21:04                   ` Jorge Almeida
  0 siblings, 0 replies; 24+ messages in thread
From: Jorge Almeida @ 2020-12-25 21:04 UTC (permalink / raw
  To: gentoo-user

On Fri, Dec 25, 2020 at 9:01 PM Jorge Almeida <jjalmeida@gmail.com> wrote:
>
> On Fri, Dec 25, 2020 at 8:55 PM Walter Dnes <waltdnes@waltdnes.org> wrote:
> >
>
> >

> The initrd documentation can be a bit overwhelming. Still, much better
I meant "The refind documentation", of course.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 20:55               ` Walter Dnes
  2020-12-25 21:01                 ` Jorge Almeida
@ 2020-12-25 21:07                 ` Neil Bothwick
  2020-12-25 22:38                   ` Dale
  1 sibling, 1 reply; 24+ messages in thread
From: Neil Bothwick @ 2020-12-25 21:07 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

On Fri, 25 Dec 2020 15:55:23 -0500, Walter Dnes wrote:

>   One other thing, looking at the docs, it seems that refind requires
> initrd.  Am I reading it correctly?  If so, I may as well go with grub.
> Grub usually requires setting up stuff once.  Initrd requires running
> more often.

While I've only used rEFInd with an initramfs, because I have an
encrypted /, there doesn't appear to be any reason to need one. All it
does is load a kernel and pass it some options.

You can also use systemd-boot, a separate package for OpenRC users, which
I have used without an initramfs. systemd-boot is very lightweight and
only requires a two line config for each kernel, plus a two line general
config (timeout and default). That's six lines of config for a choice of
two kernels. 

Of course, if you want absolutely minimal, you don't need any boot manager
with UEFI and you can select your kernel from the firmware's boot menu,
but that loses you the ability to edit options on the fly.


-- 
Neil Bothwick

"Press Return to Continue" - known as "The Mail Menupause".

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 19:17           ` Walter Dnes
  2020-12-25 19:32             ` Jorge Almeida
@ 2020-12-25 22:24             ` Peter Humphrey
  1 sibling, 0 replies; 24+ messages in thread
From: Peter Humphrey @ 2020-12-25 22:24 UTC (permalink / raw
  To: gentoo-user

On Friday, 25 December 2020 19:17:24 GMT Walter Dnes wrote:
> On Fri, Dec 25, 2020 at 06:45:42PM +0000, Jorge Almeida wrote
> 
> > Learning about UEFI: https://www.rodsbooks.com/refind/
> > Suggestion: forget about grub; refind is the way to go (link above)
> > Also: you don't need parted; gdisk is fine if you're OK with fdisk
> 
>   Thanks for the pointers.  Are there any changes I have to make in my
> linux kernel to boot UEFI?  Note; legacy BIOS boot is *NOT* an option
> on my new Dell XPS8940.  It's UEFI boot only.

The installation handbook is useful on setting UEFI up. It worked for me, 
anyway.

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 21:07                 ` Neil Bothwick
@ 2020-12-25 22:38                   ` Dale
  2020-12-25 23:02                     ` Neil Bothwick
  0 siblings, 1 reply; 24+ messages in thread
From: Dale @ 2020-12-25 22:38 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick wrote:
> On Fri, 25 Dec 2020 15:55:23 -0500, Walter Dnes wrote:
>
>>   One other thing, looking at the docs, it seems that refind requires
>> initrd.  Am I reading it correctly?  If so, I may as well go with grub.
>> Grub usually requires setting up stuff once.  Initrd requires running
>> more often.
> While I've only used rEFInd with an initramfs, because I have an
> encrypted /, there doesn't appear to be any reason to need one. All it
> does is load a kernel and pass it some options.
>
> You can also use systemd-boot, a separate package for OpenRC users, which
> I have used without an initramfs. systemd-boot is very lightweight and
> only requires a two line config for each kernel, plus a two line general
> config (timeout and default). That's six lines of config for a choice of
> two kernels. 
>
> Of course, if you want absolutely minimal, you don't need any boot manager
> with UEFI and you can select your kernel from the firmware's boot menu,
> but that loses you the ability to edit options on the fly.
>
>


Is that similar to the old now gone Grub?  I admit, I sort of liked the
old grub.  Adding/removing a kernel was pretty darn easy. 

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 22:38                   ` Dale
@ 2020-12-25 23:02                     ` Neil Bothwick
  2020-12-25 23:15                       ` Dale
  0 siblings, 1 reply; 24+ messages in thread
From: Neil Bothwick @ 2020-12-25 23:02 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

On Fri, 25 Dec 2020 16:38:13 -0600, Dale wrote:

> > You can also use systemd-boot, a separate package for OpenRC users,
> > which I have used without an initramfs. systemd-boot is very
> > lightweight and only requires a two line config for each kernel, plus
> > a two line general config (timeout and default). That's six lines of
> > config for a choice of two kernels. 
> >
> > Of course, if you want absolutely minimal, you don't need any boot
> > manager with UEFI and you can select your kernel from the firmware's
> > boot menu, but that loses you the ability to edit options on the fly.

> Is that similar to the old now gone Grub?  I admit, I sort of liked the
> old grub.  Adding/removing a kernel was pretty darn easy. 

It's much simpler. GRUB is a bootloader, UEFI is a bootloader in
firmware, so the software is only used to tell it what to do, not control
the boot process itself.


-- 
Neil Bothwick

She's fine, upstanding, and wonderful laying down.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 23:02                     ` Neil Bothwick
@ 2020-12-25 23:15                       ` Dale
  0 siblings, 0 replies; 24+ messages in thread
From: Dale @ 2020-12-25 23:15 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick wrote:
> On Fri, 25 Dec 2020 16:38:13 -0600, Dale wrote:
>
>>> You can also use systemd-boot, a separate package for OpenRC users,
>>> which I have used without an initramfs. systemd-boot is very
>>> lightweight and only requires a two line config for each kernel, plus
>>> a two line general config (timeout and default). That's six lines of
>>> config for a choice of two kernels. 
>>>
>>> Of course, if you want absolutely minimal, you don't need any boot
>>> manager with UEFI and you can select your kernel from the firmware's
>>> boot menu, but that loses you the ability to edit options on the fly.
>> Is that similar to the old now gone Grub?  I admit, I sort of liked the
>> old grub.  Adding/removing a kernel was pretty darn easy. 
> It's much simpler. GRUB is a bootloader, UEFI is a bootloader in
> firmware, so the software is only used to tell it what to do, not control
> the boot process itself.
>
>

Oh.  I'm still on BIOS so that leaves me out, for now at least.  ;-) 
That said, my mobo is getting some age on it.  After the internet
switch, NAS and such, I plan to build a new rig.  May recycle some stuff
but newish anyway. 

Dale

:-)  :-)


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 16:41       ` Walter Dnes
  2020-12-25 18:24         ` Neil Bothwick
  2020-12-25 18:45         ` Jorge Almeida
@ 2020-12-26 19:33         ` Dan Egli
  2 siblings, 0 replies; 24+ messages in thread
From: Dan Egli @ 2020-12-26 19:33 UTC (permalink / raw
  To: gentoo-user, Walter Dnes


On 12/25/2020 9:41 AM, Walter Dnes wrote:
> On Thu, Dec 24, 2020 at 03:49:35PM -0700, Dan Egli wrote
>> I see your problem, I think. You don't have your ESP mounted, so
>> grub can't write the EFI files to it. You are likely trying to use
>> grub with grub-install /dev/sda. That won't work for EFI.
>>
>> mkdir /boot/efi
>> mount -t vfat /dev/sda1 /boot/efi
>> grub-install --target=x86_64-efi --efi-directory=/boot/efi
>> grub-mkconfig -o /boot/grub/grub.cfg
>>
>> you MAY need to add --removable to the grub-install line. Some EFI
>> setups prefer that.
>    I have this sinking feeling in my stomach that I need to blow away
> the install (after scp'ing config files to my desktop) and start over.
> There is no room for another partition.  Apparently, using fdisk (like I
> did) to partition a GPT system is begging for problems down the road.
>
>    After 20 years on linux, I've been reduced to a newbie.  BIOS boot,
> Lilo, and fdisk served me well for 2 decades.  Now I'm going to have to
> learn UEFI, grub, and parted all at once.  I'll start a new thread
> tomorrow once I have my config files copied off.  Then I'll install UEFI
> mode properly.
>
One thing you could try is using gparted to shrink the partition ever so 
slightly. It doesn't need to be big at all. The standard windows EFI 
partition is 100MB! That's it. It's not a matter of using FDisk, as I 
did too. It's just a matter of remembering to make the partition.


-- 
Dan Egli
 From my Test Server



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-25 18:24         ` Neil Bothwick
@ 2020-12-27  1:07           ` antlists
  2020-12-27  2:01             ` Dale
  2020-12-27  9:45             ` [gentoo-user] " Neil Bothwick
  0 siblings, 2 replies; 24+ messages in thread
From: antlists @ 2020-12-27  1:07 UTC (permalink / raw
  To: gentoo-user

On 25/12/2020 18:24, Neil Bothwick wrote:
> On Fri, 25 Dec 2020 11:41:03 -0500, Walter Dnes wrote:
> 
>>    After 20 years on linux, I've been reduced to a newbie.  BIOS boot,
>> Lilo, and fdisk served me well for 2 decades.  Now I'm going to have to
>> learn UEFI, grub, and parted all at once.  I'll start a new thread
>> tomorrow once I have my config files copied off.  Then I'll install UEFI
>> mode properly.
> 
> UEFI is dead simple, and you can use gdisk, which is the GPT variant of
> fdisk. So that only leave the boot manager to learn, and if you don't
> already know GRUB, I'd say start with something simpler.
> 
> 
I got the impression that on newer systems, gdisk and fdisk were the 
same thing ...

Certainly I moved to gdisk because "fdisk can't handle GPTs", and then 
someone said "oh yes it can" so I investigated and oh yes it could. I 
still use gdisk, but as I say they now appear to be the same thing.

Cheers,
Wol


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-27  1:07           ` antlists
@ 2020-12-27  2:01             ` Dale
  2020-12-27  4:21               ` [gentoo-user] " Thomas Mueller
  2020-12-27  9:45             ` [gentoo-user] " Neil Bothwick
  1 sibling, 1 reply; 24+ messages in thread
From: Dale @ 2020-12-27  2:01 UTC (permalink / raw
  To: gentoo-user

antlists wrote:
> On 25/12/2020 18:24, Neil Bothwick wrote:
>> On Fri, 25 Dec 2020 11:41:03 -0500, Walter Dnes wrote:
>>
>>>    After 20 years on linux, I've been reduced to a newbie.  BIOS boot,
>>> Lilo, and fdisk served me well for 2 decades.  Now I'm going to have to
>>> learn UEFI, grub, and parted all at once.  I'll start a new thread
>>> tomorrow once I have my config files copied off.  Then I'll install
>>> UEFI
>>> mode properly.
>>
>> UEFI is dead simple, and you can use gdisk, which is the GPT variant of
>> fdisk. So that only leave the boot manager to learn, and if you don't
>> already know GRUB, I'd say start with something simpler.
>>
>>
> I got the impression that on newer systems, gdisk and fdisk were the
> same thing ...
>
> Certainly I moved to gdisk because "fdisk can't handle GPTs", and then
> someone said "oh yes it can" so I investigated and oh yes it could. I
> still use gdisk, but as I say they now appear to be the same thing.
>
> Cheers,
> Wol
>
>


I think fdisk couldn't handle GPT at first.  I guess that's why gdisk
came along.  Then I think the fdisk folks added support for GPT and
since then it handles both.  That's my understanding of it.  If
possible, you may want to check the time stamps on the info you have
found.  I suspect the ones saying fdisk can't handle GPT are older posts
or people who don't know it can now.  From the man page:


fdisk is a dialog-driven program for creation and manipulation of
partition tables.  It understands GPT, MBR, Sun, SGI and BSD partition
tables.

For gdisk:

GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation
and manipulation of partition tables. It will automatically convert an
old-style Master Boot Record (MBR) partition table or BSD disklabel
stored without an MBR  carrier  partition  to  the  newer  Globally
Unique Identifier (GUID) Partition Table (GPT) format, or will load a
GUID partition table.


Odds are, you can likely use either tool but if you are using GPT, you
may as well use the tool made for that purpose.  I think a lot of it is
very similar as far as options that do the same things in each program. 

Also, there is also cfdisk and cgdisk too.  The interface is different. 
You may want to try the proper one and see which you like.  I use c*disk
tools myself.  You may prefer the others.  Same result I guess. 

Hope that helps.

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-27  2:01             ` Dale
@ 2020-12-27  4:21               ` Thomas Mueller
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Mueller @ 2020-12-27  4:21 UTC (permalink / raw
  To: gentoo-user, gentoo-user

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2034 bytes --]

> I think fdisk couldn't handle GPT at first.  I guess that's why gdisk
> came along.  Then I think the fdisk folks added support for GPT and
> since then it handles both.  That's my understanding of it.  If
> possible, you may want to check the time stamps on the info you have
> found.  I suspect the ones saying fdisk can't handle GPT are older posts
> or people who don't know it can now.  From the man page:


> fdisk is a dialog-driven program for creation and manipulation of
> partition tables.  It understands GPT, MBR, Sun, SGI and BSD partition
> tables.

> For gdisk:

> GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation
> and manipulation of partition tables. It will automatically convert an
> old-style Master Boot Record (MBR) partition table or BSD disklabel
> stored without an MBR  carrier  partition  to  the  newer  Globally
> Unique Identifier (GUID) Partition Table (GPT) format, or will load a
> GUID partition table.


> Odds are, you can likely use either tool but if you are using GPT, you
> may as well use the tool made for that purpose.  I think a lot of it is
> very similar as far as options that do the same things in each program. 

> Also, there is also cfdisk and cgdisk too.  The interface is different. 
> You may want to try the proper one and see which you like.  I use c*disk
> tools myself.  You may prefer the others.  Same result I guess. 

> Hope that helps.

> Dale

I remember from when nobody ever heard of GPT, fdisk was used to partition a hard drive, long before the days of GPT or USB.

Then Rod Smith developed a gdisk to partition a drive using GPT; could even be used on a USB hard drive or USB stick.

Linux fdisk was much easier to use than FreeBSD or NetBSD versions of fdisk.

I don't know how newer versions of Linux fdisk would do with traditional BSD disklabels, which are not compatible between the various BSDs.

But now FreeBSD and NetBSD can run on GPT with no traditional BSD disklabel.

I am not familiar with Sun or SGI partition tables.

Tom



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible?
  2020-12-27  1:07           ` antlists
  2020-12-27  2:01             ` Dale
@ 2020-12-27  9:45             ` Neil Bothwick
  1 sibling, 0 replies; 24+ messages in thread
From: Neil Bothwick @ 2020-12-27  9:45 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

On Sun, 27 Dec 2020 01:07:58 +0000, antlists wrote:

> > UEFI is dead simple, and you can use gdisk, which is the GPT variant
> > of fdisk. So that only leave the boot manager to learn, and if you
> > don't already know GRUB, I'd say start with something simpler.
> > 
> >   
> I got the impression that on newer systems, gdisk and fdisk were the 
> same thing ...
> 
> Certainly I moved to gdisk because "fdisk can't handle GPTs", and then 
> someone said "oh yes it can" so I investigated and oh yes it could. I 
> still use gdisk, but as I say they now appear to be the same thing.

Indeed, GPT support has now been added to fdisk. So all versions of gdisk
handle GPT while recent versions of fdisk do it. That's why I recommend
gdisk, to be certain of using a version with GPT support.


-- 
Neil Bothwick

The trouble with doing something right the first time is that nobody
appreciates how difficult it was.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-12-27  9:45 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-23  4:05 [gentoo-user] Is a USB-key-to-hard-drive-tap-dance-boot possible? Walter Dnes
2020-12-23  4:16 ` [gentoo-user] " Grant Edwards
2020-12-23  5:37   ` Walter Dnes
2020-12-23 12:44     ` Michael
2020-12-24 22:49     ` Dan Egli
2020-12-25 16:41       ` Walter Dnes
2020-12-25 18:24         ` Neil Bothwick
2020-12-27  1:07           ` antlists
2020-12-27  2:01             ` Dale
2020-12-27  4:21               ` [gentoo-user] " Thomas Mueller
2020-12-27  9:45             ` [gentoo-user] " Neil Bothwick
2020-12-25 18:45         ` Jorge Almeida
2020-12-25 19:17           ` Walter Dnes
2020-12-25 19:32             ` Jorge Almeida
2020-12-25 20:55               ` Walter Dnes
2020-12-25 21:01                 ` Jorge Almeida
2020-12-25 21:04                   ` Jorge Almeida
2020-12-25 21:07                 ` Neil Bothwick
2020-12-25 22:38                   ` Dale
2020-12-25 23:02                     ` Neil Bothwick
2020-12-25 23:15                       ` Dale
2020-12-25 22:24             ` Peter Humphrey
2020-12-26 19:33         ` Dan Egli
2020-12-23 12:46 ` [gentoo-user] " Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox