multibootusb
                                
                                
                                
                                    multibootusb copied to clipboard
                            
                            
                            
                        multibootusb hangs forever on installing syslinux
Attempting to install a few ISO images onto an usb and the whole process goes through and hangs forever on installing syslinux. If i anyway quit the process and reboot, the system can boot into the USB but it does not find any distro to boot. It only finds one entry saying "Load Syslinux Boot Loader", but clicking on it returns to the same screen after 3 to 5 seconds.
I tried formatting the USB in different ways, but at the moment is formatted as
sdb            29,9G                        
├─sdb1 ntfs    22,4G /media/avila/dataAvila dataAvila
└─sdb2 vfat     7,5G /media/avila/AvilaISO  AvilaISO
that is, 2 partitions, with the second being for the live USB distros.
content from /tmp/multibootusb.log
01:49:51.228 root INFO Could not find resource 'data/tools/gdisk/gdisk.exe'.
01:49:51.280 root INFO Using python version 3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0]on platform Linux-4.15.0-20-generic-x86_64-with-Ubuntu-18.04-bionic
01:49:51.280 root INFO Running multibootusb version 9.2.0 from installed system...
01:49:51.285 root INFO Starting multibootusb GUI...
01:49:51.341 root INFO Cleaning old multibootusb directory...
01:49:51.341 root INFO Syslinux exist in multibootusb directory...
01:49:51.341 root INFO Using pyudev for detecting USB drives...
01:49:51.352 root INFO 	/dev/sdb
01:49:51.352 root INFO 	/dev/sdb1
01:49:51.352 root INFO 	/dev/sdb2
01:49:51.354 root INFO Selected device /dev/sdb
01:49:51.496 root INFO Device /dev/sdb is a GPT disk...
01:49:51.524 root INFO USB disk is not mounted and can't update list widget...
01:49:56.687 root INFO Executing ==> 7z -ssc-  x -y "/home/avila/Downloads/ubuntu-budgie-18.04-desktop-amd64.iso" -o"/root/.multibootusb/iso_cfg_ext_dir" "*.cfg" -r 2> /dev/null
01:49:56.700 root INFO Executing ==> 7z -ssc-  x -y "/home/avila/Downloads/ubuntu-budgie-18.04-desktop-amd64.iso" -o"/root/.multibootusb/iso_cfg_ext_dir" "*.txt" -r 2> /dev/null
01:49:56.710 root INFO Executing ==> 7z -ssc-  x -y "/home/avila/Downloads/ubuntu-budgie-18.04-desktop-amd64.iso" -o"/root/.multibootusb/iso_cfg_ext_dir" "*isolinux.bin" -r 2> /dev/null
01:49:56.720 root INFO Executing ==> 7z -ssc-  x -y "/home/avila/Downloads/ubuntu-budgie-18.04-desktop-amd64.iso" -o"/root/.multibootusb/iso_cfg_ext_dir" "*.lst" -r 2> /dev/null
01:49:56.807 root INFO Persistence option is available.
01:49:56.807 root INFO Persistence Max Size: Unknown
01:49:59.640 root INFO Selected device /dev/sdb1
01:49:59.785 root INFO Device /dev/sdb1 is a GPT disk...
01:50:01.622 root INFO MultiBoot Install: USB Disk: /dev/sdb1
01:50:01.622 root INFO MultiBoot Install: USB Label: dataAvila
01:50:01.623 root INFO MultiBoot Install: USB UUID: 463C8C9240428DBF
01:50:01.623 root INFO MultiBoot Install: USB mount path: /media/avila/dataAvila
01:50:01.623 root INFO MultiBoot Install: Disk total size: 22.4G
01:50:01.623 root INFO MultiBoot Install: Disk used size: 65.1M
01:50:01.623 root INFO MultiBoot Install: Disk free size: 22.3G
01:50:01.623 root INFO MultiBoot Install: Filesystem: ntfs
01:50:01.623 root INFO MultiBoot Install: Disk vendor: Samsung
01:50:01.623 root INFO MultiBoot Install: Disk model: Flash_Drive
01:50:01.624 root INFO MultiBoot Install: ISO file: ubuntu-budgie-18.04-desktop-amd64.iso
01:50:01.624 root INFO MultiBoot Install: Distro type detected: ubuntu
01:50:01.624 root INFO Persistence chosen is 0B
01:50:05.528 root INFO Copying multibootusb directory to /media/avila/dataAvila
01:50:06.289 root INFO EFI/BOOT directory does not exist. Creating new.
01:50:06.290 root INFO Copying EFI directory to /media/avila/dataAvila
01:50:06.422 root INFO Installing ubuntu-budgie-18.04-desktop-amd64.iso on /media/avila/dataAvila/multibootusb/ubuntu-budgie-18.04-desktop-amd64
01:50:06.422 root INFO Executing ==> 7z -ssc-  x -y -o"/media/avila/dataAvila/multibootusb/ubuntu-budgie-18.04-desktop-amd64" "/home/avila/Downloads/ubuntu-budgie-18.04-desktop-amd64.iso" 2> /dev/null
01:55:27.361 root INFO ISO extracted successfully. Sync is in progress...
02:00:11.241 root INFO Distro extraction completed...
02:00:11.375 root INFO 
Found syslinux version 6
02:00:11.375 root INFO Executing ==> /root/.multibootusb/syslinux/bin/extlinux6 --install /media/avila/dataAvila/multibootusb/ubuntu-budgie-18.04-desktop-amd64/isolinux
02:00:17.144 root INFO 
Syslinux install on distro directory is successful...
02:00:17.149 root INFO 
Bootsector copy is successful...
02:00:17.163 root INFO Using gptmbr.bin for mbr install.
02:00:17.163 root INFO Could not find resource 'data/tools/gptmbr.bin'.
                                    
                                    
                                    
                                
Ok...
After reading the content of /tmp/multibootusb.log, I found the solution, that is, manually downloading
https://github.com/mbusb/multibootusb/blob/master/data/tools/gptmbr.bin
and saving in under
/usr/share/multibootusb/data/tools
now the process exits successfully (but I did not try yet to boot from usb)
I can confirm that this problem also happens with the RPM package for Fedora.
It still happens on Manjaro
Using python version  3.7.0 (default, Jul 15 2018, 10:44:58) 
[GCC 8.1.1 20180531] on platform Linux-4.14.66-1-MANJARO-x86_64-with-arch-Manjaro-Linux
Could not find resource 'data/tools/gdisk/gdisk.exe'.
Running multibootusb version 9.2.0 from installed system...
Starting multibootusb GUI...
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Cleaning old multibootusb directory...
Syslinux exist in multibootusb directory...
Using pyudev for detecting USB drives...
	/dev/sdc
	/dev/sdc1
Selected device /dev/sdc
Device /dev/sdc is a GPT disk...
USB disk is not mounted and can't update list widget...
Selected device /dev/sdc1
Device /dev/sdc1 is a GPT disk...
Installing default syslinux on /dev/sdc1
Using gptmbr.bin for mbr install.
Could not find resource 'data/tools/gptmbr.bin'.
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/scripts/mbusb_gui.py", line 387, in onInstall_syslinuxClick
    ret = syslinux_default(config.usb_disk)
  File "/usr/lib/python3.7/site-packages/scripts/syslinux.py", line 107, in syslinux_default
    mbr_install_cmd = 'dd bs=440 count=1 conv=notrunc if=' + mbr_bin + ' of=' + usb_disk[:-1]
TypeError: can only concatenate str (not "NoneType") to str
Aborted
Used @mr-avila comment and downloaded from github but distro is not visible.
Looks like the problem happens when you run multibootusb from a working directory other than the project root directory, because paths like "data/tools/gdisk/gdisk.exe" or "data/tools/gptmbr.bin" are relative.
A couple of possible ways to fix the issue:
- 
make
multibootusbchange the current working directory to its parent directory. - 
Using some
os.pathtricks, we make these directories not relative, e.g.: 
from os import path
mbr_bin = path.join(path.dirname(__file__), 'data', 'tools', 'gptmbr.bin')
There are probably more robust ways to solve this, but that's what comes to mind.
I confirm that @mr-avila 's solution works.
https://github.com/mbusb/multibootusb/blob/master/data/tools/gptmbr.binand saving in under
/usr/share/multibootusb/data/tools
On a variant of Ubuntu 18.10, this allowed the USB writing to continue, but the resulting multi-USB couldn't boot. I fixed the problem by getting rid of the GPT and just having an MBR partition table by using fdisk instead of gdisk to create the partition. When made a MBR partition table without GPT, gptmbr.bin wasn't needed. Also, I happened to be using ext4. I don't know what it would be like if I had used VFAT.
ENV
uname -a
Linux ws1 4.18.0-22-generic #23~18.04.1-Ubuntu SMP Thu Jun 6 08:37:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic
No missing files alert after fix applied but still hanging on syslinux install.
sudo wget -P /usr/share/multibootusb/data/tools/gdisk https://github.com/mbusb/multibootusb/blob/master/data/tools/gdisk/gdisk.exe
sudo wget -P /usr/share/multibootusb/data/tools https://github.com/mbusb/multibootusb/blob/master/data/tools/gptmbr.bin
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/scripts/mbusb_gui.py", line 352, in install_syslinux config.distro, config.persistence) File "/usr/lib/python3/dist-packages/scripts/update_cfg_file.py", line 402, in update_distro_cfg_files callback(dirpath, f) File "/usr/lib/python3/dist-packages/scripts/update_cfg_file.py", line 374, in fix_desktop_image_in_thema_callback for line in f.readlines(): File "/usr/lib/python3.6/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa7 in position 3480: invalid start byte
As noted above, it's a path issue that can occur when installing from a .deb package.
Here's a workaround:
- Install from source
 - Navigate to project main directory
 - run 
sudo python3 ./multibootusb 
I was able to to get this to work on a system with some heavily modified $PATH and $PYTHONPATH variables. As such, running sudo python3 ./multibootusb did not work.
Here's what I did on Ubuntu 18.04:
- Download the 
.debpackage from http://multibootusb.org/page_download/ - Install with: 
sudo apt install ./python3-multibootusb_9.2.0-1_all.deb - Navigate to 
/usr/share/multibootusb/data/tools - Download the 
gptmbr.binfile withsudo wget https://github.com/mbusb/multibootusb/blob/master/data/tools/gptmbr.bin(Though, this appears to be the same file that is contained in/usr/lib/SYSLINUX/gptmbr.binbased off MD5) - Re-run 
multibootusb-pkexec- It failed previously on thegptmbr.binbut now succeeds. 
On Ubuntu 16.04 and invoking with sudo on command line, to see what is going on. Hangs with the following:
Using pyudev for detecting USB drives...
	/dev/sdc
	/dev/sdc1
Selected device /dev/sdc
Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
This looks like it has been a problem for a while. Is anyone still maintaining the project?
I was able to to get this to work on a system with some heavily modified
$PATHand$PYTHONPATHvariables. As such, runningsudo python3 ./multibootusbdid not work.Here's what I did on Ubuntu 18.04:
- Download the
 .debpackage from http://multibootusb.org/page_download/- Install with:
 sudo apt install ./python3-multibootusb_9.2.0-1_all.deb- Navigate to
 /usr/share/multibootusb/data/tools- Download the
 gptmbr.binfile withsudo wget https://github.com/mbusb/multibootusb/blob/master/data/tools/gptmbr.bin(Though, this appears to be the same file that is contained in/usr/lib/SYSLINUX/gptmbr.binbased off MD5)- Re-run
 multibootusb-pkexec- It failed previously on thegptmbr.binbut now succeeds.
Was that related to a permissions issue?
Can confirm this fixed the issue for me as well. Using version 9.2.0 on Ubuntu 18.04
... and why the file is not included in actual deb-package?
Best Regards :)