Error creating disk image when there is an apostrophe character (') in the project directory path.

Bug #1930934 reported by Adam Salt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cubic
Fix Released
Medium
Cubic PPA

Bug Description

Cubic is unable to "generate the customized disk image". At the moment I am using Cubic to create my Linux distro on Kubuntu 21.04. I had never had an issue with Cubic before. I have been able to replicate the results both on my main customised disk image, which had a lot of commands, and a standard Ubuntu ISO where I only installed one package via apt (apt install gnome-software)

Please get back to me as soon as possible,
Many thanks
Adam Salt.

Adam Salt (whyadamsalt)
tags: added: critical major
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Adam,

Run Cubic from the command line and cut and paste the output here when you encounter the error.

Changed in cubic:
status: New → Incomplete
Revision history for this message
Adam Salt (whyadamsalt) wrote :

I will have to do this after this weekend as I am away from my computer, I hope that you will be patient with me!

Many thanks,
Adam.

Revision history for this message
Adam Salt (whyadamsalt) wrote (last edit ):
Download full text (13.9 KiB)

Apologies for the delay. I ran it on my standard Ubuntu ISO with gnome-software installed as a test package:

  Create disk image
  • The progress tracker................... Started
  • The progress tracker id is............. 140477462828608
  • Completed.............................. 0%
  • The process started at................. 12:03:34.384570
  • Execute asynchronously................. xorriso -as mkisofs -r -J -joliet-
                                            long -l -iso-level 3 -V 'test'
                                            -isohybrid-mbr --interval:local_fs:0
                                            s-15s:zero_mbrpt,zero_gpt,zero_apm:'
                                            /media/adam/files/Adam's
                                            Files/1-Coding/Cobweb/CelOS/CelOS
                                            Project/Bob/partition-1.img'
                                            -partition_cyl_align on
                                            -partition_offset 0
                                            -partition_hd_cyl 172
                                            -partition_sec_hd 32 --mbr-force-
                                            bootable -apm-block-size 2048
                                            -iso_mbr_part_type 0x00 -c
                                            '/isolinux/boot.cat' -b
                                            '/isolinux/isolinux.bin' -no-emul-
                                            boot -boot-load-size 4 -boot-info-
                                            table -eltorito-alt-boot -e
                                            '/boot/grub/efi.img' -no-emul-boot
                                            -boot-load-size 8000 -isohybrid-gpt-
                                            basdat -isohybrid-apm-hfsplus -o
                                            "/media/adam/files/Adam's
                                            Files/1-Coding/Cobweb/CelOS/CelOS
                                            Project/Bob/test.iso" .
  • The process id is...................... 4839
  • Stop the progress tracker with id...... 140477462828608
  • Error.................................. An exception occurred.
  • The process stopped at................. 12:03:34.504820
  • The exit status, signal status is...... 5, None
  • The exception is....................... End Of File (EOF). Exception style
                                            platform. <pexpect.pty_spawn.spawn
                                            object at 0x7fc377253250> command:
                                            /usr/bin/xorriso args:
                                            [b'/usr/bin/xorriso', b'-as',
                                            b'mkis...

Revision history for this message
Adam Salt (whyadamsalt) wrote :

I would love it if you could get back to me on this as I have no clue as to why it's not working with a hardly modified Ubuntu ISO, yet alone my distro.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

I did not experience this issue.

Here is the test I preformed...

1. Installed kubuntu-21.04-desktop-amd64.iso in VirtualBox using a VDI of size 32 GB
2. Launched the Kubuntu 21.04 in VirtualBox
3. Installed Cubic:
    $ sudo apt-add-repository ppa:cubic-wizard/release
    $ sudo apt install --no-install-recommends cubic
4. Launched Cubic
5. Created a Cubic project directory named "Ubuntu" in the user's home directory
6. Installed the tree package as a test
7. Clicked through and generated a customized ISO named "kubuntu-21.04.0-2021.06.07-desktop-amd64.iso"
8. There were no errors

9. Copied the generated ISO to the host machine using sftp
10. Exited Kubuntu running in VirtualBox

11. Launched a new instance of VirtualBox, booting into the Live Environment for "kubuntu-21.04.0-2021.06.07-desktop-amd64.iso"

12. Confirmed that the custom ISO booted and the (newly installed) `tree` command works.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

I repeated the above test.
After installing Cubic (as in step 3 above), I executed `apt install gnome-software` to simulate your host environment.
Then I proceeded with step 4 above (launching Cubic and customizing the ISO).
The customized ISO generated successfully, and I was able to boot into it.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

I suggest you replicate my test above and see what happens...

Install VirtualBox on your host computer.
Make sure you allocate a least 30 GB of disk space for the virtual machine.
Install Kubuntu 21.04 into a new virtual machine in VirtualBox.
Then launch the virtual machine with Kubuntu 21.04.
In the virtual machine, install Cubic.
Then customize an ISO using Cubic and see if you get an error.

Revision history for this message
Adam Salt (whyadamsalt) wrote :

Originally I edited a normal Ubuntu 20.04 ISO for both of my tests, i'm unsure about whether this will affect any of your tests or not. I will attempt to reinstall cubic and attempt to see whether it will work on both my ISO, my test and a 21.04 test.

Revision history for this message
Adam Salt (whyadamsalt) wrote :

It doesn't work on a normal Kubuntu 21.04 ISO as well.

Revision history for this message
Adam Salt (whyadamsalt) wrote :

Would it be affected by the fact I am using ZSH with Oh-my-ZSH as my shell? I'd assume not but it might be worth noting?

Revision history for this message
Adam Salt (whyadamsalt) wrote :

Same issue on normal Ubuntu 21.04 install as I reinstalled everything. My shell is still zsh though so maybe look into that

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

It could be ZSH.

Have you tried a test where you create a virtual machine and install the official unmodified K/Ubuntu 21.04 (without zsh)?

Also, try reinstalling Cubic:

    sudo apt install --reinstall --no-install-recommends cubic

The output log you had attached made me think some package or library was missing from your system, but it's not easy to tell what that could be.

Reinstalling may help only if the dependency explicitly required by Cubic is somehow missing on your system. However, if there are some base packages included in default Ubuntu that are missing, reinstalling Cubic won't help.

The issues could also be ZSH, as you suggested. When I get a chance, I'll try to install ZSH in a test virtual environment to see if I get the same issue.

By the way, do you remember what the % complete is for the Generate step when Cubic gives you the error?

Revision history for this message
Cubic PPA (cubic-wizard) wrote :
Download full text (3.3 KiB)

Just installed zsh, then installed Cubic, and tested...

    $ sudo apt install zsh
    $ chsh -s `which zsh`
    $ sudo reboot

No issues encountered...

Create disk image
• The progress tracker................... Started
• The progress tracker id is............. 140379615528512
• The process started at................. 17:42:12.090574
• Execute asynchronously................. xorriso -as mkisofs -r -J -joliet-
                                        long -l -iso-level 3 -V 'Kubuntu
                                        21.04.0 2021.06.08 amd64'
                                        --grub2-mbr --interval:local_fs:0s-1
                                        5s:zero_mbrpt,zero_gpt:'/home/tstusr
                                        /Ubuntu/partition-1.img'
                                        --protective-msdos-label
                                        -partition_cyl_align off
                                        -partition_offset 16 --mbr-force-
                                        bootable -append_partition 2
• Completed.............................. 0%
                                        28732ac11ff8d211ba4b00a0c93ec93b --i
                                        nterval:local_fs:0d-10039d::'/home/t
                                        stusr/Ubuntu/partition-2.img'
                                        -appended_part_as_gpt
                                        -iso_mbr_part_type
                                        a2a0d0ebe5b9334487c068b6b72699c7 -c
                                        '/boot.catalog' -b
                                        '/boot/grub/i386-pc/eltorito.img'
                                        -no-emul-boot -boot-load-size 4
                                        -boot-info-table --grub2-boot-info
                                        -eltorito-alt-boot -e '--
                                        interval:appended_partition_2:all::'
                                        -no-emul-boot -boot-load-size 10040
                                        -isohybrid-gpt-basdat -o "/home/tst
                                        usr/Ubuntu/kubuntu-21.04.0-2021.06.0
                                        8-desktop-amd64.iso" .
• The process id is...................... 9235
• Completed.............................. 10%
• Completed.............................. 20%
• Completed.............................. 30%
• Completed.............................. 40%
• Completed.............................. 50%
• Completed.............................. 60%
• Completed.............................. 70%
• Completed.............................. 80%
• Adjust the final percent............... from 97.09% to 100.00%
• Completed.............................. 90%
• Completed.............................. 100%
• The progress tracker................... Stopped
• The process finished at................ 17:42:48.258216
• The exit status, signal status is...... 0, None
• The message is......................... done ISO image produced: 1796409
                                        sectors Written to medium : 1796409
                                        sectors at LBA 0 Writing to 'stdio:/
            ...

Read more...

Revision history for this message
Adam Salt (whyadamsalt) wrote :

odd, I'll give it a try now. Dependancies shouldn't be an issue, i've installed cubic hundreds of times without fail.

Do you perhaps have a discord so we can communicate easier and sort this out more effectively?

Revision history for this message
Adam Salt (whyadamsalt) wrote :

using bash and it still won't work :(

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

I was able to reproduce this error.

The generating ISO step is unable to parse the project path because of the apostrophe character (') in the directory name.

FAILURE : Cannot determine attributes of source file '/media/adam/files/Adam'"'"'s Files/1-Coding/Cobweb/CelOS/CelOS Project/Bob/custom-disk/Files/1-Coding/Cobweb/CelOS/CelOS' : No such file or directory xorriso : aborting: -abort_on 'FAILURE' encountered 'FAILURE'

WORKAROUND
----------

Option 1: You can create a new project ~without~ an apostrophe in the Cubic project directory's path.

Option 2: If you do not want to do this, you should be able to rename your Cubic project directory path to something without an apostrophe character ('). Also edit your project's cubic.conf file and replace the old directory name with the new name.

NEXT STEPS
----------
I will see if this bug can be fixed.

Cubic is very flexible with directory or path names, but this one may be particularly challenging.

If I am not able to fix this, I will need to add a check on the start page to warn the user that the path can not contain an apostrophe character, and not allow the user to proceed.

Changed in cubic:
status: Incomplete → Confirmed
importance: Undecided → Medium
assignee: nobody → Cubic PPA (cubic-wizard)
Revision history for this message
Adam Salt (whyadamsalt) wrote :

Thank you so much for the response! This has been very helpful and I'll resume working on my Distro asap!

Cubic PPA (cubic-wizard)
summary: - Error creating disk image.
+ Error creating disk image when there is an apostrophe character (') in
+ the project directory path.
Revision history for this message
Adam Salt (whyadamsalt) wrote :

I can confirm that after changing my directory name it does work!

Cubic PPA (cubic-wizard)
Changed in cubic:
status: Confirmed → In Progress
status: In Progress → Fix Committed
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Fix released in version 2021.06-52-release

Changed in cubic:
status: Fix Committed → Fix Released
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.