Installation failed: “Bad main script file”

Error File: https://termbin.com/2um3

Can someone help me with this? I saw a similar error in this forum, but not sure if my issue is the same as that one.

It looks like your EFI partition mounted read-only.

That usually either means it needs filesystem repair or your are coming from Windows and didn’t disable fast startup.

2024-10-02 - 17:38:13 [1]: ERROR: Error while running: OSError: [Errno 30] Read-only file system: '/tmp/calamares-root-z372bh7d/efi/EFI/Microsoft'

:wink:

That does seem to be the issue.
I googled up some resources, disabled fast startup and retried, but ended up failing with the same error.
Upon further googling, someone mentioned that I had to turn of hibernate completely as well. I did that and did a couple of restarts, before retrying.
However, I still end up facing similar error: https://termbin.com/uhall

Can you please help me out here? (I’m pretty new :()

Did you also turn of Secure Boot in the bios?

I did.

1 Like

ERROR: Error while running: OSError: [Errno 30] Read-only file system: '/tmp/calamares-root-ffseo7iw/efi/EFI/Microsoft'
same error showing… could be you need to check repair the EFI partition before starting installer… you can try doing so from partitionmanager on the live ISO and reboot after this could be it has a unclean lock bit…

1 Like

I tried doing this.
Firstly, the check option was disabled after an attempt to install and a lock symbol was shown on the partition.
Hence, I restarted my PC and did a check before attempting to install.
This time around I was able to do a check and all passed successfully. However, when I tried installing post that, it failed with the same error. Attaching file for reference: https://termbin.com/1myn

How did you do the check?

In partition manager, click on the efi partition, right click → check → Apply operations followed by a all operations success message.

could be needed to check manually…

sudo fsck -V /dev/sdXn
or / and

sudo dosfsck -t -a -w /dev/sdXn

replace sdXn with the actual partition device …

Did both. Both were successful without any warnings/errors.

[liveuser@eos-2024.06.25 ~]$ sudo fsck -V /dev/nvme0n1p1
fsck from util-linux 2.40.1
[/usr/bin/fsck.vfat (1) -- /dev/nvme0n1p1] fsck.vfat /dev/nvme0n1p1 
fsck.fat 4.2 (2021-01-31)
/dev/nvme0n1p1: 382 files, 54052/100352 clusters
[liveuser@eos-2024.06.25 ~]$ sudo dosfsck -t -a -w /dev/nvme0n1p1
fsck.fat 4.2 (2021-01-31)
/dev/nvme0n1p1: 382 files, 54052/100352 clusters

Noticed that the size of my efi is ~200Mb (out of which ~105mb already used). Maybe that’s an issue?

thats only 50% used.. And output shows it does not have a dirty bit .. You are sure checking the esp from windows? could you show: lsblk -f`

Sure. Here it is:

[liveuser@eos-2024.06.25 ~]$ lsblk -f
NAME        FSTYPE    FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0       squashfs  4.0                                                          0   100% /run/archiso/airootfs
sda                                                                                         
└─sda1      vfat      FAT32 EOS_202406  CEE2-C8E5                               1.2G    68% /run/archiso/bootmnt
nvme0n1                                                                                     
├─nvme0n1p1 vfat      FAT32 ESP         E8CF-9A39                              90.4M    54% /tmp/tmp6vag7e9_
├─nvme0n1p2                                                                                 
├─nvme0n1p3 BitLocker 2                                                                     
├─nvme0n1p4 ntfs            WINRETOOLS  C81E68ED1E68D64A                                    
├─nvme0n1p5 ntfs            DELLSUPPORT 3ADE62DBDE628EC7                                    
└─nvme0n1p6 ext4      1.0   endeavouros 35c0a864-283e-4825-b95b-11e5cbec6b9d 

Note: sda1 seems to be the live boot pendrive

Based on this, I tried setting the option to create a new efi and that failed with the same error as well. https://termbin.com/3bla

Running this again, after one failed attempt to install, results in something.

[liveuser@eos-2024.06.25 ~]$ sudo fsck -V /dev/nvme0n1p1
fsck from util-linux 2.40.1
[/usr/bin/fsck.vfat (1) -- /dev/nvme0n1p1] fsck.vfat /dev/nvme0n1p1 
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action
[123?q]? 

Any idea on what I should do here?

Thought efi was now 1gb for systemd-boot? 200mb might work with grub?

Yes… for systemd-boot
But user said he tried to create new one… I see P2 empty space…?

Could you show also:
sudo fdisk -l

? @shake

This still seems to try use the same efi

Before attempting an install

[liveuser@eos-2024.06.25 ~]$ sudo fdisk -l
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: PC SN810 NVMe WDC 512GB                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5D68ECF6-A650-4342-B103-2E27345AC547

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     411647    409600   200M EFI System
/dev/nvme0n1p2    411648     673791    262144   128M Microsoft reserved
/dev/nvme0n1p3    673792  585324543 584650752 278.8G Microsoft basic data
/dev/nvme0n1p4 994924544  996952063   2027520   990M Windows recovery environment
/dev/nvme0n1p5 996954112 1000187903   3233792   1.5G Windows recovery environment
/dev/nvme0n1p6 585324544  994924543 409600000 195.3G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sda: 3.73 GiB, 4008706048 bytes, 7829504 sectors
Disk model: Nano Pro        
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1c744020

Device     Boot Start     End Sectors  Size Id Type
/dev/sda1  *     2048 7829503 7827456  3.7G  c W95 FAT32 (LBA)


Disk /dev/loop0: 2.4 GiB, 2572980224 bytes, 5025352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes