On Wed, Mar 15, 2017 at 1:14 AM, John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx> wrote: > Hi! > > Some Debian users who are installing Debian for sparc64 in an LDOM run into > the problem that the debian-installer is unable to detect the installation > medium. > > Digging through the sources of the responsible debian-installer module, it > turns out that d-i uses "udevadm info" to query information from all available > block devices listed in /sys/block. To detect a CD-ROM, it looks for "ID_CDROM=1" > or "ID_TYPE=cd". > > Unfortunately, this fails with sunvdc with a virtual CD-ROM drive as the data > retrieved by "udevadm info" is very limited as compared to a standard PC with > a physical CD-ROM drive. > > For comparison, on a SPARC T5, I get: > > /sys/block # udevadm info -q env -p /sys/block/vdiskd > DEVLINKS=/dev/disk/by-uuid/2017-03-14-14-05-33-00 /dev/disk/by-label/Debian\x209.0\x20sparc64\x201 > DEVNAME=/dev/vdiskd > DEVPATH=/devices/channel-devices/vdc-port-3-0/block/vdiskd > DEVTYPE=disk > ID_FS_LABEL=Debian_9.0_sparc64_1 > ID_FS_LABEL_ENC=Debian\x209.0\x20sparc64\x201 > ID_FS_TYPE=iso9660 > ID_FS_USAGE=filesystem > ID_FS_UUID=2017-03-14-14-05-33-00 > ID_FS_UUID_ENC=2017-03-14-14-05-33-00 > ID_PART_TABLE_TYPE=sun > MAJOR=254 > MINOR=24 > SUBSYSTEM=block > USEC_INITIALIZED=634522 > /sys/block # > > Compare this to the output for a standard USB CD-ROM device on my laptop: > > glaubitz@ikarus:/sys/block$ udevadm info -q env -p /sys/block/sr0 > DEVLINKS=/dev/disk/by-path/pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0 /dev/disk/by-id/usb-TSSTcorp_CDDVDW_SE-S084D_0j468695-0:0 /dev/dvdrw /dev/dvd /dev/cdrom > /dev/cdrw > DEVNAME=/dev/sr0 > DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0/block/sr0 > DEVTYPE=disk > ID_BUS=usb > ID_CDROM=1 > ID_CDROM_CD=1 > ID_CDROM_CD_R=1 > ID_CDROM_CD_RW=1 > ID_CDROM_DVD=1 > ID_CDROM_DVD_PLUS_R=1 > ID_CDROM_DVD_PLUS_RW=1 > ID_CDROM_DVD_PLUS_R_DL=1 > ID_CDROM_DVD_R=1 > ID_CDROM_DVD_RAM=1 > ID_CDROM_DVD_RW=1 > ID_CDROM_MRW=1 > ID_CDROM_MRW_W=1 > ID_FOR_SEAT=block-pci-0000_00_14_0-usb-0_2_1_0-scsi-0_0_0_0 > ID_INSTANCE=0:0 > ID_MODEL=CDDVDW_SE-S084D > ID_MODEL_ENC=CDDVDW\x20SE-S084D\x20 > ID_MODEL_ID=1836 > ID_PATH=pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0 > ID_PATH_TAG=pci-0000_00_14_0-usb-0_2_1_0-scsi-0_0_0_0 > ID_REVISION=TS00 > ID_SERIAL=TSSTcorp_CDDVDW_SE-S084D_0j468695-0:0 > ID_SERIAL_SHORT=0j468695 > ID_TYPE=cd > ID_USB_DRIVER=usb-storage > ID_USB_INTERFACES=:080250: > ID_USB_INTERFACE_NUM=00 > ID_VENDOR=TSSTcorp > ID_VENDOR_ENC=TSSTcorp > ID_VENDOR_ID=0e8d > MAJOR=11 > MINOR=0 > SUBSYSTEM=block > SYSTEMD_READY=0 > TAGS=:systemd:uaccess:seat: > USEC_INITIALIZED=16198574878 > glaubitz@ikarus:/sys/block$ > > Would it be possible to extend sunvdc to display additional fields? In particular, it would be very useful > if sunvdc could indicate whether the virtual block device is a regular disk or a CD-ROM drive. Adrian, wouldn't it be easier to patch d-i (userspace) to add support for "ID_FS_TYPE=iso9660" as /dev/cdrom (besides of "ID_CDROM=1"), instead of patching kernel (sunvdc.c) sources? PS: running qemu on x86_64 as $ qemu-system-sparc64 -hda hda.img -cdrom debian-7.11.0-sparc-netinst.iso and inside qemu : # udevadm info -q env -p /sys/block/sr0 DEVLINKS=/dev/cdrom1 /dev/disk/by-id/ata-EQUMD_DVR-MO_MQ0000_3 /dev/disk/by-label/Debian\x207.11.0\x20sparc\x201 /dev/disk/by-path/platform-ffe2b5a8-pci-0000:00:05.0-scsi-1:0:0:0 /dev/dvd1 DEVNAME=/dev/sr0 DEVPATH=/devices/root/ffe2b5a8/pci0000:00/0000:00:05.0/host1/target1:0:0/1:0:0:0/block/sr0 DEVTYPE=disk GENERATED=1 ID_ATA=1 ID_BUS=ata ID_CDROM=1 ID_CDROM_DVD=1 ID_CDROM_MEDIA=1 ID_CDROM_MEDIA_CD=1 ID_CDROM_MEDIA_SESSION_COUNT=1 ID_CDROM_MEDIA_TRACK_COUNT=1 ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 ID_CDROM_MRW=1 ID_CDROM_MRW_W=1 ID_FS_LABEL=Debian_7.11.0_sparc_1 ID_FS_LABEL_ENC=Debian\x207.11.0\x20sparc\x201 ID_FS_TYPE=iso9660 ID_FS_USAGE=filesystem ID_MODEL=EQUMD_DVR-MO ID_MODEL_ENC=EQUMD\x20DVR-MO\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 ID_PART_TABLE_TYPE=sun ID_PATH=platform-ffe2b5a8-pci-0000:00:05.0-scsi-1:0:0:0 ID_PATH_TAG=platform-ffe2b5a8-pci-0000_00_05_0-scsi-1_0_0_0 ID_REVISION=.2+5 ID_SERIAL=EQUMD_DVR-MO_MQ0000_3 ID_SERIAL_SHORT=MQ0000_3 ID_TYPE=cd MAJOR=11 MINOR=0 SUBSYSTEM=block TAGS=:udev-acl: UDEV_LOG=3 USEC_INITIALIZED=39425573 dmesg cut: [ 37.995639] udevd[43]: starting version 175 [ 43.839280] SCSI subsystem initialized [ 44.074912] libata version 3.00 loaded. [ 44.168027] scsi0 : pata_cmd64x [ 44.174100] scsi1 : pata_cmd64x [ 44.175483] ata1: PATA max UDMA/33 cmd 0x1fe02008080 ctl 0x1fe02008100 bmdma 0x1fe02008280 irq 7 [ 44.176309] ata2: PATA max UDMA/33 cmd 0x1fe02008180 ctl 0x1fe02008200 bmdma 0x1fe02008288 irq 7 [ 44.197377] pata_cmd64x: active 10 recovery 10 setup 3. [ 44.197550] pata_cmd64x: active 10 recovery 10 setup 3. [ 44.366417] ata1.01: NODEV after polling detection [ 44.368357] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100 [ 44.368716] ata1.00: 18874368 sectors, multi 16: LBA48 [ 44.369956] pata_cmd64x: active 3 recovery 1 setup 1. [ 44.378555] ata1.00: configured for UDMA/33 [ 44.410389] scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5 [ 44.430084] pata_cmd64x: active 10 recovery 10 setup 3. [ 44.430132] pata_cmd64x: active 10 recovery 10 setup 3. [ 44.586422] ata2.01: NODEV after polling detection [ 44.586997] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100 [ 44.587517] pata_cmd64x: active 4 recovery 2 setup 1. [ 44.588013] ata2.00: configured for UDMA/33 [ 44.592133] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5 [ 45.049560] sd 0:0:0:0: [sda] 18874368 512-byte logical blocks: (9.66 GB/9.00 GiB) [ 45.057268] sd 0:0:0:0: [sda] Write Protect is off [ 45.057602] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 45.059324] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 45.080040] sr0: scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray [ 45.080716] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 45.097015] sr 1:0:0:0: Attached scsi CD-ROM sr0 [ 45.104671] sda: sda1 sda2 sda3 [ 45.114193] sd 0:0:0:0: [sda] Attached SCSI disk [ 45.289872] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 45.298169] sr 1:0:0:0: Attached scsi generic sg1 type 5 [ 46.943661] device-mapper: uevent: version 1.0.3 -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html