Cubic hangs on creating customized disk image from ubuntu 18.04 ISO

Asked by Alex Vim

Hello, I'm experimenting with Cubic using ubuntu 18.04 host system and trying to modify standard ubuntu 18.04 ISO.

On the last step cubic hangs when executing "Generate the customized disk image step". No error message is present.
Any clues what's wrong? Any log file to look at?

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Vim
Solved:
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

This should be working without issue.

Would you please run Cubic from the command line?
(Just open a terminal window, type "cubic", and press <Enter>).

(To save time, you don't have to do your full customization inside the chroot environment).

After you experience the "hang" cut and paste the log output here.

Revision history for this message
Alex Vim (alex-vim) said :
#2

Its looks to be FileNotFound error for the output file. It is true that output file doesn't exist yet, because it is the first time I tried to create it.

Here is list of my working folder if needed:
~/disk1$ ls -ao
total 22
drwxrwxrwx 5 root 4096 ก.ค. 27 14:49 .
drwxr-xr-x 18 test 4096 ก.ค. 27 14:48 ..
-rw-r--r-- 1 test 819 ก.ค. 27 14:50 cubic.conf
dr-xr-xr-x 12 root 4096 ก.ค. 25 00:02 custom-live-iso
dr-xr-xr-x 1 root 2048 เม.ย. 27 01:43 original-iso-mount
drwxr-xr-x 22 root 4096 เม.ย. 27 01:30 squashfs-root

Here is log from the console:

Performing requested transition action
    Transition from........................ custom_iso_image_directory_filechoos
                                            er
    Transition to.......................... existing_project_page
    Finished running thread with id........ 139853718767360
    The custom ISO image filename is....... ubuntu--desktop-amd64.iso
    The custom ISO image filepath is....... /home/test/disk1/ubuntu--desktop-
                                            amd64.iso
    The custom ISO image md5 filename is... ubuntu--desktop-amd64.md5
    The custom ISO image md5 filepath is... /home/test/disk1/ubuntu--desktop-
                                            amd64.md5
    Is existing project page, custom
    section, valid?........................ True
    The custom ISO image filename is....... ubuntu-desktop-amd64.iso
    The custom ISO image filepath is....... /home/test/disk1/ubuntu-desktop-
                                            amd64.iso
    The custom ISO image md5 filename is... ubuntu-desktop-amd64.md5
    The custom ISO image md5 filepath is... /home/test/disk1/ubuntu-desktop-
                                            amd64.md5
    Is existing project page, custom
    section, valid?........................ True
    The custom ISO image disk name is...... Ubuntu 18.04 LTS "Bionic Beaver" -
                                            Release amd64
    Is existing project page, custom
    section, valid?........................ True
    The custom ISO image volume id is...... Ubuntu 18.04 LTS amd64
    Is existing project page, custom
    section, valid?........................ True
    The custom ISO image disk name is...... Ubuntu 18.04 LTS amd64 "Bionic
                                            Beaver"
    Is existing project page, custom
    section, valid?........................ True
    Button clicked......................... Next

Created new thread
    Current page........................... existing_project_page
    New page............................... manage_options_page
    Running thread with id................. 139853718767360
    Interrupting previous thread with id... No previous thread to interrupt

Performing requested transition action
    Transition from........................ existing_project_page
    Transition to.......................... manage_options_page
    The original ISO image file path is.... /home/test/Downloads/ubuntu-18.04-de
                                            sktop-amd64.iso
    The original ISO image file path in
    the configuration is................... /home/test/Downloads/ubuntu-18.04-de
                                            sktop-amd64.iso
    Save configuration..................... None
  Create vmlinuz version details list
    Get vmlinuz versions from directory.... /home/test/disk1/squashfs-root/boot
    Get vmlinuz versions from directory.... /home/test/disk1/original-iso-
                                            mount/casper
    Get vmlinuz version from file type..... /home/test/disk1/original-iso-
                                            mount/casper/vmlinuz
    Execute synchronously.................. file "/home/test/disk1/original-iso-
                                            mount/casper/vmlinuz"
    Found version.......................... 4.15.0-20
    Version name........................... 4.15.0-20
    • Vmlinuz filename..................... vmlinuz
    • Initrd filename...................... initrd.lz
    • Directory............................ /home/test/disk1/original-iso-
                                            mount/casper
    • Note................................. This is kernel 4.15.0-20, used to
                                            boot the original ISO image
                                            (ubuntu-18.04-desktop-amd64.iso).
    The default vmlinuz version is......... vmlinuz
  Create list of installed packages
    Execute synchronously.................. chroot "/home/test/disk1/squashfs-
                                            root" dpkg-query --show
    Set a new process for thread id........ 139853718767360
    The new process id is.................. 2216
    Total number of installed packages..... 1785
  Create new filesystem manifest file
    Write filesystem manifest to........... /home/test/disk1/custom-live-
                                            iso/casper/filesystem.manifest
    filesystem.manifest-remove found in.... /home/test/disk1/custom-live-
                                            iso/casper
    Show tab for........................... filesystem.manifest-remove
    Read list of packages to remove from... /home/test/disk1/custom-live-
                                            iso/casper/filesystem.manifest-
                                            remove
  Create package details list
    Total number of installed packages..... 1785
    Number of packages to be removed....... 230
    Number of packages to be retained...... 1555
    filesystem.manifest-minimal-remove
    found in............................... /home/test/disk1/custom-live-
                                            iso/casper
    Show tab for........................... filesystem.manifest-minimal-remove
    Read list of packages to remove from... /home/test/disk1/custom-live-
                                            iso/casper/filesystem.manifest-
                                            minimal-remove
  Create package details list
    Total number of installed packages..... 1785
    Number of packages to be removed....... 164
    Number of packages to be retained...... 1621
    Hiding old page........................ existing_project_page
    Showing new page....................... manage_options_page
    The current page name is............... manage_options_page
    Finished running thread with id........ 139853718767360
    Button clicked......................... Next

Created new thread
    Current page........................... manage_options_page
    New page............................... repackage_iso_page
    Running thread with id................. 139853434283776
    Interrupting previous thread with id... No previous thread to interrupt

Performing requested transition action
    Transition from........................ manage_options_page
    Transition to.......................... repackage_iso_page
    filesystem.manifest-remove found in.... /home/test/disk1/custom-live-
                                            iso/casper
  Get removable packages list from user selections
    Get user selections from............... manage_options_page__typical_manifes
                                            t_tab__liststore
    New number of packages to be removed... 230
  Create new filesystem manifest remove file
    Write filesystem manifest remove
    file to................................ /home/test/disk1/custom-live-
                                            iso/casper/filesystem.manifest-
                                            remove
    filesystem.manifest-minimal-remove
    found in............................... /home/test/disk1/custom-live-
                                            iso/casper
  Get removable packages list from user selections
    Get user selections from............... manage_options_page__minimal_manifes
                                            t_tab__liststore
    New number of packages to be removed... 164
  Create new filesystem manifest remove file
    Write filesystem manifest remove
    file to................................ /home/test/disk1/custom-live-
                                            iso/casper/filesystem.manifest-
                                            minimal-remove
    Hiding old page........................ manage_options_page
    Showing new page....................... repackage_iso_page
    The current page name is............... repackage_iso_page
  Update ISO boot files
    Delete existig files with pattern..... /home/test/disk1/custom-live-
                                            iso/casper/vmlinuz*
    Copy file.............................. Number 1 of 2
    The source file is..................... /home/test/disk1/original-iso-
                                            mount/casper/vmlinuz
    The target file is..................... /home/test/disk1/custom-live-
                                            iso/casper/vmlinuz
    Execute asynchronously................. rsync --archive --no-relative --no-
                                            implied-dirs --info=progress2
                                            "/home/test/disk1/original-iso-
                                            mount/casper/vmlinuz"
                                            "/home/test/disk1/custom-live-
                                            iso/casper/vmlinuz"
    Set a new process for thread id........ 139853434283776
    The new process id is.................. 2218
  Update boot cofigurations for vmlinuz
    Replace text in file................... /home/test/disk1/custom-live-
                                            iso/boot/grub/grub.cfg
    Search text............................ /casper/vmlinuz
    Replacement text....................... /casper/vmlinuz
    Replace text in file................... /home/test/disk1/custom-live-
                                            iso/boot/grub/loopback.cfg
    Search text............................ /casper/vmlinuz
    Replacement text....................... /casper/vmlinuz
    Replace text in file................... /home/test/disk1/custom-live-
                                            iso/isolinux/txt.cfg
    Search text............................ /casper/vmlinuz
    Replacement text....................... /casper/vmlinuz
    Delete existig files with pattern..... /home/test/disk1/custom-live-
                                            iso/casper/initrd*
    Execute synchronously.................. file "/home/test/disk1/original-iso-
                                            mount/casper/initrd.lz"
    Set a new process for thread id........ 139853434283776
    The new process id is.................. 2221
    The file type informaton is............ /home/test/disk1/original-iso-
                                            mount/casper/initrd.lz: LZMA
                                            compressed data, streamed
    The compression for initrd is.......... LZMA
    Copy file.............................. Number 2 of 2
    The source file is..................... /home/test/disk1/original-iso-
                                            mount/casper/initrd.lz
    The target file is..................... /home/test/disk1/custom-live-
                                            iso/casper/initrd.lz
    Execute asynchronously................. rsync --archive --no-relative --no-
                                            implied-dirs --info=progress2
                                            "/home/test/disk1/original-iso-
                                            mount/casper/initrd.lz"
                                            "/home/test/disk1/custom-live-
                                            iso/casper/initrd.lz"
    Set a new process for thread id........ 139853434283776
    The new process id is.................. 2222
  Update boot cofigurations for initrd
    Replace text in file................... /home/test/disk1/custom-live-
                                            iso/boot/grub/grub.cfg
    Search text............................ /casper/initrd.lz
    Replacement text....................... /casper/initrd.lz
    Replace text in file................... /home/test/disk1/custom-live-
                                            iso/boot/grub/loopback.cfg
    Search text............................ /casper/initrd.lz
    Replacement text....................... /casper/initrd.lz
    Replace text in file................... /home/test/disk1/custom-live-
                                            iso/isolinux/txt.cfg
    Search text............................ /casper/initrd.lz
    Replacement text....................... /casper/initrd.lz
  Create squashfs
    The source path is..................... /home/test/disk1/squashfs-root
    The target path is..................... /home/test/disk1/custom-live-
                                            iso/casper/filesystem.squashfs
    Execute asynchronously................. mksquashfs
                                            "/home/test/disk1/squashfs-root"
                                            "/home/test/disk1/custom-live-
                                            iso/casper/filesystem.squashfs"
                                            -noappend -comp xz
    Set a new process for thread id........ 139853434283776
    The new process id is.................. 2225
  Update filesystem size
    Execute synchronously.................. du --summarize --one-file-system
                                            --block-size=1
                                            "/home/test/disk1/squashfs-root"
    Set a new process for thread id........ 139853434283776
    The new process id is.................. 2267
    Write filesystem size to............... /home/test/disk1/custom-live-
                                            iso/casper/filesystem.size
    The file system size is................ 4.33 GiB (4644024320 bytes)
  Update disk name
    Write disk name to..................... /home/test/disk1/custom-live-
                                            iso/README.diskdefines
    Replace text in file................... /home/test/disk1/custom-live-
                                            iso/README.diskdefines
    Search text............................ ^#define DISKNAME.*
    Replacement text....................... #define DISKNAME Ubuntu 18.04 LTS
                                            amd64 "Bionic Beaver"
  Update disk information
    Write custom ISO image disk name....... Ubuntu 18.04 LTS amd64 "Bionic
                                            Beaver"
    Write to............................... /home/test/disk1/custom-live-
                                            iso/.disk/info
    Updated the disk name.................. Ubuntu 18.04 LTS amd64 "Bionic
                                            Beaver"
  Update md5 sums
    Write md5sums to....................... /home/test/disk1/custom-live-
                                            iso/md5sum.txt
    Execute synchronously.................. wc --lines "/home/test/disk1/custom-
                                            live-iso/md5sum.txt"
    Set a new process for thread id........ 139853434283776
    The new process id is.................. 2268
    Number of checksums calculated and
    added to md5sum.txt.................... 334
  Calculate directory size
    The directory is....................... /home/test/disk1/custom-live-iso
    The total size of all files on the
    disk is................................ 1.58 GiB (1700505019 bytes)
    The maximum size limit for all files
    on the disk is......................... 4.00 GiB (4294967296 bytes)
  Create ISO image
    Use xorriso with isohybrid MBR......... /usr/lib/ISOLINUX/isohdpfx.bin
    Execute asynchronously................. xorriso -as mkisofs -r -V "Ubuntu
                                            18.04 LTS amd64" -cache-inodes -J -l
                                            -isohybrid-mbr
                                            /usr/lib/ISOLINUX/isohdpfx.bin -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
                                            -isohybrid-gpt-basdat -o
                                            "/home/test/disk1/ubuntu-desktop-
                                            amd64.iso" .
    Set a new process for thread id........ 139853434283776
    The new process id is.................. 2269
    Exception encountered in thread........ 139853434283776
    Ignore exception?...................... No
    The tracekback is...................... Traceback (most recent call last):
                                            File
                                            "/usr/share/cubic/transition.py",
                                            line 95, in run self.action()
                                            File
                                            "/usr/share/cubic/transition.py",
                                            line 438, in action self) File
                                            "/usr/share/cubic/transitions.py",
                                            line 2973, in transition__from__mana
                                            ge_options_page__to__repackage_iso_p
                                            age
                                            utilities.create_iso_image(thread)
                                            File
                                            "/usr/share/cubic/utilities.py",
                                            line 3008, in create_iso_image
                                            os.chown(custom_iso_image_filepath,
                                            model.user_id, model.group_id)
                                            FileNotFoundError: [Errno 2] No such
                                            file or directory:
                                            '/home/test/disk1/ubuntu-desktop-
                                            amd64.iso'
    Finished running thread with id........ 139853434283776

