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

Kairos 3.3.0 and 3.2.4 ISOs have messed up partitions layout #3153

Closed
ig0rmin opened this issue Jan 28, 2025 · 3 comments
Closed

Kairos 3.3.0 and 3.2.4 ISOs have messed up partitions layout #3153

ig0rmin opened this issue Jan 28, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@ig0rmin
Copy link

ig0rmin commented Jan 28, 2025

Extracted from the slack thread.

The issue was discovered after several failed attempts to install Kairos 3.3.0 on the bare metal PCs.

It looks like there's something screwed up with partitions in the recent ISOs (3.3.0 and 3.2.4). By mounting 3.3.0 ISO through a loop device we can see that it has three partitions:

Image

The COS_LIVE partition is too small for the rootfs.squashfs and there's a huge gap partition.

dmesg log has the following errors after mounting the ISO:

[  118.089661] loop23: detected capacity change from 0 to 2810880
[  118.104132] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  118.104134] GPT:2810807 != 2810879
[  118.104135] GPT:Alternate GPT header not at the end of the disk.
[  118.104135] GPT:2810807 != 2810879
[  118.104135] GPT: Use GNU Parted to correct GPT errors.
[  118.104139]  loop23: p1 p2 p3
[  118.244602] ISO 9660 Extensions: Microsoft Joliet Level 3
[  118.244714] ISO 9660 Extensions: RRIP_1991A
[  129.895991] pool-org.gnome.: attempt to access beyond end of device
               loop23p1: rw=524288, sector=313024, nr_sectors = 64 limit=988
[  129.896001] pool-org.gnome.: attempt to access beyond end of device
               loop23p1: rw=0, sector=313024, nr_sectors = 8 limit=988

and if we try to mount rootfs.squashfs

sudo mount --type=squashfs --options=loop --source='/media/igor/COS_LIVE/rootfs.squashfs' --target=/home/igor/Public/

->

mount: /home/igor/Public: can't read superblock on /dev/loop24.
       dmesg(1) may have more information after failed mount system call.

dmesg log:

[  359.710259] loop24: detected capacity change from 0 to 2497656
[  359.710375] kworker/u45:4: attempt to access beyond end of device
               loop23p1: rw=0, sector=313024, nr_sectors = 8 limit=988
[  359.710389] I/O error, dev loop24, sector 0 op 0x0:(READ) flags 0x800 phys_seg 1 prio class 0
[  359.710401] SQUASHFS error: Failed to read block 0x0: -5
[  359.710406] unable to read squashfs_super_block

The exactly same errors appear in the installation log if this ISO is flashed to the USB stick and we try to install it on the bare metal PC.

For whatever reason it works for VMs though 🤷

Older versions of Kairos used to have ISOs with only 2 partitions and the COS_LIVE was big enough:

Image

@Itxaka suggests that the issue is with auroraboot version that got changed between 3.2.3 and 3.2.4 versions of Kairos:

3.2.3 looks good, that was with older aurora
3.2.4 looks bad as well
3.24 was when we upgraded to aurora 0.4.3

@ig0rmin ig0rmin added bug Something isn't working triage Add this label to issues that should be triaged and prioretized in the next planning call unconfirmed labels Jan 28, 2025
@ig0rmin ig0rmin changed the title Kairos 3.3.0 and 3.2.4 ISOs has messed up partitions layout Kairos 3.3.0 and 3.2.4 ISOs have messed up partitions layout Jan 28, 2025
@jimmykarily
Copy link
Contributor

I cut a new release of auroraboot with all latest changes in. I built an image locally and it already looks a lot better:

~/workspace/kairos/kairos (use-kvm-in-test)*$ gdisk -l build/kairos-opensuse-leap-15.6-core-amd64-generic-v3.3.0-9-g0e4b7816-dirty.iso
GPT fdisk (gdisk) version 1.0.10

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************

Exact type match not found for type code CD00; assigning type code for
'Linux filesystem'

Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.
Disk build/kairos-opensuse-leap-15.6-core-amd64-generic-v3.3.0-9-g0e4b7816-dirty.iso: 2475008 sectors, 1.2 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): FB7CAC16-4696-4E4F-AF63-05705B1C4F43
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 2474974
Partitions will be aligned on 64-sector boundaries
Total free space is 30 sectors (15.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64         2466815   1.2 GiB     8300  Linux filesystem
   2         2466816         2475007   4.0 MiB     EF00  EFI system partition

(only 2 partitions listed here, no "Gap"). The output of an ISO built with 0.4.3 was:

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            1035   486.0 KiB   0700  Gap0
   2            1036            9227   4.0 MiB     EF00  EFI boot partition
   3            9228         2466819   1.2 GiB     0700  Gap1

@jimmykarily jimmykarily reopened this Jan 28, 2025
@github-project-automation github-project-automation bot moved this from Done ✅ to Under review 🔍 in 🧙Issue tracking board Jan 28, 2025
@jimmykarily jimmykarily moved this from Under review 🔍 to In Progress 🏃 in 🧙Issue tracking board Jan 28, 2025
@jimmykarily jimmykarily removed triage Add this label to issues that should be triaged and prioretized in the next planning call unconfirmed labels Jan 28, 2025
@jimmykarily jimmykarily moved this from In Progress 🏃 to Under review 🔍 in 🧙Issue tracking board Jan 30, 2025
@jimmykarily
Copy link
Contributor

@ig0rmin can you give it a try with the artifacts from 3.3.1-rc4: https://github.com/kairos-io/kairos/releases/tag/v3.3.1-rc4 ?

They look ok to me now.

@ig0rmin
Copy link
Author

ig0rmin commented Feb 1, 2025

I can confirm that the issue is fixed now (the partitions look good and I'm able to install Karios on the bare metal) 🙏

@ig0rmin ig0rmin closed this as completed Feb 1, 2025
@github-project-automation github-project-automation bot moved this from Under review 🔍 to Done ✅ in 🧙Issue tracking board Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants