Librem 14v1 and 4TB NvME drive

Hi,

I have a librem 14v1 which came with a 2TB nvme drive. I’m looking to replace my aging slimbook 14 with the librem. The slimbook has a 4TB nvme drive in it. I bought and installed a brand new 4TB nvme drive into the librem14v1. The SeaBIOS sees the drive as 3.6TB. Neither latest arch (as of 2022-05-22) installer nor ubuntu, debian, trisequel, nor pureos will create a 3.5TB parition on the drive. cfdisk returns a seek error when trying to write the 3.5TB partition. All of the installers fail at the point where they actually have to write the default partitions to disk. They all work if I limit the partition sizes to 2TB or less.

Fwiw, the slimbook is UEFI, so it supports up to 8TB nvme (I’ve tried it as a test).

I’m baffled.

I disabled and deactivated TPM via bios thinking it might be the issue, to no avail.

The librem shipped with, and is running, SeaBIOS 1.14.0.2-gebd8e08. The system reports built on 2021-06-18.

I’ve seen other posts here which suggest SeaBIOS only supports 512-byte sectors and therefore only 2TB. Before I attempt to upgrade SeaBIOS to 1.16, is this true? SeaBIOS 1.15 released a lot of nvme fixes/support.

I have 2.5TB of user data on one partition, not including the OS/system/boot part, so having 2 2TB partitions isn’t really an option (and frankly shouldn’t be needed in today’s laptops).

Thank you.

1 Like

I confirm that upgrading to SeaBIOS 1.16 did not fix the issue. Nothing can write a parition larger than 2TB.

2 Likes

Limitations of a BIOS, if any, should only relate to booting from the drive, rather than relating to partitioning.

I think the actual limit that you are hitting relates to the type of partition table. I am assuming that you are attempting to put an msdos partition table on the drive. That has a hard limit of 2TB (assuming 512 byte blocks, real or emulated). That is not bad for early 80s technology but …

msdos partition table is obsolete, replaced by GPT.

This is interrelated with UEFI (c.f. BIOS) but there is no real dependency on UEFI.

Use of sudo fdisk -l /dev/yourdisk will tell you the partition table type (where yourdisk is presumably something like nvme0n1).

So does the installer give you the choice of using GPT instead of msdos partition table? If not, does the installer give you the choice of manually partitioning and then using existing partitions for the install?

Most people in this situation would have a smaller drive for booting and keep the 4TB drive solely for user data (and no need to partition it at all if you won’t want to). However at the moment the Librem 14 itself is stopping you doing that.

Another option therefore is to have smaller boot+root partitions (big enough to install Linux and not run out of space for upgrades and additional software, small enough not to detract from the remaining space for user data) e.g. 0.25 TB for boot+root and 3.75 TB for user data. However for this to work reliably, it is typically the case that the boot partition must be towards the beginning of the disk (in the first 2TB, but really preferably first).

3 Likes

Thank you for the response. Here’s what I’ve tried:

  1. bare drive from factory (zero partitions, not even gpt headers). install of PureOS fails when it tries to write the default partitions to disk, but doesn’t show the error, just shows the commands that fails.
  2. pre-create the partitions, 500MB ext4 for /boot, 3.6TB ext4 for /. cfdisk fails when trying to write the partitions and exits.
  3. parted /dev/nvme0n1 and then mklabel gpt, and quit. start pureos installer from usb, fails on writing default partitions to disk.
  4. parted /dev/nvme0n1 and then mklabel gpt, and then mkpart primary 0G 1G and mkpart primary 1G 3.6T. parted fails stating partition length of 7813613568 sectors exceeds the msdos partition table imposed maximum of 4294967295 and quits. In parted, when I run mklabel gpt and then print it correctly shows partition table: gpt
  5. parted mklabel gpt /dev/nvme0n1 then fdisk -l /dev/nvme0n1 shows Disklabel type: gpt
  6. forget the installers, using fdisk set up gpt and the partitions, etc. save and quit. When the installer runs, it crashes on grub-install. grub-install reports there’s no BIOS boot partition and blocklists are unreliable, so quitting. It doesn’t matter if there’s a boot bios parition or not, grub-install fails.
  7. give up and using the installer, setup the disk, partitions using 2tb sizes, everything works. fdisk -l /dev/nvme0n1 shows Disklabel type: msdos. sigh This is true whether it’s PureOS or archlinux. but now I have one 2 TB partition and another 1.6TB partition.
  8. To test my sanity, take an old HP laptop (bios based, not UEFI), install the 4TB nvme drive, boot archlinux installer, install it without issue by letting archinstall setup the disk/partitions. I have 1 512MB /boot and 3.6TB /. But now I have a working setup on disk. Put disk into librem14, power on, and it hangs at “Booting from Hard Disk…”