Revision history for this message
Cubic PPA (cubic-wizard) said :
#3

Alex,

The file "ubuntu-desktop-amd64.iso" should exist by the time you are seeing the FileNotFound error.

I could not recreate this issue on my end, so we will need to do a little more debugging on your machine.

It is likely the the command just before this error does not succeed.
See item [3] below to find out what the error could be.

---[1]---

Please let me know what is the output of:

    $ sudo dpkg-query --showformat="\${Version}\n" --show cubic

---[2]---

Is "/home/test/disk1" a remote or mounted file system?

Is "/home/test/Downloads" a remote or mounted file system?

---[3]---

Please launch cubic from the command line, as before.
(Work with your existing project in "/home/test/disk1/", if it is still available).
Navigate through the Cubic pages by clicking Next, until you get to the page where you can select the ISO Kernel.

At this point, do *not* click Next, and do *not* close or exit Cubic.
Then, open a new terminal window on your ~host~ machine.

Inside the new terminal window, execute the following:

$ sudo xorriso -as mkisofs -r -V "Ubuntu 18.04 LTS amd64" -cache-inodes -J -l -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -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 -isohybrid-gpt-basdat -o "/home/test/disk1/ubuntu-desktop-amd64.iso" .

(Be sure to copy the space followed a "." at the end of the above command, when you cut-and paste).

