On 6/10/20 4:09 PM, Steve McIntyre wrote:
But I assume you must have a /dev/sda device file. I see similar
locally on my laptop, where /dev/sda is a SATA drive and /dev/sdb is
an SD reader with nothing inserted:

# ls -al /dev/sd?
brw-rw---- 1 root disk 8,  0 Jun 10 06:25 /dev/sda
brw-rw---- 1 root disk 8, 16 Apr 19 03:15 /dev/sdb

$ sudo fdisk -l /dev/sd?
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: CT2000MX500SSD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 98589918-89BC-48F0-9D29-CFD892E47618

Device       Start        End    Sectors  Size Type
/dev/sda1     2048    1050623    1048576  512M EFI System
/dev/sda2  1050624    1550335     499712  244M Linux filesystem
/dev/sda3  1550336 3907028991 3905478656  1.8T Linux filesystem

fdisk: cannot open /dev/sdb: No medium found

Your system is probably similar...

Thanks Steve for the hint where to look and confirming that you also get
these superfluous warnings.

$ ls /dev/sd*
/dev/sda

$ sudo udevadm info -a -n /dev/sda

  looking at device
'/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/host0/target0:0:0/0:0:0:0/block/sda':
    KERNEL=="sda"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{ext_range}=="256"
    ATTR{range}=="16"
    ATTR{discard_alignment}=="0"
    ATTR{events_poll_msecs}=="-1"
    ATTR{removable}=="1"
    ATTR{alignment_offset}=="0"
    ATTR{events}=="media_change"
    ATTR{inflight}=="       0        0"
    ATTR{events_async}==""
    ATTR{ro}=="0"
    ATTR{stat}=="       2        0        2        4        0        0
      0        0        0       12        0        0        0        0
      0        0        0"
    ATTR{size}=="0"
    ATTR{capability}=="51"
    ATTR{hidden}=="0"

$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. USB3.0-CRW
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 5986:2113 Acer, Inc Integrated Camera
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/dev/sda corresponds to the *empty* USB card reader 0bda:0316.

lsblk does not show /dev/sda if there is no card inserted. So why should
GRUB not do the same and avoid superfluous and irritating user messages?

Best regards

Heinrich

Reply via email to