:man_shrugging:

2 Likes

I highly doubt there exists a HP laptop that supports NVMe that isn’t UEFI-based, given that UEFI has been around since 2005 or so. You’re likely booting in UEFI-CSM mode (aka legacy BIOS compatibility mode) which isn’t exactly the same thing.

That said, it’s quite possible there is an issue with SeaBIOS and >2TB partitions, and I don’t have a drive handy to test unfortunately. I’ll check and see what I can find out, but might need to have you run a debug build and pull logs to figure it out

2 Likes

OK, what about 500MB for /boot and 250GB for / (with a gpt partition table, and those two partitions at the beginning of the disk) and leave the rest of the disk, all the way to the end, unallocated?

If the install works …

Later on you can create a third partition to use the rest of the disk and put an ext4 file system on it and put all your user data on it.

2 Likes

Here’s install attempt number 6.25x10^23:

fdisk -l /dev/nvme0n1 
Disk /dev/nvme0n1: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: Sabrent Rocket Q4                        
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: 1A486318-D1D1-BF4D-81B4-5EE850A24BCE 

Device           Start        End    Sectors  Size Type
/dev/nvme0n1p1    2048    2050047    2048000 1000M BIOS boot 
/dev/nvme0n1p2 2050048 7814032031 7811981984  3.6T Linux filesystem

The OS installed itself to /dev/nvme0n1p2 without issue. Reboot, and the system hangs at “Booting from Hard Disk…”

1 Like

yes, you are correct. it did create an EFI partition of some sort.

1 Like

I believe your boot partition’s type should be EFI, but it says it’s BIOS.

3 Likes

Correct. Every installer sees this system as a MBR/BIOS system. Besides, EFI partitions go at the end of the disk. However, for the experiment:

fdisk -l /dev/nvme0n1 
Disk /dev/nvme0n1: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: Sabrent Rocket Q4                        
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: AEE1EB96-DD19-EE49-B42C-45303399FB6D 

Device           Start        End    Sectors  Size Type
/dev/nvme0n1p1    2048     514047     512000  250M EFI System 
/dev/nvme0n1p2  514048    2611199    2097152    1G Linux filesystem 
/dev/nvme0n1p3 2611200 7814035455 7811424256  3.6T Linux filesystem

and setting it up correctly with EFI at the end (at least according to fdisk):

fdisk -l /dev/nvme0n1 
Disk /dev/nvme0n1: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: Sabrent Rocket Q4                        
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: 6C60382B-C051-254B-99E1-AD7CF4881679 

Device           Start        End    Sectors  Size Type
/dev/nvme0n1p1    2048      18431      16384    8M BIOS boot 
/dev/nvme0n1p2 2066432 7814032031 7811965600  3.6T Linux filesystem 
/dev/nvme0n1p3   18432    2066431    2048000 1000M EFI System 

on reboot, system hangs at “Booting from Hard Disk…”

1 Like

Not the optimal setup I wanted, but here’s what works:

Disk /dev/nvme0n1: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: Sabrent Rocket Q4                        
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: 2B968BE2-28F9-6A48-B1AB-6E08FC5F7E5E 

Device           Start        End    Sectors   Size Type
/dev/nvme0n1p1    2048      18431      16384     8M BIOS boot 
/dev/nvme0n1p2   18432    2066431    2048000  1000M EFI System 
/dev/nvme0n1p3 2066432 1026066431 1024000000 488.3G Linux filesystem

Any installer finishes successfully and reboots into the newly installed system. I tried this with PureOS, arch, and debian.

I then create a 3.6TB /home and get on with life.

Not what I wanted, but it’ll do for now. Next up is to setup luks encryption and re-enable TPM.

Thank you @irvinewade and @MrChromebox for all the help in this thread!

3 Likes

Every other system I have, which are all EFI based, including the RockPro64 and PinebookPro have setups similar to this:

Disk /dev/nvme0n1: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: Seagate FireCuda 530 ZP4000GM30013      
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: 1E530380-5ED5-CD4B-B06A-E547EEE23206

Device          Start        End    Sectors  Size Type
/dev/nvme0n1p1   4096     618495     614400  300M EFI System
/dev/nvme0n1p2 618496 7814032064 7813413569  3.6T Linux filesystem

Why this basic setup doesn’t work on the librem14 is beyond me.

1 Like

That’s what mine looks like, and it appears to have EFI at the beginning. Not to beat a dead horse, but I’m confused:

1 Like

that’s absolutely incorrect, there is no requirement in the spec for the EFS partition to be in any particular order or place – just the size, format, and GPT flags.

Convention has it as the first partition on the disk for Windows/Linux setups

3 Likes