PJ-Singh-001 / Cubic

The Official Web Site for Cubic (Custom Ubuntu ISO Creator) (https://github.com/PJ-Singh-001/Cubic)
798 stars 46 forks source link

Install error from custom image #345

Open asilnov opened 1 week ago

asilnov commented 1 week ago

Describe the question

During creation custom image of Ubuntu 20.04 in virtual env terminal I upgraded packages and installed net-tools. After creation I tried to install the image on my baremetal server and got the installation error:

         Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
         TIMED udevadm_settle(): 0.024
         Detected multipath support, reload maps
         Running command ['multipath', '-r'] with allowed return codes [0] (capture=False)
         Sep 06 21:49:10 | DM multipath kernel driver not loaded
         finish: cmd-install/stage-partitioning/builtin/cmd-block-meta/clear-holders: FAIL: removing previous storage devices
         TIMED BLOCK_META: 1.470
         finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
         Traceback (most recent call last):
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/commands/main.py", line 202, in main
             ret = args.func(args)
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/log.py", line 97, in wrapper
             return log_time("TIMED %s: " % msg, func, *args, **kwargs)
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/log.py", line 79, in log_time
             return func(*args, **kwargs)
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/commands/block_meta.py", line 108, in block_meta
             meta_clear(devices, state.get('report_stack_prefix', ''))
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/commands/block_meta.py", line 1983, in meta_clear
             clear_holders.start_clear_holders_deps()
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/block/clear_holders.py", line 691, in start_clear_holders_deps
             multipath.reload()
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/block/multipath.py", line 229, in reload
             util.subp(['multipath', '-r'])
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/util.py", line 275, in subp
             return _subp(*args, **kwargs)
           File "/snap/subiquity/3698/lib/python3.8/site-packages/curtin/util.py", line 139, in _subp
             raise ProcessExecutionError(stdout=out, stderr=err,
         curtin.util.ProcessExecutionError: Unexpected error while running command.
         Command: ['multipath', '-r']
         Exit code: 1
         Reason: -
         Stdout: ''
         Stderr: ''
         Unexpected error while running command.
         Command: ['multipath', '-r']
         Exit code: 1
         Reason: -
         Stdout: ''
         Stderr: ''

OS Information (please complete the following information):

Cubic Information (please complete the following information):

PJ-Singh-001 commented 1 week ago

I can see the issue seems to have something to do with partitioning.

cmd-install/stage-partitioning/builtin/cmd-block-meta/clear-holders: FAIL: removing previous storage devices

Could be that you've updated something that the installer is not happy about.

With Subiquity, Canonical introduced ISOs with a layered file system. The 20.04 Server ISO has only two layers:

  1. The "Standard" Linux file system
    • This is what you can customize in Cubic
    • This is what gets installed onto your computer
  2. The "Installer" Linux file system
    • This contains Subiquity and additional files, packages, and snaps needed in the Live Environment
    • Cubic can not customize this, for technical reasons I have not been able to overcome
    • This file system does NOT get installed onto your computer

I suspect what might be happening is, some of the files on the "Installer" (2) file system need specific files on the "Standard" (1) file system. But you've upgraded the files on the "Standard" (1) file system.

I think you may be able to build a custom install if you selectively update packages.

Based on your error log, I suspect the package udev (which contains the command udevadm) can not be upgraded.

Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)

Perhaps you could try selectively upgrading packages, excluding ones that the "Installer" (2) file system needs specific versions of.

I agree this is not an easy task. As an initial step, try keeping udev unchanged, as I suggested.

Unfortunately, the introduction of Subiquity and Snaps has really impacted our ability to customize the ISO. (With the latest version of Cubic, I was able to combine the "Minimal" and "Standard" files systems, which appear on the Desktop ISO, but the "Installer" file system for both Desktop and Server ISOs is something I have not been able to enable customization of yet).