ubi-xxx failed with exid code1

Bug #1840232 reported by AdlerHorst
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cubic
Invalid
Undecided
Unassigned

Bug Description

CUBIC: 2019.07-58-release~201907290101~ubuntu18.04.1 all [installiert]
ISO: ubuntu-18.04.2-desktop-amd64 und ubuntu-18.04.3-desktop-amd64

Seems CUBIC do not like me.

After I was able to resolve all previous issue I got the next one.

I created a new Cubic project from scratch.
First try:
 I copied files into /opt and /etc/skel and generated the image.
-> Error on installation manager: see ubi-timezone.png

Second try:
 I apt upgrade all application in CUBIC console and generated the image then.
-> Error on Installation manager: see ubi-console-setup.png

Third try:
 I downloaded Ubuntu 18.04.3 and replaced the Ubuntu 18.04.2 ISO and generated the image then.
-> Error on Installation manager: see ubi-partman.png

Revision history for this message
AdlerHorst (adlerhorst) wrote :
Revision history for this message
AdlerHorst (adlerhorst) wrote :
Revision history for this message
AdlerHorst (adlerhorst) wrote :
AdlerHorst (adlerhorst)
description: updated
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Are you able to access /var/log/syslog? That may provide more useful information about the error.

Regarding the time zone settings, did you set this up in the preseed files, or did you simply select the time zone during installation? (Of course, either approach should work).

Could you be missing language packages that you may need for your time zone? (/var/log/syslog may help with this).

Do you know if your computer is connected to the Internet during installation? (I recall there was an old issue with the Ubiquity installer during offline installations).

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

My Testsystem is a Virtual Box with deactivated EFI Option. I didn't changed any Option in the Virtual Box settings.

I upload you the virtualbox logfiles and my install script which i use to setup the Installation disk.

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

Thanks. I'll look through the attached log.

Also, I'd like to recreate your scenario on my end...

Would it be possible to attach some screenshots of how you've setup the virtual machine (specifically the "System" and "Network" settings)?

Also, could you please include a screen shot of the Ubiquity Installer's disk setup step inside virtual box. I want to setup my test exactly like yours.

Please confirm the only thing you did in Cubic was update the packages?
Did you execute `apt upgrade`, or `apt full-upgrade`, or something else?

Finally, if you did anything else that I should replicate, please mention it.

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

I just noticed you have already attached your `install.sh` script.

It looks very straightforward, and it should work; so I'll try it on my end.

Just let me know how you've setup the virtual environment and your selections in Ubiquity Installer.

Revision history for this message
AdlerHorst (adlerhorst) wrote :

I didn't changed any preseed files.

I deactivated the option download Updates. But Internet is available.

Interesting: I now the first time used "try ubuntu" instead of Install directly because I try now to get "/var/log/syslog" now the installation is running without any problems. 😲

I will inform you if it ends successfully because of the amount of data in /opt/ the Installation needs some time.

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

OK. I'll try the "Install directly" option.

Revision history for this message
AdlerHorst (adlerhorst) wrote :

The Image worked for installation.

I detected a habit I have sometimes. I sometimes automatic type "exit" if I think I finished something.
If you create a new Project the first time you enter the console the Name in the Command prompt is colored. If I enter exit it turns black. Could something hapens here what could cause the error?

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

I don't think that typing exit would cause the issue...

Cubic applies custom colors by momentary modifying /root/.bashrc.
The original /root/.bashrc is immediately reinstated once the chroot environment is running.

However, when you manually exit, Cubic restarts the chroot environment, but it doesn't do the "trick" with .bashrc.

Also, if a user modifies the .bashrc file in /root, the user's changes will be always saved and included in the final generated ISO.

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

As a very preliminary rough test, I just tried installing an Eoan image, generated by Cubic, in Virtual Box. I used the "Install" button. The installation worked.

I will do additional tests, using 18.04 and using your install.sh script.

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

Notes / Observations:

(1)
You do not need to use sudo in your script because you are logged in as root in Cubic's chroot environment,

(2)
The default sources.list file already has bionic, bionic-security, and bionic-updates.

    $ cat /etc/apt/sources.list
    $ deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
    $ deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
    $ deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted

As a result, /etc/apt/sources.list.d/temp.list will contain duplicated repositories.
This isn't a big deal. However, another approach could be to use `sed` to add "universe" and "multiverse" to the existing lines...

    # Backup original sources.list
    $ cat /etc/apt/sources.list
    $ cp /etc/apt/sources.list ~/

    # Update sources.list
    $ sed -i "s|restricted|restricted universe multiverse|g" /etc/apt/sources.list
    $ cat /etc/apt/sources.list

    # (Install your applications and updates)

    # Restore original sources.list
    $ cp ~/sources.list /etc/apt/sources.list
    $ cat /etc/apt/sources.list

