Neon_Unstable_20240225 ISO broken

Calamares crashes near 40% because of a script issue in /user/lib…
Please look for a correction. We don’t have the previous one and the testing one is too old.

Here’s the crash error:

Main script file /usr/lib/x86_64-linux-gnu/calamares/modules/networkcfg/main.py for python job networkcfg raised an exception.

Same issue with, btrfs, xfs, ext4, online, offline and/or secure boot enabled or not. Dual boot with Arch [kde-unstable].

Same for me - using the latest unstable ISO (25022024)

The same problem here. User version 20240226

That makes sense, because it seems to be a network thing.

Did you guys try with AND without internet connection activated while installing?
(I guess mostly relevant if using wifi)

My install attempt was with a wired internet connection.

In the end I used an ISO from January and just updated this.

The bug is in the main.py file. Editing the file as follow allows Calamares to complete the install (neon-Unstable 20240225_ISO).

The bug is also in the latest neon-Testing ISO.

Before launching the install edit the main.py file. Save, exit and run Calamares after.

/usr/lib/x86_64-linux-gnu/calamares/modules/networkcfg/main.py

Delete line 141 to 161

   # Set NetworkManager to be the default renderer if Netplan is installed
    # TODO: We might rather do that inside the network-manager package, see:
    # https://bugs.launchpad.net/ubuntu/+source/ubuntu-settings/+bug/2020110
    default_renderer = os.path.join(root_mount_point, "usr/lib/netplan",
                                    "00-network-manager-all.yaml")
    if not os.path.exists(default_renderer):
        renderer_file = os.path.join(target_netplan,
                                     "01-network-manager-all.yaml")
        nm_renderer = """# This file was written by calamares.

Let NetworkManager manage all devices on this system.

For more information, see netplan(5).

network:
version: 2
renderer: NetworkManager
“”"
with open(renderer_file, ‘w’) as f:
f.writelines(nm_renderer)
os.chmod(f, 0o600)

    # Copy existing Netplan configuration
    for cfg in glob.glob(os.path.join(source_netplan, "*.yaml")):

Copy this to Line 141:

for cfg in glob.glob(os.path.join(source_netplan, “90-NM-*”)):

End result: Line 140 to 146:

if os.path.exists(source_netplan) and os.path.exists(target_netplan):
   for cfg in glob.glob(os.path.join(source_netplan, "90-NM-*")):
        source_cfg = os.path.join(source_netplan, cfg)
        target_cfg = os.path.join(target_netplan, os.path.basename(cfg))

        if os.path.exists(target_cfg):
            continue

The new file has 167 lines. 1 addition, 21 deletions.

This solution comes from the main.py file neon-Dev_ISO 20240207.

All the best,

2 Likes

I’m using ISO 0240303-0009 and I’m going in an infinite loop …
My understanding is that I need to boot from the iso and then run “install system” which appears in the top left corner of the GUI.
But before I do, I need to open main.py and amend it as you say. All good.
I’ve found the right file and edited it - but the install still fails in the same place.
It seems that main.py is being ovewritten - but I don’t know from where?
Is there another way of doing this?

I see this in neon-user-20240303-0009. I see a fix has been posted in this thread, but has a bug report been made?

I have copied the complete “networkcfg” folder from a working version.
I delete the original folder and replace it with the working one.

that’s interesting Rolf_Traumer - how are you installing? using the iso burned to a USB stick? Can you say a bit more about your method please?

I start the ISO via USB stick on Ventoy.
When neon is running, I exchange the file and install the OS as usual.

thank you Rolf_Traumer! I never heard of Ventoy, I’ve used it to create the usb again.
I must be doing something really silly - I replaced the main.py file in the /usr/lib… with the amended file.


Just in case, here’s the code that’s in main.py now:

    # Also install netplan files
    source_netplan = "/etc/netplan"
    root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
    target_netplan = os.path.join(root_mount_point, source_netplan.lstrip('/'))

    if os.path.exists(source_netplan) and os.path.exists(target_netplan):
        for cfg in glob.glob(os.path.join(source_netplan, “90-NM-*”)):
            source_cfg = os.path.join(source_netplan, cfg)
            target_cfg = os.path.join(target_netplan, os.path.basename(cfg))

            if os.path.exists(target_cfg):
                continue

            shutil.copy(source_cfg, target_cfg)

But I’m still getting the error:
Screenshot_20240303_171627

1 Like

I modified the file, set it immutable and it still was overridden and failed that same way. ?

I have the same with the 20240229 version I just downloaded. Please let me know when this is fixed at the source.

Trying to download that just gets spam, pop ups, and virus warnings.

Sorry, I uploaded the file to a filehoster.
No warning was displayed for me.
I have deleted the link as a precaution.

Understood! Can you upload somewhere else, and tell us how you use it?

Hi, same problem here with neon-user-20240303-0009 as well as neon-testing-20240227-0254

The fix above didn’t work for me. Put a report up on bugs.kde.org

I think this is the original file:

I also found this bugreport, that is closed with a commit, so if you guys just wait it will most likely be fixed in a new release.