Is it possible to increase ISO size?

Asked by Ark74

While customizing the main iso file I have noticed that the default ISO storage is not affected, meaning that if it is heavily customized by installing packages then the live root storage filesystem is filled to a 100%.

Is it possible by some advance/hidden feature to increase the default ISO image size to a bigger one?
Let's say that by integrating several localizations the image could fill a 4 GB iso, but so far I'm seeing the live images being full 100% storage usage.

Thanks for the attention.

Question information

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

Ark74,

Cubic uses mkisofs to create the ISO_9660 file system. (See https://linux.die.net/man/8/mkisofs).

I believe that the 2^32-1 GiB (i.e. 4GiB) maximum size is a limitation of the ISO_9660 standard.
(See https://en.wikipedia.org/wiki/ISO_9660#The_2/4_GiB_file_size_limit).

Note that there seems to be a capability in ISO_9660 to support "multi-extent (fragmentation)" that could allow files larger than 4 GiB, but I have not looked into it, and I don't know if the generated ISO will be "burnable" to a USB stick or DVD. If you have some insight on how to get mkisofs create files larger than 4 GiB, I would be interested in hearing about it.

Finally, if you insist on testing Cubic with a higher ISO size limit check, you can execute the following to set the size limit to 8 GiB. This isn't a hidden feature; you are simply modifying the installed application. (Note, this will ONLY change the *check* Cubic does, so Cubic will not complain if your image size is larger than 4 GiB. However, the resulting ISO may be unusable, or mkisofs may just silently error out in the background, but you will not be presented with an error on the Cubic UI).

Nevertheless, if you test this, please let us know what your experience was?

# SET SIZE CHECK TO 8 GiB

    $ grep "maximum_iso_size_gib = " /usr/share/cubic/transitions.py
    $ sudo sed -i "s|maximum_iso_size_gib = 4.0|maximum_iso_size_gib = 8.0|g" /usr/share/cubic/transitions.py
    $ grep "maximum_iso_size_gib = " /usr/share/cubic/transitions.py

# REVERT SIZE CHECK TO 4 GiB
# NOTE: You can also simply reinstall Cubic to revert to the default size limit check

    $ grep "maximum_iso_size_gib = " /usr/share/cubic/transitions.py
    $ sudo sed -i "s|maximum_iso_size_gib = 8.0|maximum_iso_size_gib = 4.0|g" /usr/share/cubic/transitions.py
    $ grep "maximum_iso_size_gib = " /usr/share/cubic/transitions.py

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

Also, if your ISO is too large, make sure you are removing unnecessary files or cached files:

    - in the /tmp folder
    - execute "apt clean" to clear out the download deb packages
    - unnecessary files in /root

Revision history for this message
Ark74 (ark74) said :
#3

Thanks for answering,
Indeed more than 4 GB is not recommended, but my last image was 1.8GB and when launched it was 100% usage on every possible partition but /cow reported by df -h

#=====================================================
ubuntu@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 725M 0 725M 0% /dev
tmpfs 149M 1.3M 148M 1% /run
/dev/sr0 1.8G 1.8G 0 100% /cdrom
/dev/loop0 1.8G 1.8G 0 100% /rofs
/cow 745M 309M 436M 42% /
tmpfs 745M 0 745M 0% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 745M 0 745M 0% /sys/fs/cgroup
tmpfs 745M 0 745M 0% /tmp
tmpfs 149M 48K 149M 1% /run/user/999
/dev/loop1 82M 82M 0 100% /snap/core/4206
/dev/loop2 135M 135M 0 100% /snap/gnome-3-26-1604/53
/dev/loop3 1.7M 1.7M 0 100% /snap/gnome-calculator/75
/dev/loop4 13M 13M 0 100% /snap/gnome-characters/50
/dev/loop5 21M 21M 0 100% /snap/gnome-logs/23
/dev/loop6 3.4M 3.4M 0 100% /snap/gnome-system-monitor/31
#=====================================================

I'm trying to expand /cow in order to have space for customization, maybe it is something new from the LiveCD, since a couple of months ago I was able to customize up to 2GB (with no issue), do you know how can I accomplish this.

Cheers!

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

The above output is from??...

a) Cubic generated ISO running from disk on your local machine
b) Cubic generated ISO booted from a "burned" USB stick
c) Inside Cubic's chroot environmnt?
d) something else?

Revision history for this message
Ark74 (ark74) said :
#5

Is a Cubic generated ISO mounted on a VM.
The funny thing is that the Ubuntu 18.04 Desktop ISO looks quite the same.

I've been checking this for the last 9 hours and realized that the issue was not Cubic, sorry for all the fuzz about it.

If i'm not wrong, cubic would expand automatically the ISO size following the predetermined space that the original ISO dictates, unless is grows beyond 4660985856 bytes (~4.36GB).

Meaning that the ISO will expand let's say 3.4GB (from installed packages) but it always have 309M free once it has generated the ISO and is running live on a DVD/USB (using dd).

My true issue was that the packages that I was installing required,

mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts

before trying to install some specific packages or it will fallback to 309M instead of the (4.3 - 1.8* = ~ 2.5GB available)
* Default Ubuntu ISO size

I even changed to the development branch, but after several hours and testing the missing piece was mount proc et all.

Thanks for all attention.

If you are curious about the package in question it was: libreoffice 6.0.4 which depends on jre.

Thanks again

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

The maximum ISO size is now 8TB.

Cubic will no longer display an error if the generated ISO size exceeds 4GB, as long as the size is less than 8TB.

It is not clear if this change results in compatibility issues.

Fixed in Development version 2019-03-190.
Fixed in Release version 2019-03-49.

To get this change, simply upgrade to the latest release:
    $ sudo apt-add-repository ppa:cubic-wizard/release
    $ sudo apt update
    $ sudo apt install cubic