Calamares - Installation failed - Bad main script file

Bug #2054795 reported by Leó Kolbeinsson
84
This bug affects 17 people
Affects Status Importance Assigned to Milestone
calamares (Ubuntu)
Fix Released
Critical
Simon Quigley

Bug Description

Verbose description:

2024-02-23 - 09:41:38 [1]: ERROR: Error while running: TypeError: chmod: path should be string, bytes, os.PathLike or integer, not TextIOWrapper

Original description:

Testing Lubuntu Noble daily ISO dated 22-02-2024

Installation failed due to bad main script file - see attached screenshot

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: calamares 3.3.2-0ubuntu1
ProcVersionSignature: Ubuntu 6.6.0-14.14-generic 6.6.3
Uname: Linux 6.6.0-14-generic x86_64
.etc.calamares.modules.after_bootloader_context.conf:
 ---
 dontChroot: false
 timeout: 120
 firmwareType:
     "*": "-rm ${ROOT}/home/${USER}/Desktop/lubuntu-calamares.desktop"
.etc.calamares.modules.finished.conf:
 ---
 restartNowMode: user-checked
 restartNowCommand: "systemctl -i reboot"
.etc.calamares.modules.fstab.conf:
 crypttabOptions: luks,keyscript=/bin/cat
 efiMountOptions: umask=0077
.etc.calamares.modules.shellprocess_logs.conf:
 ---
 dontChroot: true
 timeout: 30
 script:
     - calamares-logs-helper ${ROOT}
.etc.calamares.modules.unpackfs.conf:
 ---
 unpack:
     - source: "/cdrom/casper/filesystem.squashfs"
         sourcefs: "squashfs"
         destination: ""
ApportVersion: 2.27.0-0ubuntu7
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.493
CurrentDesktop: LXQt
Date: Fri Feb 23 09:45:03 2024
LiveMediaBuild: Lubuntu 24.04 LTS "Noble Numbat" - Daily amd64 (20240222)
RelatedPackageVersions:
 calamares-settings-ubuntu-common 1:24.04.16
 calamares-settings-lubuntu 1:24.04.16
 xfsprogs 6.5.0-1ubuntu2
 btrfs-progs 6.6.3-1
SourcePackage: calamares
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Leó Kolbeinsson (leok) wrote :
tags: added: lubuntu
Leó Kolbeinsson (leok)
description: updated
Simon Quigley (tsimonq2)
Changed in calamares (Ubuntu):
assignee: nobody → Simon Quigley (tsimonq2)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in calamares (Ubuntu):
status: New → Confirmed
Simon Quigley (tsimonq2)
description: updated
description: updated
Revision history for this message
oldfred (oldfred) wrote :

Installing Kubuntu noble-desktop-amd64.iso as of 2024 March 05.

Error says main.py but related to networking.

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

Graphics show Lubuntu during install before crash.

Then desktop crashes both after install crash or with Try Kubuntu.

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

The upstream fix for this is here:
https://github.com/calamares/calamares/commit/5568d22549384a092a0d294d7343840d186839c6

To implement it in situ, edit /usr/lib/x86_64-linux-gnu/calamares/modules/networkcfg/main.py so that line 158 reads like:
                os.chmod(f.fileno(), 0o600)
instead of its current state of:
                os.chmod(f, 0o600)

Revision history for this message
Richard Pratt (rattyp) wrote :

Tested manual workaround identified by wxl (Upstream Fix) on Lubuntu Daily Build 07.03.24 on the Dell Wyse 3040 (See Related Bug #2054697) and this workaround resolves failed installation allowing it to complete correctly.

Revision history for this message
Jane Atkinson (irihapeti) wrote :

Can confirm that the fix above also works on Kubuntu ISO 20240308.

Revision history for this message
Eugene San (eugenesan) wrote :

Still exists as of build 20240311 and workaround from https://bugs.launchpad.net/ubuntu/+source/calamares/+bug/2054795/comments/4 works.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

For the record, the fix for this bug is uploaded (I believe), but it's stuck in the -proposed pocket because of a giant change happening at the same time (the time_t64 transition for avoiding the Year 2038 problem). It may be a bit before we see ISOs with the fix on it.

Changed in calamares (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

The fix is in 3.3.5-0ubuntu1. Because of that time_t64 issue, you can't simply enable the proposed repo and install it, though.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/2054795

tags: added: iso-testing
Changed in calamares (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Rik Mills (rikmills) wrote (last edit ):

The 'fixed' 3.3.5-0ubuntu2 is now migrating to the release pocket.

Changed in calamares (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Scarlett Gately Moore (scarlettmoore) wrote :

Fixed in latest ISO

To post a comment you must log in.