install.sh: free space detection, btrfs online resize, sfdisk, partition naming + install.md fix #14

Merged
obel1x merged 13 commits from :main into devel 2026-04-27 17:26:04 +02:00
Contributor

Summary

  • Add unpartitioned free space detection as alternative to shrinking a partition
  • Fix double /dev/ prefix bug in collect_partitions (lsblk -p returns full path for PKNAME)
  • Fix btrfs resize: use online resize instead of unmount (avoids busy-partition failures on mounted filesystems)
  • Replace parted resizepart with sfdisk --no-reread --force to avoid interactive TTY requirement
  • Set GPT partition name to anacondainstall for the new OEMDRV partition
  • Fix early non-root exit (script now exits immediately before any other code)
  • Update install.md: document download-then-run approach since process substitution does not survive sudo

Test plan

  • Tested end-to-end on a VirtualBox VM via SSH: btrfs online shrink + sfdisk resize + parted mkpart + mkfs.btrfs + mount + git clone all succeeded
  • Non-root early exit verified
  • Free space detection path covered by collect_free_space / show_free_table
## Summary - Add unpartitioned free space detection as alternative to shrinking a partition - Fix double `/dev/` prefix bug in `collect_partitions` (lsblk -p returns full path for PKNAME) - Fix btrfs resize: use online resize instead of unmount (avoids busy-partition failures on mounted filesystems) - Replace `parted resizepart` with `sfdisk --no-reread --force` to avoid interactive TTY requirement - Set GPT partition name to `anacondainstall` for the new OEMDRV partition - Fix early non-root exit (script now exits immediately before any other code) - Update `install.md`: document download-then-run approach since process substitution does not survive sudo ## Test plan - [ ] Tested end-to-end on a VirtualBox VM via SSH: btrfs online shrink + sfdisk resize + parted mkpart + mkfs.btrfs + mount + git clone all succeeded - [ ] Non-root early exit verified - [ ] Free space detection path covered by `collect_free_space` / `show_free_table`
unbrot added 13 commits 2026-04-27 17:25:08 +02:00
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Flatpak autoprovisioning command does not reliably write credentials
to KWallet from inside the sandbox. After provisioning, directly write
both KWallet entries (user:url/:0 and user_app-password:url/:0) via
qdbus, creating the Nextcloud folder first if needed. kwallet-query was
tried but silently returns 0 without creating missing folders.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shrinks a selected ext4/btrfs partition by 4 GiB, creates a new BTRFS
partition labeled OEMDRV, mounts it to /opt/sys_config and clones the
repository into it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
If a disk has unpartitioned space >= 4096 MiB, it is offered as a direct
target for the OEMDRV partition, avoiding any filesystem resize.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lsblk -p returns PKNAME as a full path (/dev/sda), so stripping
the basename before prepending /dev/ avoids /dev//dev/sda.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
btrfs supports live filesystem resize, so there is no need to
unmount a mounted btrfs partition before shrinking it. This also
avoids umount failures when the partition is busy (e.g. /home with
an active SSH session). ext4 still requires offline resize.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
parted -s answers confirmation prompts with "no" (conservative),
causing resizepart/mkpart to fail on a mounted partition. Pipe
"Yes" to parted stdin instead so busy-partition warnings are
confirmed and the operation proceeds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
parted fails to resize a mounted partition non-interactively.
sfdisk --no-reread --force writes the updated partition table
directly without TTY/confirmation issues, and partprobe
re-reads it afterwards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Process substitution does not survive sudo, so the script must be
downloaded to a temp file first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
obel1x merged commit f4e5de2f5a into devel 2026-04-27 17:26:04 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: obel1x/fedora-OEMDRV#14