chrooty is a rescue and chroot utility that automates chroot-based recovery tasks, including LVM, ZFS, Btrfs subvolume handling, EFI mounts, extensive logging, and plugin-driven extensibility.
- Dynamic detection of LVM, ZFS, Btrfs, ext4, xfs, exfat volumes
- Btrfs subvolume enumeration and selection (
@
or ID 5) - EFI partition auto-detection and mounting
- Robust error handling (
set -euo pipefail
, cleanup traps) - Timestamped audit logs in
/var/log/chrooty.log
with optional--verbose
- Self-provisioned log rotation via
/etc/logrotate.d/chrooty
- Interactive menu and non-interactive scriptable modes
- Extensible plugin architecture via
hooks/pre_chroot.d
andhooks/post_chroot.d
- Comprehensive unit/integration tests (Bats) and containerized test harness
- Packaging support for Debian (
.deb
), RPM (.rpm
), and Homebrew tap
sudo apt-get update
sudo apt-get install -y chrooty
sudo dnf install -y chrooty
brew tap github.com/0n1cOn3/chrooty
brew install chrooty
sudo chrooty
Select from the menu:
- Rescue System (root filesystem only)
- Rescue UEFI (EFI partition only)
- Full Rescue (both)
- Quit
- Rescue root filesystem only:
sudo chrooty --no-prompt --system
- Rescue EFI partition only:
sudo chrooty --no-prompt --uefi
- Full rescue:
sudo chrooty --no-prompt
- Enable verbose logging:
sudo chrooty --verbose --no-prompt --system
- Show help:
chrooty --help
- Pre-chroot hooks: Drop executable
*.sh
scripts inhooks/pre_chroot.d/
to run before mounts. - Post-chroot hooks: Drop executable
*.sh
scripts inhooks/post_chroot.d/
to run after unmount.
See DEVELOPER_GUIDE.md for detailed instructions.
Please refer to CONTRIBUTING.md for guidelines on reporting issues, running tests, and submitting pull requests.
Licensed under the MIT License. See LICENSE for details.