public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Preparing a blank NVMe as a boot drive...
@ 2020-04-06 11:25 tuxic
  2020-04-06 13:35 ` Andrea Conti
  0 siblings, 1 reply; 5+ messages in thread
From: tuxic @ 2020-04-06 11:25 UTC (permalink / raw
  To: Gentoo

Hi,

I read quite some stuff of the more general kind about NVMe, the
technoloy etc...and would not state to be sure of haveing understood
all that ...

Currently I have installed (physically) a NVMe drive, which is
unaltered and in the state as the company has delivered it.

This drive should become my boot drive with a complete root system.

I read something about NVMe-fabric which seems to me like a network
enable access to that drive, which I don't need.

Then there was something mentioned about namespaces, which should
be allocated smaller than the physical drive.

Is this really needed - just to boot from this SSD?
Or is it sufficient (and harmless for the SSD) to just
partitioning and format the drive?
Anything different than handling a harddisk?

Addtionally here
https://wiki.gentoo.org/wiki/SSD
I found some hints regarding page sizes and erase block sizes
when partitioning the drive.

On several page in the internet I read, that this is
"old magic"...the problems do no longer appear, since
the controller of the SSD maps all that to the physical
NAND by itsself.

Currently I got confused and want my diesel driven
calculator back. ;)

Cheers!
Meino






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

* Re: [gentoo-user] Preparing a blank NVMe as a boot drive...
  2020-04-06 11:25 [gentoo-user] Preparing a blank NVMe as a boot drive tuxic
@ 2020-04-06 13:35 ` Andrea Conti
  2020-04-06 14:26   ` tuxic
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Conti @ 2020-04-06 13:35 UTC (permalink / raw
  To: gentoo-user

> Then there was something mentioned about namespaces, which should
> be allocated smaller than the physical drive
> Is this really needed - just to boot from this SSD?

NVMe namespaces are an abstraction layer that allows a controller to 
present its connected storage as a number of independent volumes.
Think LVM LVs, or the way a hardware RAID card presents volumes as 
multiple SCSI LUNs.

Your run-of-the-mill NVMe "gumstick" SSD by default will expose all of 
its capacity in a single namespace (and I don't even think it can be 
configured any other way), so you don't have to worry.

Just remember that NVMe storage is always accessed through a namespace, 
so the equivalent of good old /dev/sda is not /dev/nvme0 (the 
controller) but /dev/nvme0n1 (the first namespace on the controller)

> Or is it sufficient (and harmless for the SSD) to just
> partitioning and format the drive?

It's not only harmless, it's the way it's supposed to be used.

Remember that you will need to boot in UEFI mode, so you will need a 
system partition (and you really, really want to use GPT). The gentoo 
handbook has a good section on UEFI booting.

> I found some hints regarding page sizes and erase block sizes
> when partitioning the drive.

I wouldn't bother with that, but you're free to experiment :)

andrea


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

* Re: [gentoo-user] Preparing a blank NVMe as a boot drive...
  2020-04-06 13:35 ` Andrea Conti
@ 2020-04-06 14:26   ` tuxic
  2020-04-06 14:38     ` Neil Bothwick
  0 siblings, 1 reply; 5+ messages in thread
From: tuxic @ 2020-04-06 14:26 UTC (permalink / raw
  To: gentoo-user

On 04/06 03:35, Andrea Conti wrote:
> > Then there was something mentioned about namespaces, which should
> > be allocated smaller than the physical drive
> > Is this really needed - just to boot from this SSD?
> 
> NVMe namespaces are an abstraction layer that allows a controller to present
> its connected storage as a number of independent volumes.
> Think LVM LVs, or the way a hardware RAID card presents volumes as multiple
> SCSI LUNs.
> 
> Your run-of-the-mill NVMe "gumstick" SSD by default will expose all of its
> capacity in a single namespace (and I don't even think it can be configured
> any other way), so you don't have to worry.
> 
> Just remember that NVMe storage is always accessed through a namespace, so
> the equivalent of good old /dev/sda is not /dev/nvme0 (the controller) but
> /dev/nvme0n1 (the first namespace on the controller)
> 
> > Or is it sufficient (and harmless for the SSD) to just
> > partitioning and format the drive?
> 
> It's not only harmless, it's the way it's supposed to be used.
> 
> Remember that you will need to boot in UEFI mode, so you will need a system
> partition (and you really, really want to use GPT). The gentoo handbook has
> a good section on UEFI booting.
> 
> > I found some hints regarding page sizes and erase block sizes
> > when partitioning the drive.
> 
> I wouldn't bother with that, but you're free to experiment :)
> 
> andrea
> 

