Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 22.04 Server apt upgrade changes are not applied after installation of the customized OS. #106

Closed
olmezgokhan opened this issue Oct 13, 2022 · 8 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@olmezgokhan
Copy link

olmezgokhan commented Oct 13, 2022

Hi everyone
First of all, i tried a lot of method for fixing my problem but they did not work.

I want to customize Ubuntu 22.04 live server ISO. Actually, what I want to do is simple.
The packages and kernel versions on every computer I install should be the same.

For this reason, when Cubic chroot is opened, the work I do is as follows.

apt update
apt upgrade

After the upgrade, I run apt update again to make sure that all packages are up to date.

I'm installing some specific kernel versions and holding them with the apt-hold command.
Then I export the ISO I have customized. I write to the USB disk in a bootable way and install Ubuntu.

The problem starts at this point.

The versions of the packages in the fresh installed Ubuntu are not the same as the versions in the Cubic. (The Cubic versions are up to date).
When I connect my fresh installed computer to the internet and run the apt update command, Cubic finds the new packages as if they had not been updated.

So in summary, the changes I made to Cubic are not applied on the computer I installed.

I couldn't figure out where I made a mistake. I'll be glad if you help.

  • OS: Ubuntu
  • OS Version:22.04
  • Cubic Version: 22.06.72
  • ISO Customizing: ubuntu-22.04.1-live-server-amd64
@olmezgokhan olmezgokhan added the question Further information is requested label Oct 13, 2022
@PJ-Singh-001 PJ-Singh-001 self-assigned this Oct 18, 2022
@PJ-Singh-001 PJ-Singh-001 added bug Something isn't working and removed question Further information is requested labels Oct 18, 2022
@PJ-Singh-001
Copy link
Owner

I tested customizing ubuntu-22.04.1-live-server-amd64.iso.
I had the same result...

  • I installed one package in Cubic, but that package was not available after I installed the OS.
  • I installed kernel 5.15.0-52-generic in Cubic. Although that kernel was available after I installed the OS, I suspect that was because 5.15.0-52 also happens to be the latest kernel (at time of testing).

Canonical made some changes to the server ISO. It is now very different from the desktop ISO.
At the moment, I don't know how to permit customization of the server ISO, and I will need to research this further.

I have flagged this issue as a bug; thank you for reporting it.
Unfortunately, I do not think I will be able to remedy the problem soon, although I will continue to look into it.

@crusaderflex
Copy link

Hello everyone,

did somebody see a change to fix this issuse? I have to customize a server iso, but I run into the same fault as described above.

Greets Michael

@cfroystad
Copy link

I've yet to dig into the details, but it seems this tool which is specifically made to modify Ubuntu Server images, should hold most of the answers we're looking for.

@johnrbrown
Copy link

Cubic is new to me but looks like just the tool I need to create a custom Ubuntu Server ISO. I'm trying to get it to work with Ubuntu Server 22.04.2. It looks like it now uses subiquity with newer cloud-config YML syntax for pressed file. Is there any update on when cubic will support this?

@salvoversonic
Copy link

Cubic is new to me but looks like just the tool I need to create a custom Ubuntu Server ISO. I'm trying to get it to work with Ubuntu Server 22.04.2. It looks like it now uses subiquity with newer cloud-config YML syntax for pressed file. Is there any update on when cubic will support this?

Hi @johnrbrown, at the end of Cubic iso output process you can use this script ubuntu-autoinstall-generator to inject the .yaml config to execute the autoinstallation.

@WillGreen
Copy link

Thanks for the suggestion @salvoversonic. Alas, ubuntu-autoinstall-generator doesn't support Ubuntu 22.04 LTS; see ubuntu-autoinstall-generator issue #30.

PXEless claims to support Ubuntu 22.04 and looks promising, but I haven't tested it yet.

I'd love to see Cubic support Autoinstall in a future release.

@PJ-Singh-001
Copy link
Owner

Have you seen this answer ?

Does this help you with using autoinstall with Cubic, or are you looking to do something else?

@PJ-Singh-001
Copy link
Owner

Using Cubic version 2023.03.79, I was able to customize Ubuntu Server 22.04.1 (ubuntu-22.04.1-live-server-amd64.iso). (Note: I ran Cubic in Ubuntu 22.10).

I made two changes:

  1. I installed a newer kernel. The original ISO comes with kernel 5.15.0.43-generic, but I upgraded to 5.19.0-35:

    apt update
    apt install linux-headers-5.19.0-35-generic linux-image-5.19.0-35-generic
    
  2. I also installed the tree package:

    apt update
    apt install tree
    

When I booted into the customized Live ISO, I noted that the kernel version in the Live Environment was 5.15.0.43. However, I expected this, because on Cubic's Kernel tab, I had accepted the default ISO bootstrap kernel. As a matter of fact, for Ubuntu Server 21.10+ or Desktop 23.04+, you must use the default bootstrap kernel, or your ISO will not boot.

When I installed the customized OS, my customizations were there: both the tree command and the new kernel 5.19.0-35 were installed. 👍

Note, Cubic makes changes to the "Minimal" install of Ubuntu, but these changes are available even if you select "Standard" during installation, because "Standard" is just a "layer" on top of the "Minimal" install.

One small difference with the "Standard" install was that dpkg -l tree insisted that the tree package was not installed, even though the command worked fine. This issue was not present with the "Minimal" install, where dpkg -l tree reported correctly that the tree package was indeed installed.

Therefore, even though selecting "Standard Install" works fine, I suggest you simply select "Minimal Install" when installing your customized OS, because this option will exactly reflect the changes you made in Cubic.

If you continue to experience problems while customizing Ubuntu Server 22.04, please open a new issue and include detailed information.


TLDR:

To customize Ubuntu 22.04 Server:

  1. Install Cubic 2023.03.79+
  2. Select the default bootstrap kernel on Cubic's Kernel tab
  3. Select "Minimal Install" ducting installation

@PJ-Singh-001 PJ-Singh-001 changed the title Ubuntu 22.04 server customization apt upgrade does not applied or work Ubuntu 22.04 Server apt upgrade changes are not applied after installation of the customized OS. Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants