Live USB not seeing external NVMe drive

Hello, I’m trying to install Ubuntu on a NVMe drive in an external USB4 enclosure (to remove my current installation on the internal drive). The drive is recognized and works either in Windows and in my current Ubuntu 24.04.3 installation on the internal disk; but when booting from the USB installation live image, the drive isn’t there to install to.

Ubuntu Version:

24.04.3 LTS, tried also 25.10 but problem remains.

Desktop Environment (if applicable):

Problem Description:

In the live environment the disk doesn’t show in the Ubuntu installer, nor in the Disks app and even lspci doesn’t enumerate it. AFAIK the problem should be that error -4 while loading the nvme driver, shown by dmesg when booting the live USB. Error that I don’t get when booting the installed system

Relevant System Information:

The installed system has its kernel upgraded to 6.0.14-33 (6.0.14-27 on the installation media).

Screenshots or Error Messages:

Error while booting USB-live image:

5.373241] usbhid: USB HID core driver
[   62.570350] nvme 0000:12:00.0: probe with driver nvme failed with error -4

Correct drive recognition by the installed system:

12:00.0 Non-Volatile memory controller: Shenzhen Longsys Electronics Co., Ltd. Lexar NM790 NVME SSD (DRAM-less) (rev 01) (prog-if 02 [NVM Express])
	Subsystem: Shenzhen Longsys Electronics Co., Ltd. Lexar NM790 NVME SSD (DRAM-less)
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 24
	IOMMU group: 23
	Region 0: Memory at a4000000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: nvme
	Kernel modules: nvme

What I’ve Tried:

I’ve tried the 25.10 installer and even the Fedora 42 (with kernel 6.16) one. External disk, doesn’t show.


Your target disk Lexar NM790 NVME SSD , does it have a partition table (preferably gpt)?

Can you boot into your installed Ubuntu 24.04.3, attach the enclosure containing the Lexar disk, open a terminal and enter:-

sudo parted -l

Please post the output within code tags.

It used to have a NTFS partition but now I’ve formatted it with EXT4 (and GPT table) just to give that a try; but, as expected, it keeps not being seen by the installation environment.
This is the output of the command “sudo parted -l”:

Model: Samsung SSD 990 EVO Plus 4TB (nvme)
Disk /dev/nvme0n1: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  106MB   105MB   fat32        Basic data partition          boot, esp, no_automount
 2      106MB   123MB   16,8MB               Microsoft reserved partition  msftres, no_automount
 3      123MB   3464GB  3464GB  ntfs         Basic data partition          msftdata, no_automount
 4      3464GB  4001GB  537GB   ext4


Model: Lexar SSD EQ790 1TB (nvme)
Disk /dev/nvme1n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1000GB  1000GB  ext4

Unusual, to say, the least.
The output from sudo parted -l looks absolutely fine.

Anyway, let’s see if we can crack this impasse, suggestions herewith:-

  • Check your UEFI settings to see if anything prevents installing to external usb-c or usb-a devices

  • Disable Secure Boot and any TPM related options

  • Choose Manual Installation within the install process - Is the Lexar disk available?

1 Like

My motherboard (ASUS ROG-Strix X870-f Gaming WiFi) doesn’t have a clear BIOS setting to turn off Secure Boot. I had already set it to “Other OS” in “OS type option” and the only TPM setting I’ve found is “AMD fTPM” that I’ve tried to turn off “disable Firmware TPM” but no luck.
Honestly I don’t think that’s the problem: my issue isn’t being unable to boot from the external disk, my issue is not even being able to install to the external disk.

In the Ubuntu system where this drive is correctly recognized, run journalctl -b -f, then plug in this drive. Note the output shown. (Type Ctrl+C to stop this journalctl command.)

With the disk disconnected, boot the Ubuntu live USB where the disk does not work. Then, inside the live USB, run journalctl -b -f, then plug in this drive in the same USB port that worked in your installed Ubuntu system. Compare this output to the working output, any differences?

