#82 --image parameter only accepts /dev/sdX not /dev/disk/by-XX, because of an assumption, perhaps.
Closed: Fixed by pbrobinson. Opened by shura.

[Apologies if you'd rather I didn't file this possible issue here. I don't know the parent repo at all and would rather file whilst I have the data at hand]

I have tied several fedora-iot images including that below. It doesn't seem as though it would be connected to the image though.

As you can see from the below the second stage, removing the root password, fails because the image can't be mounted. To be clear the difficulty appears to be the facts that parsing of the --image assumes that adding the partition number to the assumed /dev/sdX string will work.

Example 1a:

~ ❯❯❯ sudo arm-image-installer --image ~/Projects/fedora-iot/image/Fedora-IoT-34-20210801.0.aarch64.raw.xz --target=rpi3 --media=/dev/disk/by-id/usb-Generic_STORAGE_DEVICE_000000001532-0:0  --resizefs --norootpass
[sudo] password for boris: 

=====================================================
= Selected Image:                                 
= /home/boris/Projects/fedora-iot/image/Fedora-IoT-34-20210801.0.aarch64.raw.xz
= Selected Media : /dev/disk/by-id/usb-Generic_STORAGE_DEVICE_000000001532-0:0
= U-Boot Target : rpi3
= Root Password will be removed.
= Root partition will be resized
=====================================================

<SNIP>

Calling ioctl() to re-read partition table.
Syncing disks.
**Error: mount /dev/disk/by-id/usb-Generic_STORAGE_DEVICE_000000001532-0:02 /tmp/boot failed**

Now
lrwxrwxrwx. 1 root root 9 Aug 30 17:32 /dev/disk/by-id/usb-Generic_STORAGE_DEVICE_000000001532-0:0 -> ../../sdf
I think the clue is the extra 2 in the error message - the code seems to have added a 2 to what would have been a /dev/sdX get the second partition /dev/sdX2.

Contrasted with
Example 1b:

~ ❯❯❯ sudo arm-image-installer --image ~/Projects/fedora-iot/image/Fedora-IoT-34-20210801.0.aarch64.raw.xz --target=rpi3 --media=/dev/sdf  --resizefs --norootpass
[sudo] password for boris: 

=====================================================
= Selected Image:                                 
= /home/boris/Projects/fedora-iot/image/Fedora-IoT-34-20210801.0.aarch64.raw.xz
= Selected Media : /dev/sdf
= U-Boot Target : rpi3
= Root Password will be removed.
= Root partition will be resized
=====================================================

<SNIP>

The filesystem on /dev/sdf3 is now 7424512 (4k) blocks long.

= Raspberry Pi 3 Uboot is already in place, no changes needed.
= Removing the root password.

= Installation Complete! Insert into the rpi3 and boot.

Script (?) needs a couple of readlink -f or equivalent before the concatenation.

I believe we improved this, if it's still a problem please report a new bug at the new upstream https://github.com/fedora-arm/arm-image-installer/

Metadata Update from @pbrobinson:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Log in to comment on this ticket.

Metadata