wrolpi/scripts
Roland 17e26fab97 Adding scripts/wrolpi-usb.sh — upgrade subcommand.
`wrolpi-usb.sh upgrade <iso> <device>` replaces the boot partition of an
existing WROLPi USB with a new ISO while preserving the persistence
partition.

Flow:
  1. Locate the persistence partition by label.
  2. Read its sector range from sfdisk -d.
  3. Confirm the new ISO fits in the headroom (i.e. its byte count <=
     persistence_start_sector * 512).  If not, bail with instructions
     telling the user to back up /media/wrolpi, re-flash from scratch,
     and restore.  This is the case for USBs flashed before the 8 GiB-
     headroom commit.
  4. Save the partition table to /tmp/ for emergency recovery.
  5. Prompt for "yes".
  6. dd the new ISO onto the device.  The persistence partition's
     sectors are past the ISO's end, so its data is untouched.
  7. sfdisk --append to re-add the persistence partition entry at the
     saved sector range.  The data on disk is still there; we are just
     fixing up the partition table the new ISO wrote.
  8. partx -u to refresh the kernel view; verify the label is reachable.

`install` subcommand is wired up to a die() for now; will land in a
follow-up commit.

The script refuses to operate on non-removable disks (foot-gun guard).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 20:16:02 -06:00
..
cleanup_orphaned_tags.py Creating script to clean up orphaned tag files. 2026-02-28 17:05:02 -07:00
delete_downloads.py Many fixes split out from the feature/unified-query branch. Installing diagnostic tools in the built images. Displaying video comment statistics. Echoing error when install.sh fails. 2024-04-14 13:13:30 -06:00
delete_similarly_named_videos.py Refactoring videos and archives UI paths for consistent scheme. 2026-03-20 15:38:32 -06:00
dev_build.sh Adding edit button so user can edit downloads, currently supports videos and archives. 2025-08-06 13:03:32 -06:00
find_and_convert_srt_to_vtt.py Adding option to ignore errors in find_and_convert_srt_to_vtt.py. 2023-08-04 08:36:30 -06:00
find_and_rename_orphan_video_files.py Bumping version for new feature. 2022-12-07 18:15:28 -07:00
find_corrupt_videos.py Converting JSON columns to JSONB for performance. 2026-01-06 06:23:32 -07:00
fix_media_permissions.sh File permissions fix script checks for exfat and other file systems before trying to repair, displays a warning and gives advice on how to fix the issue. 2026-03-05 18:18:53 -07:00
generate_certificates.sh Replace nginx with Caddy for TLS termination and reverse proxying. 2026-03-07 18:48:44 -07:00
generate_subtitles.py Creating script which finds all SRT files and converts them to VTT. 2023-08-03 22:36:11 -06:00
initialize_api_db.sh Creating script which migrates map database to new database for custom niceness. 2025-01-01 16:41:21 -07:00
install_debian_12.sh Key changes: 2026-04-04 13:48:19 -06:00
install_help_service.sh Replacing Tag names with escaped tag names to avoid errors in Tags Directory. 2024-10-16 18:56:10 -06:00
install_protomaps.sh Map search added to global search. Preview cards are displayed for all results in new Map tab. 2026-04-13 12:17:08 -06:00
install_raspberrypios.sh Updating raspberry pi package list file name. 2026-04-14 16:52:33 -06:00
renew_certificates.sh Replace nginx with Caddy for TLS termination and reverse proxying. 2026-03-07 18:48:44 -07:00
reset_api_db.sh Creating script which migrates map database to new database for custom niceness. 2025-01-01 16:41:21 -07:00
reset_tags.sh Creating script to reset tags. 2026-02-14 15:37:09 -07:00
reset_virtual_environments.sh Clearing cached python files in repair.sh. Creating reset_virtual_environments.sh script which deletes the virtual environments and rebuilds them (requires internet) 2026-02-28 16:11:12 -07:00
singlefile_to_archive.py A Channel can be tagged with a single Tag. The Channel can be moved into a Tag Directory according to the config. 2024-10-16 18:56:19 -06:00
start_kiwix_serve.sh Replace nginx with Caddy for TLS termination and reverse proxying. 2026-03-07 18:48:44 -07:00
upgrade.sh Migrating Controller from port 8087 to 80 so that it is more discoverable. Reformatting Controller dashboard to make header at the top. Reformatting navigation bar to handle the new links which prevented Admin from being visible in some screens. 2026-04-09 15:01:05 -06:00
upgrade_yt-dlp.sh Creating script which updates yt-dlp in the wrolpi venv to the latest available. 2025-01-23 17:46:37 -07:00
wrolpi-usb.sh Adding scripts/wrolpi-usb.sh — upgrade subcommand. 2026-05-25 20:16:02 -06:00