Also, what version of Ubuntu would you ideally like to install onto your external SSD? If 24.04, are you able to try latest “daily” 24.04.x ISO? It currently has the 6.14.0-33-generic kernel you’re using in your installed 24.04 system, so should either resolve or rule out kernel version differences as the issue.

If you try the daily 24.04 ISO and it does not recognize your drive, maybe compare the list of installed packages in the non-working live USB environment vs. on your installed system:

dpkg-query -W -f '${binary:Package}\n'
1 Like

What do you get, from your Live session, when you type the command

lsblk

Is your external disk being reported then?

If you want a different report format regarding your partitions, you could consider using the script which is offered up in the following posting:

https://ubuntu-mate.community/t/after-24-04-1-unable-to-mount-usb-dev/28258/6

or obtain the script from my GitHub library:

So, after a few days of try and error I finally solved it.
The problem was the thunderbolt kernel module crashing when the external drive first connects (if hot-plugged, freezing the whole system until a hard reset).
Then I found this post and, not having the skill and time to create a custom install disk with modified grub configuration, I resorted to connecting the enclosure to a USB-only port (one of the chassis ones) that forced the kernel to use the USB driver instead of the thunderbolt one, a lot slower but whatever. Only caveat was pre-partition and format the disk with GParted because the built-in installer partitioner gave me an error. Then after rebooting with the disk still attached to an USB-only port, I made the grub config modification as suggested in the aforementioned link.
Now I can boot in Thunderbolt mode and ALMOST everything works fine.
I wrote “almost” because now I need to understand why I get terrible slow downs when transferring big/many files.

1 Like

Slow-downs in

  • CPU, or
  • network transfer ?

Also, only for awareness, sharing these two reference sources:

which could offer additional insights.

Disk transfers. The speed fluctuates and after a few seconds tumbles down to very slow (checked from System Monitor) when transferring large amounts of data.
I’m on AMD (X870), both the enclosure and the motherboard have ASmedia chipsets that I’ve updated to the latest firmwares.

Maybe journaling, buffering (block and total MB), on-board cache (block and total MB) is defined differently for each of the drives you are comparing.

Maybe try running the following script with a target file on two drives that you are comparing, to see if you can spot anything that can be tuned. Tweak the block size for the device’s own block size.


Script:

#!/bin/sh

testFile="/DB001_F7/io_WriteTest.dat"

fio	--name=WriteTest	\
	--ioengine=sync		\
	--rw=write		\
	--bs=4k			\
	--numjobs=1		\
	--size=1G		\
	--time_based		\
	--runtime=20s		\
	--filename="${testFile}"

echo ""
ls -l "${testFile}"

The report looks like this:

WriteTest: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=sync, iodepth=1
fio-3.28
Starting 1 process
WriteTest: Laying out IO file (1 file / 1024MiB)
Jobs: 1 (f=1): [W(1)][100.0%][w=7192KiB/s][w=1798 IOPS][eta 00m:00s]
WriteTest: (groupid=0, jobs=1): err= 0: pid=11687: Sun Oct 19 16:07:34 2025
  write: IOPS=7103, BW=27.7MiB/s (29.1MB/s)(555MiB/20007msec); 0 zone resets
    clat (usec): min=15, max=40286, avg=138.99, stdev=1250.21
     lat (usec): min=15, max=40286, avg=139.20, stdev=1250.21
    clat percentiles (usec):
     |  1.00th=[   16],  5.00th=[   16], 10.00th=[   16], 20.00th=[   16],
     | 30.00th=[   16], 40.00th=[   17], 50.00th=[   17], 60.00th=[   17],
     | 70.00th=[   17], 80.00th=[   18], 90.00th=[   20], 95.00th=[   21],
     | 99.00th=[ 6390], 99.50th=[ 9241], 99.90th=[17171], 99.95th=[22152],
     | 99.99th=[33162]
   bw (  KiB/s): min= 4432, max=212640, per=100.00%, avg=28883.08, stdev=38807.26, samples=39
   iops        : min= 1108, max=53160, avg=7220.77, stdev=9701.82, samples=39
  lat (usec)   : 20=93.15%, 50=5.49%, 100=0.12%, 250=0.05%, 500=0.01%
  lat (msec)   : 10=0.71%, 20=0.40%, 50=0.07%
  cpu          : usr=1.87%, sys=11.87%, ctx=1679, majf=0, minf=13
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=0,142118,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: bw=27.7MiB/s (29.1MB/s), 27.7MiB/s-27.7MiB/s (29.1MB/s-29.1MB/s), io=555MiB (582MB), run=20007-20007msec

