Create needed pkgs repository in Alpine Linux install (Part 2) - rescue disk

Some questions answered here.

  1. How to create an Alpine Linux rescue disk?
  2. How to create an Alpine Linux rescue iso?

How to create Alpine Linux rescue disk

Method 1 (DISK - RAM boot)

  1. Method described below is presently meant for ram-based installs. It may not be effective on other methods of installs.
  2. Method assumes you have a basic internet ready ram-based install/setup up and running.
  1. Create a ram based basic bootable disk. [2] [3] [4] [5]
  2. Update this disk to a rescue disk by adding curated pkgs.
    1. See Part1: Create-what-is-only-needed-repo.
    2. 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-x86_64.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
unzip
Extract PKZIP-compatible .zip files
xfsprogs
XFS filesystem utilities
apk add bcache-tools btrfs-progs e2fsprogs f2fs-tools parted squashfs-tools testdisk unzip xfsprogs
1b. Disk/Storage (community)
ddrescue
Data recovery tool for block devices with errors
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 ddrescue exfatprogs(optional) fuse-exfat fuse-exfat-utils 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.
pciutils
PCI bus configuration space access library and tools
usbutils
USB Device Utilities
xorriso
ISO-9660 and Rock Ridge image manipulation tool
apk add atop dmidecode dmraid hdparm lm-sensors pciutils 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)
arpwatch
Ethernet monitoring program
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
netcat-openbsd
The TCP/IP swiss army knife. OpenBSD variant from debian
network-extras
Meta package to pull in ppp, vlan, bonding, bridge and wifi support
rsync
A file transfer program to keep remote files in sync
tcpdump
A tool for network monitoring and data acquisition
apk add arpwatch dnstop drill lftp ncftp net-tools netcat-openbsd network-extras 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
syslinux
Boot loader for the Linux operating system
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 syslinux tmux util-linux util-linux-misc
4b. Others (community)
android-tools
Android platform tools
paxctl
Manage PaX related program header flags
apk add android-tools paxctl

WIP (work in progress)

  • TODO: work on simple script to create an iso from existing bootable rescue disk.

How to create Alpine Linux rescue iso

Method 2 (ISO - RAM boot)

I have used Alpine Linux for more than 10+yrs and haven't had a need to re-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


Edit - History - Print - Recent Changes - Search
Page last modified on September 07, 2025, at 09:48 PM