Please share the output of this command. (There may be an error).

Revision history for this message
Alex Vim (alex-vim) said :
#4

Thanks for your help.

1) sudo dpkg-query --showformat="\${Version}\n" --show cubic
[sudo] password for test:
2018.07-37-release~201807140832~ubuntu18.04.1

2) No, these folders are not mounted or remote.

3) sudo xorriso -as mkisofs -r -V "Ubuntu 18.04 LTS amd64" -cache-inodes -J -l -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -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 -isohybrid-gpt-basdat -o "/home/test/disk1/ubuntu-desktop-amd64.iso" .
xorriso 1.4.8 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:/home/test/disk1/ubuntu-desktop-amd64.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 1297m free
xorriso : WARNING : -volid text problematic as automatic mount point name
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
xorriso : NOTE : -as mkisofs: Ignored option '-cache-inodes'
xorriso : UPDATE : 10900 files added in 1 seconds
xorriso : UPDATE : 22800 files added in 2 seconds
xorriso : UPDATE : 35100 files added in 3 seconds
xorriso : UPDATE : 45100 files added in 4 seconds
xorriso : UPDATE : 56200 files added in 5 seconds
xorriso : UPDATE : 71100 files added in 6 seconds
xorriso : UPDATE : 81300 files added in 7 seconds
xorriso : UPDATE : 93800 files added in 8 seconds
xorriso : UPDATE : 106400 files added in 9 seconds
xorriso : UPDATE : 123200 files added in 10 seconds
xorriso : UPDATE : 138600 files added in 11 seconds
xorriso : UPDATE : 155800 files added in 12 seconds
Added to ISO image: directory '/'='/home/test'
xorriso : UPDATE : 158977 files added in 12 seconds
xorriso : FAILURE : Cannot find in ISO image: -boot_image ... bin_path='/isolinux/isolinux.bin'
xorriso : UPDATE : 158977 files added in 13 seconds
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'