Disk stats (read/write):
  sda: ios=11/1386, merge=1/130303, ticks=421/377565, in_queue=378837, util=59.10%

-rw-r--r-- 1 root root 1073741824 Oct 19 16:07 /DB001_F7/io_WriteTest.dat


You might also want to check what is reported for onboard characteristics for the drives that you are comparing. You can do that with the following command for each drive:

hdparm -I /dev/sd?

The report from that command looks like this:

/dev/sda:

ATA device, with non-removable media
	Model Number:       WDC WD20EZRX-00DC0B0                    
	Serial Number:      WD-WCC300611350
	Firmware Revision:  80.00A80
	Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
	Supported: 9 8 7 6 5 
	Likely used: 9
Configuration:
	Logical		max	current
	cylinders	16383	16383
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:    16514064
	LBA    user addressable sectors:   268435455
	LBA48  user addressable sectors:  3907029168
	Logical  Sector size:                   512 bytes
	Physical Sector size:                  4096 bytes
	device size with M = 1024*1024:     1907729 MBytes
	device size with M = 1000*1000:     2000398 MBytes (2000 GB)
	cache/buffer size  = unknown
Capabilities:
	LBA, IORDY(can be disabled)
	Queue depth: 32
	Standby timer values: spec'd by Standard, with device specific minimum
	R/W multiple sector transfer: Max = 16	Current = 16
	DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
	   *	SMART feature set
	    	Security Mode feature set
	   *	Power Management feature set
	   *	Write cache
	   *	Look-ahead
	   *	Host Protected Area feature set
	   *	WRITE_BUFFER command
	   *	READ_BUFFER command
	   *	NOP cmd
	   *	DOWNLOAD_MICROCODE
	    	Power-Up In Standby feature set
	   *	SET_FEATURES required to spinup after power up
	    	SET_MAX security extension
	   *	48-bit Address feature set
	   *	Device Configuration Overlay feature set
	   *	Mandatory FLUSH_CACHE
	   *	FLUSH_CACHE_EXT
	   *	SMART error logging
	   *	SMART self-test
	   *	General Purpose Logging feature set
	   *	64-bit World wide name
	   *	WRITE_UNCORRECTABLE_EXT command
	   *	{READ,WRITE}_DMA_EXT_GPL commands
	   *	Segmented DOWNLOAD_MICROCODE
	   *	Gen1 signaling speed (1.5Gb/s)
	   *	Gen2 signaling speed (3.0Gb/s)
	   *	Native Command Queueing (NCQ)
	   *	Host-initiated interface power management
	   *	Phy event counters
	   *	NCQ priority information
	   *	READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
	   *	DMA Setup Auto-Activate optimization
	    	Device-initiated interface power management
	   *	Software settings preservation
	   *	SMART Command Transport (SCT) feature set
	   *	SCT Write Same (AC2)
	   *	SCT Features Control (AC4)
	   *	SCT Data Tables (AC5)
	    	unknown 206[7]
	    	unknown 206[12] (vendor specific)
	    	unknown 206[13] (vendor specific)
	    	unknown 206[14] (vendor specific)
Security: 
	Master password revision code = 65534
		supported
	not	enabled
	not	locked
		frozen
	not	expired: security count
		supported: enhanced erase
	294min for SECURITY ERASE UNIT. 294min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee25ddf981e
	NAA		: 5
	IEEE OUI	: 0014ee
	Unique ID	: 25ddf981e
Checksum: correct

Looks like the problem was the disk (Lexar EQ790), replaced that with a Samsung 990 Evo Plus and the problem disappeared. Didn’t even need to reinstall, just transferred with Clonezilla.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.