Alpine Linux
Create needed pkgs repository in Alpine Linux install (Part 2) - rescue disk
Some questions answered here.
- How to create an Alpinelinux rescue disk?
- How to create an Alpinelinux rescue iso?
How to create alpinelinux rescue disk
Method 1 (DISK RAM boot)
- Method described below is presently meant for ram-based installs. It may not be effective on other methods of installs.
- Method assumes you have a basic internet ready ram-based install/setup up and running.
- Create a ram based basic bootable disk. [2] [3] [4] [5]
- Update this disk to a rescue disk by adding curated pkgs.
- See Part1: Create-what-is-only-needed-repo.
- Updated code/scripts with some curated apk lists can be found here. [1]
1. Directory/files structures - of alpine rescue boot disk
(1)
/media/usb/
|-- apks <- installed from alpine-standard-3.18.3-armv7.iso
| `-- x86_64
| |-- APKINDEX.tar.gz
| |-- acct-6.6.4-r2.apk
| |-- ....
| `-- zstd-libs-1.5.5-r4.apk
|-- apks2 <- custom curated apk pkgs folder
| `-- v3.18
| |-- fetch-apk.sh <- helper script to download apks
| |-- main
| | `-- x86_64
| | |-- APKINDEX.tar.gz
| | `-- ... .apk
| `-- community
| `-- x86_64
| |-- APKINDEX.tar.gz
| `-- ... .apk
|-- boot
| |-- System.map-lts
| |-- ....
| `-- vmlinuz-lts
|-- cache
| `-- installed
|-- efi
| `-- boot
| `-- bootx64.efi
|-- localhost.20240727210601.tar.gz
|-- localhost.apkovl.tar.gz
`-- lost+found
2. Some basic packages useful in rescue boot.
1a. Disk/Storage (main)
- bcache-tools
- tools for managing bcache
- btrfs-progs
- BTRFS filesystem utilities
- e2fsprogs
- Standard Ext2/3/4 filesystem utilities
- f2fs-tools
- Tools for the Flash-Friendly File System (F2FS)
- parted
- Utility to create, destroy, resize, check and copy partitions
- squashfs-tools
- Tools for squashfs, a highly compressed read-only filesystem for Linux
- testdisk
- A data recovery suite
- xfsprogs
- XFS filesystem utilities
apk add bcache-tools btrfs-progs e2fsprogs f2fs-tools parted squashfs-tools testdisk xfsprogs
1b. Disk/Storage (community)
- exfatprogs
- exfat filesystem userspace tools, mkfs and fsck
- fuse-exfat
- Free exFAT file system implementation
- fuse-exfat-utils
- Free exFAT file system implementation (utilities)
- jfsutils
- JFS filesystem utilities
apk add exfatprogs fuse-exfat fuse-exfat-util jfsutils
2a. Hardware (main)
- atop
- Resource-specific view of processes
- dmidecode
- A utility for reporting system hardware as described by BIOS
- dmraid
- Device mapper RAID interface
- hdparm
- Utility for manipulating IDE device parameters
- lm-sensors
- Collection of user space tools for general SMBus access and hardware monitoring.
- usbutils
- USB Device Utilities
- xorriso
- ISO-9660 and Rock Ridge image manipulation tool
apk add atop dmidecode dmraid hdparm lm-sensors usbutils xorriso
2b. Hardware (community)
- hwinfo
- Hardware information tool
- iotop
- I/O monitoring tool
- lshw
- Hardware Lister
apk add hwinfo iotop lshw
3a. Networking (main)
- dnstop
- A DNS traffic capture utility
- drill
- DNS(SEC) query tool ala dig
- lftp
- Sophisticated ftp/http client
- ncftp
- A set of free application programs implementing FTP
- net-tools
- Linux networking base tools
- rsync
- A file transfer program to keep remote files in sync
- tcpdump
- A tool for network monitoring and data acquisition
apk add dnstop drill lftp ncftp net-tools rsync tcpdump
3b. Networking (community)
- ipcalc
- A modern IPv4/IPv6 ipcalc tool, assisting in network calculations in command line and as a tool for scripts.
apk add ipcalc
4a. Others (main)
- 7zip
- File archiver with a high compression ratio
- bc
- An arbitrary precision numeric processing language (calculator)
- busybox-extras
- Additional binaries of Busybox
- coreutils
- The basic file, shell and text manipulation utilities
- diffutils
- Show differences among files
- gpg
- GNU Privacy Guard 2 - public key operations only
- lsof
- LiSt Open Files
- lz4
- LZ4 is lossless compression algorithm with fast decoder @ multiple GB/s per core.
- screen
- Window manager that multiplexes a physical terminal
- tmux
- Tool to control multiple terminals from a single terminal
- util-linux
- Random collection of Linux utilities
- util-linux-misc
- Misc binaries for util-linux
apk add 7zip bc busybox-extras coreutils diffutils gpg lsof lz4 screen tmux util-linux util-linux-misc
WIP (work in progress)
- TODO: work on simple script to create an iso from existing bootable rescue disk.
How to create alpinelinux rescue iso
Method 2 (ISO RAM boot)
I have used Alpinelinux for more than 10+yrs and haven't had a need to generate bootable iso. Once having created a bootable disk using the method above adding/removing pkgs to it is relatively simpler than re-doing an iso.
Author
V.Krishn
Resources