Score:0

After install of 22.04 from USB thumb drive, this same thumb drive is not seen

in flag

Ok, here is the scenario.

I have a bootable custom Ubuntu 22.04 install ISO that I copy to a USB thumb drive using dd and I'm able to install on a physical machine SSD using that thumb drive.

After the installer reboots the machine, I log in and using fdisk I do not see the thumb drive:

$ sudo fdisk -l
Disk /dev/loop0: 79.95 MiB, 83832832 bytes, 163736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 46.96 MiB, 49242112 bytes, 96176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 61.96 MiB, 64970752 bytes, 126896 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SPCC Solid State
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: AD72FCA6-2F49-48E3-93D9-01A94EE054A1

Device       Start       End   Sectors   Size Type
/dev/sdb1     2048      4095      2048     1M BIOS boot
/dev/sdb2     4096   4198399   4194304     2G Linux filesystem
/dev/sdb3  4198400 250066943 245868544 117.2G Linux filesystem


Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 58.62 GiB, 62939725824 bytes, 122929152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

But it shows in lsusb:

admin@ihotel-staging:~$ lsusb
Bus 002 Device 004: ID 15d9:1133 Trust International B.V. SuperMicro LCD Display   
Bus 002 Device 003: ID 1221:3234 Unknown manufacturer Disk (Thumb drive)
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0557:2221 ATEN International Co., Ltd Winbond Hermon
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And in lsblk as sda:

$ lsblk
NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0                       7:0    0  79.9M  1 loop /snap/lxd/22923
loop1                       7:1    0    47M  1 loop /snap/snapd/16292
loop2                       7:2    0    62M  1 loop /snap/core20/1587
sda                         8:0    1     0B  0 disk 
sdb                         8:16   0 119.2G  0 disk 
├─sdb1                      8:17   0     1M  0 part 
├─sdb2                      8:18   0     2G  0 part /boot
└─sdb3                      8:19   0 117.2G  0 part 
  └─ubuntu--vg-ubuntu--lv 253:0    0  58.6G  0 lvm  /

It looks like the boot process "unplugs" the thumb drive:

admin@ihotel-staging:~$ sudo dmesg -T | grep sda
[Wed Nov  9 15:24:41 2022] sd 0:0:0:0: [sda] Media removed, stopped polling
[Wed Nov  9 15:24:42 2022] sd 0:0:0:0: [sda] Attached SCSI removable disk

Same thing if I do a warm reboot or cold boot.

The only way to get the thumb drive to be available is to physically disconnect it and reconnect it to the USB port. And after doing so, it's always available after a ward reboot or cold boot...

dmesg when I physically disconnect and reconnect it:

[Wed Nov  9 15:50:22 2022] usb 2-1.2: USB disconnect, device number 3
[Wed Nov  9 15:50:26 2022] usb 2-1.2: new high-speed USB device number 5 using ehci-pci
[Wed Nov  9 15:50:27 2022] usb 2-1.2: New USB device found, idVendor=1221, idProduct=3234, bcdDevice= 0.00
[Wed Nov  9 15:50:27 2022] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Wed Nov  9 15:50:27 2022] usb 2-1.2: Product: Flash Disk
[Wed Nov  9 15:50:27 2022] usb 2-1.2: Manufacturer: USB2.0
[Wed Nov  9 15:50:27 2022] usb 2-1.2: SerialNumber: WD00009162002034
[Wed Nov  9 15:50:27 2022] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[Wed Nov  9 15:50:27 2022] scsi host0: usb-storage 2-1.2:1.0
[Wed Nov  9 15:50:28 2022] scsi 0:0:0:0: Direct-Access     USB2.0   Flash Disk       2.b0 PQ: 0 ANSI: 2
[Wed Nov  9 15:50:28 2022] sd 0:0:0:0: Attached scsi generic sg0 type 0
[Wed Nov  9 15:50:28 2022] sd 0:0:0:0: [sda] 15974400 512-byte logical blocks: (8.18 GB/7.62 GiB)
[Wed Nov  9 15:50:28 2022] sd 0:0:0:0: [sda] Write Protect is off
[Wed Nov  9 15:50:28 2022] sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
[Wed Nov  9 15:50:28 2022] sd 0:0:0:0: [sda] No Caching mode page found
[Wed Nov  9 15:50:28 2022] sd 0:0:0:0: [sda] Assuming drive cache: write through
[Wed Nov  9 15:50:28 2022]  sda: sda1 sda2 sda3 sda4
[Wed Nov  9 15:50:28 2022] sd 0:0:0:0: [sda] Attached SCSI removable disk

fdisk -l after I physically disconnect and reconnect it:

$ sudo fdisk -l
Disk /dev/loop0: 61.96 MiB, 64970752 bytes, 126896 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 79.95 MiB, 83832832 bytes, 163736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 46.96 MiB, 49242112 bytes, 96176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SPCC Solid State
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: AD72FCA6-2F49-48E3-93D9-01A94EE054A1

Device       Start       End   Sectors   Size Type
/dev/sdb1     2048      4095      2048     1M BIOS boot
/dev/sdb2     4096   4198399   4194304     2G Linux filesystem
/dev/sdb3  4198400 250066943 245868544 117.2G Linux filesystem


Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 58.62 GiB, 62939725824 bytes, 122929152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 7.62 GiB, 8178892800 bytes, 15974400 sectors
Disk model: Flash Disk      
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: 0D2E9842-BEF5-4EB8-BD9E-048609496FAF

Device       Start      End  Sectors  Size Type
/dev/sda1       64  2923575  2923512  1.4G Microsoft basic data
/dev/sda2  2923576  2932071     8496  4.1M EFI System
/dev/sda3  2932072  2932671      600  300K Microsoft basic data
/dev/sda4  2932736 15974336 13041601  6.2G Linux filesystem

Any hints to get the drive recognized without having to physically disconnect and reconnect it ?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.