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

Add mkosi.precompress #3522

Open
ragazenta opened this issue Feb 18, 2025 · 5 comments
Open

Add mkosi.precompress #3522

ragazenta opened this issue Feb 18, 2025 · 5 comments

Comments

@ragazenta
Copy link
Contributor

I want to create Hybrid MBR disk image, currently I use CompressOutput=no and mkosi.postoutput for this. It would be nice if users could do something to the disk image before being compressed.

#!/bin/bash

set -e

disk_image="${OUTPUTDIR}/${IMAGE_ID}_${IMAGE_VERSION}.raw"

gdisk "$disk_image" > /dev/null <<EOF
r
h
1
n
c
n
n
w
y
EOF

xz --force --check=crc32 --threads=0 --stdout "$disk_image" > "$disk_image.xz"
@DaanDeMeyer
Copy link
Contributor

I think we should implement MBR support in systemd-repart instead of adding precompress scripts to support this use case.

@DaanDeMeyer DaanDeMeyer changed the title RFE: Add mkosi.precompress Add mkosi.precompress Feb 18, 2025
@bluca
Copy link
Member

bluca commented Feb 18, 2025

What's the use case for MBR? Don't we want to focus on modern formats like GPT?

@ragazenta
Copy link
Contributor Author

Older Raspberry Pi models, Pi Zero, Pi 3, the bootloader only support MBR partitioned disk. As a workaround, GPT disk can be made as Hybrid MBR.

@bluca
Copy link
Member

bluca commented Feb 19, 2025

Aren't there new models being sold by now which are fully UEFI?

@septatrix
Copy link
Contributor

septatrix commented Feb 19, 2025

Aren't there new models being sold by now which are fully UEFI?

For UEFI I think one has to install uboot (which e.g. Fedora does) but they definitely support GPT

PS: There is also https://github.com/pftf/RPi4 though I have not used it yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants