multibootusb
multibootusb copied to clipboard
Cannot launch. ('config' is not defined)
When attempting to launch the program graphically nothing happens. Attempting to launch from the command line gives the following error message:
Using python version 3.6.5 (default, Mar 31 2018, 19:45:04) [GCC] on platform Linux-4.12.14-lp151.28.13-default-x86_64-with-glibc2.3.4
Traceback (most recent call last):
File "/usr/local/bin/multibootusb", line 188, in
When you include the '-d' debug tag I recieve this message:
Using python version 3.6.5 (default, Mar 31 2018, 19:45:04) [GCC] on platform Linux-4.12.14-lp151.28.13-default-x86_64-with-glibc2.3.4
Traceback (most recent call last):
File "/usr/local/bin/multibootusb", line 171, in
I have uninstalled and re-installed to no avail. (openSUsE 15.1)
I am on Xubuntu 18.04.3 LTS, python 3.6.9 (Anaconda). I get the same error, on line 187:
/usr/bin/multibootusb
Using python version 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31)
[GCC 7.3.0] on platform Linux-4.15.0-58-generic-x86_64-with-debian-buster-sid
Traceback (most recent call last):
File "/usr/bin/multibootusb", line 187, in
Same OS: Arch Linux/Manjaro Package manager: pacman
[user@pc ~]$ multibootusb
Using python version 3.7.4 (default, Jul 16 2019, 07:12:58)
[GCC 9.1.0] on platform Linux-5.2.8-1-MANJARO-x86_64-with-arch-Manjaro-Linux
Traceback (most recent call last):
File "/usr/bin/multibootusb", line 187, in <module>
if config.debug is True:
NameError: name 'config' is not defined
As a workaround I used command line instead of GUI
Suddenly it works? I'm guessing there was a python update that fixed this for me as I didn't change anything.
It suddenly resumed worki g also here after an update.
I also encountered this error message today, and I traced it back to a bug in the logging. The reason the bug occurred is that I ran multibootusb without sudo. This created the logfile /tmp/multibootusb.log owned by my normal user. When I afterwards ran multibootusb as root, it was unable to open this logging file, causing an exception. This results in config not being imported.
Apparently root is not permitted to change (except for deleting/moving and other whole file actions) files owned by other users in /tmp on my system. ^Shrug^. Probably a security measure, but I can't find it documented anywhere.
I'm running up to date Arch Linux with standard systemd tmpfs /tmp
Possible fixes: -Put in proper exception handling for unwriteable logfile (probably a good idea anyways). -Ensure logfile always has same owner (i.e. root). -Place logfile somewhere else. -Just write the log to stderr, a logfile in /tmp isn't really that useful anyways
Originally posted by @chlorophyll-zz in https://github.com/mbusb/multibootusb/issues/431#issuecomment-562114758
please do a
git reset --hardin the folder. then try with one or two iso files first, see if the error remains.
It does seem to remain.
you can help the maintainer with the exact number of iso files at which the error appears. from my point, it looks like you are trying to write too many iso files at once.
This software has never worked for me properly even one time. I don't think the number of ISOs is the issue. I originally was trying with two or three things and then thought of more ISOs that would be nice. and figured I might as well expand my command.
also, for thread hygiene, you maybe want to open a new issue for your specific problem with writing 8 iso files at once, or have a search for another issue that resembles the same error.
I strongly feel it has nothing to do with the number of ISOs, but perhaps this issue (#468) would be better. I think #455 is likely a duplicate of this problem as well. edit: Also #253 seems to be the same error. There are probably a lot of issues about this that could be merged.
brad@anpan:~/Downloads/multibootusb/ > git reset --hard
HEAD is now at 1db76c2 Sync Disk before Unmounting
brad@anpan:~/Downloads/multibootusb/ > sync
brad@anpan:~/Downloads/multibootusb/ > sudo python3 /home/brad/Downloads/multibootusb/multibootusb -c -i /home/brad/Downloads/nixos-graphical-19.09.1320.4ad6f1404a8-x86_64-linux.iso -t /dev/sdc1
Using python version 3.7.5 (default, Oct 14 2019, 23:08:55)
[GCC 8.3.0] on platform Linux-4.19.86-x86_64-with-glibc2.2.5
Traceback (most recent call last):
File "/home/brad/Downloads/multibootusb/multibootusb", line 161, in <module>
config.image_path = arg
NameError: name 'config' is not defined
@soundtoxin Thank you for linking this issue. Can you give a log with --debug parameter, and have you installed the dependencies? edit: nvm, the debug is always turned on
You see the dependencies for Debian here: http://multibootusb.org/page_faq/#your-package-for-my-favourite-distro-never-worked-for-me-what-can-i-do-now
for Arch Linux, these are the dependencies: python-pyqt5 p7zip parted util-linux python-pyudev mtools python-dbus python-six
What Linux distribution are you using?
Did some asking around. The issue with the logfile in /tmp is relevant for everyone running systemd 241 or newer, or otherwise activating fs.protected_parameter. Having this file in /tmp is bad form to begin with, but will because of this cause the DoS I experienced.
I can probably implement a fix if you want, but I need to know if we want to move the logfile or just print relevant info to stderr/stdout with a verbose flag or similar (i.e remove logfile).
@chlorophyll-zz
have you installed the dependencies?
Not directly, but I have the multibootusb package installed, which I imagine grabs the same dependencies the source version needs
What Linux distribution are you using?
I'm using NixOS
From looking at the dependency list for Debian, I think this is probably the equivalent list on NixOS:
python38Packages.pyqt5
p7zip
parted
utillinux
python38Packages.pyudev
mtools
python38Packages.dbus-python
python38Packages.six
There is also just the multibootusb package, but it didn't work, which is what started this whole process.
I can try to install the dependencies, and I can remove multibootusb that I got from the repo if anyone thinks that matters. edit: I got the dependencies and commented out multibootusb in my package list, I still get the same error as before.
@Soundtoxin and could you install the multibootusb for NixOs now from your repo? The Issue under that you have posted intitially, the menus.zip issue, should be resolved for nixos and arch linux distributions in the last weeks.
could you install the multibootusb for NixOs now from your repo?
I had it installed before just a couple days ago, so I didn't think this would work, but it looks like I don't get any errors anymore.
brad@anpan:~/ > sudo multibootusb -c -i /home/brad/Downloads/nixos-graphical-19.09.1320.4ad6f1404a8-x86_64-linux.iso,/home/brad/Downloads/guix-system-install-1.0.1.x86_64-linux.iso,/home/brad/Downloads/void-live-x86_64-20181111-enlightenment.iso,/home/brad/Downloads/helium-5-amd64.hybrid.iso,/home/brad/Downloads/artix-lxqt-runit-20181008-x86_64.iso,/home/brad/Downloads/ubuntu-19.10-desktop-amd64.iso,/home/brad/Downloads/TinyCore-current.iso,/home/brad/Downloads/CorePlus-current.iso -t /dev/sdc1
Using python version 3.6.9 (default, Jul 2 2019, 20:43:20)
[GCC 8.3.0] on platform Linux-4.19.87-x86_64-with-glibc2.3.4
Running multibootusb version 9.2.0 from installed system...
Starting multibootusb from Command line...
25008
True
Device /dev/sdc1 is a MBR disk...
Cleaning old multibootusb directory...
Syslinux exist in multibootusb directory...
'nixos-graphical-19.09.1320.4ad6f1404a8-x86_64-linux' is already installed. Skipping installation.
'guix-system-install-1.0.1.x86_64-linux' is already installed. Skipping installation.
'void-live-x86_64-20181111-enlightenment' is already installed. Skipping installation.
'helium-5-amd64.hybrid' is already installed. Skipping installation.
'artix-lxqt-runit-20181008-x86_64' is already installed. Skipping installation.
'ubuntu-19.10-desktop-amd64' is already installed. Skipping installation.
'TinyCore-current' is already installed. Skipping installation.
'CorePlus-current' is already installed. Skipping installation.
Thanks for the help!
I am still having problems actually using the drive now, but I'll go to another issue with that.
@Soundtoxin and could you install the multibootusb for NixOs now from your repo? The Issue under that you have posted intitially, the menus.zip issue, should be resolved for nixos and arch linux distributions in the last weeks.
i tested it, and thats wrong information from me. the issue not finding menus.zip, is tangled to the github release version 9.2. arch aur and nixos build their packages from the 9.2 release version from here.
so, there are a few steps ahead; first would be the maintainer, releasing a fixed 9.2 release, the second would be the aur and nixpkg maintainers to include the fixed 9.2 release in the package building.
for the initial ('config' is not defined) error, it looks like the application wants a config.py file wich is builded and normally installed to python libraries. although with nixos, the python libraries - are (looking from the install script) read-only, the reason is the snapshot (configurations) architecture of nixos.
@mbusb we need a fixed 9.2 release if we want to fix the menus.zip error for nixos and aur packages. adding menus.zip to the 9.2 version would be fixing the menus.zip error which leads to boot entries not appearing. if your are interested, the error for the installation from python on nixos was: (only relevant to developing on nixos and installing the application from source)
sudo python3 install.py /nix/store/drr8qcgiccfc5by09r5zc30flgwh1mbx-python3-3.7.5/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'include_package_data' warnings.warn(msg) running install running build running build_py running build_scripts running install_lib creating /nix/store/drr8qcgiccfc5by09r5zc30flgwh1mbx-python3-3.7.5/lib/python3.7/site-packages/scripts error: could not create '/nix/store/drr8qcgiccfc5by09r5zc30flgwh1mbx-python3-3.7.5/lib/python3.7/site-packages/scripts': Read-only file system
This happened to me as I started it as user and after this using sudo. Problem is that there is a logfile /tmp/multibootusb.log which is not accessable. Remove it and retry.
Problem is that module mbusb_cli.py fails then and try accept block will hide the error.
You can unhide it by adding a further except statement: ` try: from scripts.mbusb_cli import * from scripts import admin from scripts import gen from scripts import config except PermissionError: raise
`