Hi Andrea,

yes...as long as other would take the risk I would suggest, they are
free to experiment. ;)

I encountered the next problem...and I will invite you to experiment
together with me....

For my new system I choosed GPT/UEFI.

I have a MSI Tomahawk MAX motherboard. This offers two boot modes:
UEFI 
UEFI and Legacy

Since my current system, from which I chroot into my new system is 
Legacu bootable I choosed the latter as boot mode.

First (minor) trap: 
Despite being on a AMD64 system (and grub is installed accordingly)
grub-install tries to access /usr/lib/grub/i386-pc/, which 
does not exist. I fixed that quick and dirty with a symlink
  lrwxrwxrwx 1 root root    10 Apr  6 15:16 i386-pc -> x86_64-efi
  drwxr-xr-x 2 root root 24576 Apr  6 15:09 x86_64-efi

Next:
Calling
grub-install --target=x86_64-efi --efi-directory=/boot
results in:
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.

The config of the runnig kernel has set:
CONFIG_EFI=y
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
CONFIG_EFI_VARS=y
CONFIG_EFI_ESRT=y
CONFIG_EFI_RUNTIME_MAP=y
CONFIG_EFI_RUNTIME_WRAPPERS=y
CONFIG_EFI_TEST=y
CONFIG_EFI_PARTITION=y
CONFIG_EFIVAR_FS=y

Do I miss something here?

ls -l /sys/firmware
gaves me:
drwxr-xr-x  5 root root 0 2020-04-06 16:25 acpi
drwxr-xr-x  3 root root 0 2020-04-06 16:25 dmi
drwxr-xr-x 21 root root 0 2020-04-06 16:25 memmap

Do I really need an image on an USBstick to boot into UEFI mode
just to setup a system to boot into UEFI mode?

Is there any way around that?

Cheers!
Meino




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

* Re: [gentoo-user] Preparing a blank NVMe as a boot drive...
  2020-04-06 14:26   ` tuxic
@ 2020-04-06 14:38     ` Neil Bothwick
  2020-04-06 14:41       ` Michael
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Bothwick @ 2020-04-06 14:38 UTC (permalink / raw
  To: gentoo-user

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

On Mon, 6 Apr 2020 16:26:27 +0200, tuxic@posteo.de wrote:

> Do I really need an image on an USBstick to boot into UEFI mode
> just to setup a system to boot into UEFI mode?

Yes. The bootloader needs access to the EFI variables to set itself up
and those are only present when booting with EFI.

You may also want to consider using something other than GRUB for EFI
booting. Either systemd-boot (this package is for non-systemd users, it
is already included with systemd) or reFind.


-- 
Neil Bothwick

- How many surrealists does it take to change a light bulb?
- Two: one to hold the giraffe, the other to fill the bathtub with
  lots of brightly colored machine tools.

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

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

* Re: [gentoo-user] Preparing a blank NVMe as a boot drive...
  2020-04-06 14:38     ` Neil Bothwick
@ 2020-04-06 14:41       ` Michael
  0 siblings, 0 replies; 5+ messages in thread
From: Michael @ 2020-04-06 14:41 UTC (permalink / raw
  To: gentoo-user

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

On Monday, 6 April 2020 15:38:00 BST Neil Bothwick wrote:
> On Mon, 6 Apr 2020 16:26:27 +0200, tuxic@posteo.de wrote:
> > Do I really need an image on an USBstick to boot into UEFI mode
> > just to setup a system to boot into UEFI mode?
> 
> Yes. The bootloader needs access to the EFI variables to set itself up
> and those are only present when booting with EFI.
> 
> You may also want to consider using something other than GRUB for EFI
> booting. Either systemd-boot (this package is for non-systemd users, it
> is already included with systemd) or reFind.

For completeness I mention here that with UEFI firmware on the MoBo you may 
not even need a boot manager at all.  That's how I boot a number of UEFI 
systems here:

https://wiki.gentoo.org/wiki/EFI_stub_kernel


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

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

end of thread, other threads:[~2020-04-06 14:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-06 11:25 [gentoo-user] Preparing a blank NVMe as a boot drive tuxic
2020-04-06 13:35 ` Andrea Conti
2020-04-06 14:26   ` tuxic
2020-04-06 14:38     ` Neil Bothwick
2020-04-06 14:41       ` Michael

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