(3)
You can bypass the user input screen when installing mscorefonts...

    $ echo 'ttf-mscorefonts-installer msttcorefonts/present-mscorefonts-eula select true' | debconf-set-selections
    $ echo 'ttf-mscorefonts-installer msttcorefonts/present-mscorefonts-eula seen true' | debconf-set-selections
    $ echo 'ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true' | debconf-set-selections
    $ echo 'ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula seen true' | debconf-set-selections
    $ debconf-show ttf-mscorefonts-installer

    $ apt install -y ttf-mscorefonts-installer

(4)
Cubic calculated checksums for 331 files, for ubuntu-18.04.3-desktop-amd64.iso. You should have the same number when you run Cubic.

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

Test Results:

I customized ubuntu-18.04.3-desktop-amd64.iso using Cubic.

I executed the steps in your install.sh file.
However, I did not use `sudo`. (Using `sudo` wouldn't make a difference).

I updated using `sed` as I described above. (This is just a matter of style, and wouldn't make a difference).

Cubic successfully created the customized ISO. Note that Cubic calculated checksums for 331 files on the repackage ISO page.

I installed the customized ISO into a virtual machine in Virtual Box.

I did select English as the language, and I selected New York as the time zone.
This is different then what you did, so I may retest using Switzerland, as in your screenshot ( especially since you got a time zone error).

As a result, I was able to successfully install Cubic in Virtual Box and login.
Packages specified in your install.sh file were installed.

However, PlayOnLinux displayed the error, so you may need additional packages:

    PlayOnLinux is unable to find 32bits OpenGl libraries.
    You might encounter problems with you games

Nevertheless, the installation succeeded without issue.

Revision history for this message
AdlerHorst (adlerhorst) wrote :

I put a .PlayOnLinux to /opt/ and I set a symlink into /etc/skel which point to /opt/.PlayOnLinux
the current Installation worked but I in the Installation text console I got many many errors because journald tells no storage space left. It seems the root directory of the LiveSystem has no storage left.

To be able to run PlayOnLinux you need to add following line before the line apt update line in install.sh:
sudo dpkg --add-architecture i386

Revision history for this message
AdlerHorst (adlerhorst) wrote :

the Installation finally crashed.

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

Translating the message to English (for future reference):

Installer crashed
Sorry, the installer is down. After closing this window, you can generate a bug report. This will collect information about your system and the installation process. The details will be sent to the error manager and a developer will take care of the problem as soon as possible.

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

AdlerHorst,

Does allocating enough virtual disk space solve your "no storage space left" problem?
(Generally, I find that 25GB or more is necessary to install a Customized Ubuntu in Virtual Box).

FYI: I still have to test the "Install Ubuntu" option while using Switzerland as the local. I'll post my results once that is done.

Revision history for this message
AdlerHorst (adlerhorst) wrote :

Would you Say I should manually add a SWAP partition first in the Installation manager or do I understand it wrong?

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

Here is a screenshot of the Virtual Box | Settings | Storage dialog.
Notice that Ubuntu.vdi has a virtual size of 25 GB (outlined in red).

What is the virtual size of your "Test Linux.vdi" ?

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

I have setup 100GB.

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

Did you create partitions during installation?

I think your "/" partition doesn't have enough space, which is why Ubiquity is failing. By the way, Ubuntu 18.04 doesn't use a swap partition, so you shouldn't need to create one.

The best approach is to use the entire 100GB disk in Virtual Box to install your customized Ubuntu, and let the installer manage the disk partitions. Is that what you are doing?

Revision history for this message
AdlerHorst (adlerhorst) wrote :

I every time chose the top settings and let Ubuntu full handle the disk himself.

my customized ISO has 26GB

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

Are you saying that the all files in the customized file system total 26GB?
(This is shown on Cubic's Repackage page, #1 in the attached example screenshot).

...OR...

Are you saying that the final ISO is 26GB?
(This is shown on Cubic's Repackage page, #2 in the attached example screenshot).

Also, do you know what the values for #1 and #2 were when you generated the ISO in Cubic?

If your final ISO is 26GB, it may be possible that you had a very good 1/4 compression ratio, and all the files may actually total more that 100GB when uncompressed and installed in Virtual Box?

Although this theory doesn't explain why, in your screenshot, your virtual disk is using only 43.70GB out of the available 100.00GB. I would have expected close to 100% usage.

In your syslog, I see a lot of "systemd-journald ... File /var/log/journal/ ... /system.journal corrupted or uncleanly shut down, renaming and replacing." errors. I wonder if your system just keeps generating so many new journal files, that it fills up the virtual disk? Again, I would have expected close to 100% usage of your virtual disk, not 43.70GB.

Nevertheless, your syslog says that the system ran out of space: "No space left on device"

So something must be causing that?

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

Possible causes of "No space left on device"...

(1) System is running out of inodes, even if there is enough disk space...

https://scoutapm.com/blog/understanding-disk-inodes

(2) Since the the OS has not been installed, this link claims that the VM is using available memory, and that causes the "No space left on device" error...

https://stackoverflow.com/questions/39375548/virtualbox-doesnt-have-enough-space-left-on-device

(The person who posted this never gave a good explanation, but I thought I'd share it anyway)

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

TESTING UPDATE
--------------

I finally did a test using your locale...
(See previous test https://bugs.launchpad.net/cubic/+bug/1840232/comments/21)

I selected the "Install Ubuntu"
I selected Switzerland as the keyboard layout and Time Zone (as shown in your screenshots).

My customized Ubuntu installed without error into VirtualBox.

After installation, I checked and the packages from your install.sh script were indeed installed.

(However, the language was still set to English, even though the time zone and keyboard were Switzerland. I should have also selected German; I will do another test to with German language).

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

TESTING UPDATE
--------------

Ich hatte keine Probleme bei der Installation des angepassten Ubuntu in VirtualBox unter Verwendung von Deutsch als Sprache, Schweizer Tastatur und Schweizer Zeitzone.

Der einzige Unterschied zwischen meiner und Ihrer Installation besteht darin, dass ich keine zusätzlichen Dateien in / opt habe.

- - - - - - - -

I had no issues installing the customized Ubuntu in VirtualBox using German as the language, Switzerland keyboard, and Switzerland time zone.

Now, the only difference between my installation and yours is that I have no additonal files in /opt.

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

Here is a very similar issue...

The cause seems to be not enough disk space or not enough RAM...

https://askubuntu.com/questions/251358/how-to-fix-ubi-timezone-failed-with-exit-code-1-error

Revision history for this message
AdlerHorst (adlerhorst) wrote :

OPT:
In /opt/.PlayOnLinux are all Windows Games a friend of min had collected wince Windows 98. He's planing to use this ISO as a kind of Game Archive. I detected that some years ago I installed all of them on a Linux to motivate him to change from Windows. That not worked. But after a new pc, he asked me about the games and if he has to install all of them manually again and on every new pc he meight have in future again also. I took a Backup of .PlayOnLinux, I did that time, and they worked all without any reinstalling them. This Friend of mine will get a dualboot and this ISO.

SIZE:
My ISO has the size of 26GB.
.PlayOnLinux has 34GB and 45'000 Files

LANGUAGE:
I usually setup language and Keyboard in the boot menu. They are taken and the Preset for the installation. In my Opinian this menu is more easy to choose German and siwss-german keyboard.

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

That's a good use/reason for customizing your own Ubuntu ISO.

The question is, how to solve the issue you are having?...

If your ISO is 26Gb, I'm sure the final install would be much larger when the compressed Linux file system is extracted during installation. However, your logs show that you are only using 43.70GB out of 100.00GB available in your virtual machine.

So the, "No space left on device" error must be caused by something else:

(1)

One possible cause is that you are running out of inodes, as this URL explains:

    https://scoutapm.com/blog/understanding-disk-inodes

If you have more than 45,000 files, this could be the culprit.

I'm not sure if there is something I can change in Cubic to help with this problem. (It may have something to do with your host machine or how your *.vdi is formatted). Nevertheless, I'll research the block size when Cubic generates the ISO file. I ~think~ having a larger block size may use less inodes, but the image size becomes greater. I'll investigate this further.

(2)

Another possibility is that you are running out of RAM in your virtual machine.
Researching VirutalBox and Live ISOs, I've come across threads implying that, while you are running a Live environment, the actual disk is not used. Instead, RAM is used to simulate disk space. I think you've set the virtual machine to use 2.6GB. That's a lot, but it may not be enough during the installation process.

Would it be possible to allocate more RAM to your VM and do a test? (I think your host computer has about 6GB. May be you can try allocating up to 4.5GB or 5GB to the VM as an experiment?

Please let me know if you try that test, and I'll continue to do more research on item 1.

Revision history for this message
AdlerHorst (adlerhorst) wrote :

I did another Test and used 19.04.
For the first installation it worked without any problem.

I will tst this again.

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

Since you have so many files in /opt, the issue may be with inodes (https://en.wikipedia.org/wiki/Inode).

Would you please test the the *Development* branch, and let me know if it resolves your problem?

    # Remove Cubic
    $ sudo apt autoremove --purge cubic

    # Remove the *Release* repository
    $ sudo apt-add-repository --remove ppa:cubic-wizard/release

    # Add the *Development* repository
    $ sudo add-apt-repository ppa:cubic-wizard/development

    # Install the *Development* version of Cubic
    $ sudo apt update
    $ sudo apt install cubic

In the Development branch (revision 209), I've changed "cache-inodes" to "-no-cache-inodes" for mkisofs, as an experiment (see https://linux.die.net/man/8/mkisofs).

With "-cache-inodes", hard links (files with multiple names) only appear once on the CD. However, with "-no-cache-inodes", multiple hard links to the same file are repeated.

The drawback is that the resulting image may actually be larger. (For this reason, I'm not sure I would introduce this experimental "fix" as a permanent change to Cubic, but it's worth checking to see if it resolves your particular problem where you have many, many files).

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

By the way, if 19.04 works, and 18.04 doesn't, it's possible there was a bug with some packages (such as ubiquity, kernel, etc.) associated to 18.04, and those bugs were fixed with 19.04.

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

Assuming you no longer have this issue. Closing bug report.

Changed in cubic:
status: New → Invalid
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.