unable to select usb drive in dus

Bug #1731359 reported by Jonathan Starnes
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mkusb
Fix Released
Critical
sudodus

Bug Description

Hardware: acer 14 chromebook cb3-431
OS: galliumos
version dus 12.2.7 from ppa
program invoked as `mkusb /home/jon/Downloads/artful-desktop-amd64.iso`, selected option d.
zenity test window opens and closes
zenity warning window opens and closes
zenity window titled "dus 12.2.7 - cloning, live linux, windows / Persistent live" opens. Selecting ether l or p. opens select target device window with three options. In the device name column " 4M", "built-in device", "USB or memory card". see http://imgur.com/YqQ4Urml.png for screen shot. The first option seems nonsensical, I have not tried it. Selecting either "built-in device", or "USB or memory card" results in either of the following outputs in the terminal window.

"p_target: target=/dev/built-in device
No target device or bad target device"

OR

"p_target: target=/dev/USB or memory card
No target device or bad target device"

EDIT: output of bash -x dus ~/Downloads/artful-desktop-amd64.iso can be found at https://pastebin.com/cvGgaEiQ

description: updated
Revision history for this message
Jonathan Starnes (datsots) wrote :

Solved on my hardware.

The function p_list_drives creates a list with null values, similar to the one below. Later in the function p_lisdz this data is placed into a zenity dialog via an unquoted variable. Quoting this variable allows zenity to correctly use the data. Quoting the array variables on lines 1391 & 1401 allowed the script work for me.

"" " 4M" "" " 4M" "built-in device"
"" " 4M" "" " 4M" "built-in device"
"sda" "PNY_USB_2.0_FD" "30.5G" "usb" "USB or memory card"
"mmcblk0" "HBG4a2" "29.1G" "mmc" "USB or memory card"

Revision history for this message
Chad Paul (cmpaul) wrote :

I am also running into this. How does someone not familiar with the needed prereqs for the solution above fix this?

Revision history for this message
Craig Skipsey (cmskipsey) wrote :

I've got this issue too... Is there a simple workaround until the bug is fixed?

Revision history for this message
Gerry (gsker) wrote :

This is not tested....

The current version of mkusb from the ppa - 12.3.2-1ubuntu4 - appears to have the offending lines at 1445 and 1435. But I'm totally guessing since I don't have the problem. Could you quote the unquoted bash array variables and let me know here if it fixed your problem?

    Change 1435 ${listd[@]} \ To "${listd[@]}" \

and

    Change 1445 ${lst2[@]} \ To "${lst2[@]" \

GS

Revision history for this message
Gerry (gsker) wrote :

No. That's wrong. He got them to have each field quoted. I'll post that here when I get it right.

Revision history for this message
Gerry (gsker) wrote :

And now I think it's right. Please test.

Revision history for this message
Jonathan Starnes (datsots) wrote :

Testing on kubuntu 19.10 with mkusb 12.3.6-1ubuntu2 from the ppa. "/usr/bin/dus" still contains the unquoted variables. which results in similar failure. See screenshot https://i.imgur.com/uqYgMFJ.png for version and lsblk output.

Revision history for this message
Jonathan Starnes (datsots) wrote :

Adding double quotes around the array variables on lines 1449 1459 prevents re-splitting the array contents. To reliably find errors like this use `shellcheck` for static analysis. Creating a user edited version of `dus` with the changes will allow using the modified version to create live media. Attached is a patch for the version of dus included in mkusb 12.3.6-1ubuntu2.

Revision history for this message
sudodus (nio-wiklund) wrote :

@ everybody affected by this bug,

I am very sorry for the long delay. Until now I have expected feedback via the Ubuntu Forums or via email. I discovered that there are bug reports about mkusb here today.

@ Jonathan Starnes,

Thanks for finding this bug and providing a patch.

-o-

Tonight I have applied the bugfix and uploaded mkusb version 12.4.0, where dus is updated.

You find it in the unstable PPA, ppa:mkusb/unstable

Please verify that this version works for you.

After a few tests I intend to copy it to the stable PPA: ppa:mkusb/ppa

sudodus (nio-wiklund)
Changed in mkusb:
assignee: nobody → sudodus (nio-wiklund)
status: New → Fix Committed
importance: Undecided → Critical
Revision history for this message
sudodus (nio-wiklund) wrote :

Now the bug-fix has migrated to the stable ppa

ppa:mkusb/ppa

Please let us know if this bug-fix solves your problem.

Changed in mkusb:
status: Fix Committed → Fix Released
Revision history for this message
Robert Pearson (rpearsonii) wrote :

A different bug that ubuntu-bug will not report. When creating a UEFI bootable USB device, mkusb partition 1 after the GUID Partition Table is the usbdata partition. Partition 2 is a 1 MB wasted space for BIOS booting (it contains the Microsoft boot code that will not fit in the Master Boot Record and is required to be immediately after the MBR.

Since the USB device does not have an MBR and is booted with UEFI, the 1MB partition is totally unnecessary and is a waste of disk space and a waste of an entry in the GUID Partition Table.

When creating a volume with a GUID Partition Table, this BIOS partition should be omitted.

Robert Pearson

Revision history for this message
sudodus (nio-wiklund) wrote :

@ Robert Pearson (rpearsonii),

Partition #2 is there because mkusb creates drives, that can be booted both in UEFI mode and BIOS mode (alias CSM alias legacy mode). This is a feature of mkusb.

- If you create a drive when booted in BIOS mode mkusb will create a drive that can boot computers in BIOS mode and UEFI mode.

- If you create a drive when booted in UEFI mode mkusb will create a drive that can boot computers in BIOS mode and UEFI mode.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.