Revision history for this message
Cubic PPA (cubic-wizard) said :
#5

Alex,

If you get a chance, would you execute the following, and let me know the results?

(Basically, it's the same command as step 3 above, but I want you to cd into the ~/test/custom-live-iso directory, first).

$ cd /home/test/custom-live-iso

$ sudo xorriso -as mkisofs -r -V "Ubuntu 18.04 LTS amd64" -cache-inodes -J -l -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -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 -isohybrid-gpt-basdat -o "/home/test/disk1/ubuntu-desktop-amd64.iso" .

Revision history for this message
Cubic PPA (cubic-wizard) said :
#6

Alex,

CORRECTION FOR COMMENT #5:

If you get a chance, would you execute the following, and let me know the results?

(Basically, it's the same command as step 3 above, but I want you to cd into the ~/test/disk1/custom-live-iso directory, first).

$ cd /home/test/disk1/custom-live-iso

$ sudo xorriso -as mkisofs -r -V "Ubuntu 18.04 LTS amd64" -cache-inodes -J -l -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -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 -isohybrid-gpt-basdat -o "/home/test/disk1/ubuntu-desktop-amd64.iso" .

Revision history for this message
Alex Vim (alex-vim) said :
#7

Well, this is totally my fault - I'm using VBOX and assigned to little disk space to it.

xorriso fails with no disk space available.

Thanks for your time.