aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--mkinitfs-bootparam.7.in131
-rw-r--r--mkinitfs.1.in80
-rw-r--r--nlplug-findfs.1.in64
4 files changed, 283 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a77ff92..70a48a4 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ VERSION := 3.3.0
sysconfdir ?= /etc/mkinitfs
datarootdir ?= /usr/share
datadir ?= $(datarootdir)/mkinitfs
+mandir ?= $(datarootdir)/man
SBIN_FILES := mkinitfs bootchartd nlplug-findfs
SHARE_FILES := initramfs-init fstab passwd group
@@ -52,9 +53,10 @@ CONF_FILES := mkinitfs.conf \
features.d/zfs.modules \
features.d/qeth.modules \
features.d/dasd_mod.modules
+MAN_FILES := mkinitfs.1 mkinitfs-bootparam.7 nlplug-findfs.1
SCRIPTS := mkinitfs bootchartd initramfs-init
-IN_FILES := $(addsuffix .in,$(SCRIPTS))
+IN_FILES := $(addsuffix .in,$(SCRIPTS) $(MAN_FILES))
GIT_REV := $(shell test -d .git && git describe || echo exported)
ifneq ($(GIT_REV), exported)
@@ -79,10 +81,10 @@ DEFAULT_FEATURES += qeth dasd_mod
endif
-all: $(SBIN_FILES) $(SCRIPTS) $(CONF_FILES)
+all: $(SBIN_FILES) $(SCRIPTS) $(CONF_FILES) $(MAN_FILES)
clean:
- rm -f $(SCRIPTS) mkinitfs.conf
+ rm -f $(SCRIPTS) $(MAN_FILES) mkinitfs.conf
help:
@echo mkinitfs $(VERSION)
@@ -122,6 +124,9 @@ install: $(SBIN_FILES) $(SHARE_FILES) $(CONF_FILES)
for i in $(SHARE_FILES); do \
$(INSTALL) -D $$i $(DESTDIR)/usr/share/mkinitfs/$$i;\
done
+ for i in $(MAN_FILES); do \
+ $(INSTALL) -D $$i $(DESTDIR)$(mandir)/man$${i##*.}/$$i;\
+ done
mkinitfs.conf:
echo 'features="$(DEFAULT_FEATURES)"' > $@
diff --git a/mkinitfs-bootparam.7.in b/mkinitfs-bootparam.7.in
new file mode 100644
index 0000000..9abb124
--- /dev/null
+++ b/mkinitfs-bootparam.7.in
@@ -0,0 +1,131 @@
+.TH MKINITFS-BOOTPARAMS "7" "July 2018" "mkinitfs @VERSION@" "Early startup"
+.SH NAME
+alpine-bootparams \- control the startup behavior using the kernel command line
+.SH DESCRIPTION
+.\" Add any additional description here
+.PP
+In early boot, the preferred way to supply configuration data to the running
+system is via kernel options. The kernel options are specified in the bootloader
+configuration and are supplied to the kernel and early userspace in early boot.
+The mechanism and options that are interpreted by the kernel itself are
+documented in \fIbootparam(7)\fR.
+.PP
+The options documented here are interpreted by the initramfs-init script that is
+part of the initramfs, see \fImkinitfs(1)\fR to learn how to customize it.
+.TP
+\fBblacklist=\fIMODULE\fR{,\fIMODULE\fR}
+This comma-separated list names kernel modules that modprobe will reject to load.
+.TP
+\fBchart\fR
+Enables bootchartd for measuring system startup speed.
+.TP
+\fBcryptdiscards\fR
+Enable the discard feature for encrypted Solid State Disks. This might have
+security implications.
+.TP
+\fBcryptdm=\fINAME\fR
+After the block device has been decrypted, make it available as
+/dev/mapper/\fINAME\fR.
+.TP
+\fBcryptheader=\fIDEVICE\fR
+When the LUKS headers and encrypted data are on different devices, this option
+specifies the device with the LUKS headers.
+.TP
+\fBcryptkey=\fIKEYFILE\fR
+Attempt to decrypt an encypted partition using an keyfile.
+.TP
+\fBcryptoffset=\fISECTORS\fR
+Indicate that the encrypted data begins the given number of sectors after the
+start of the block device.
+.TP
+\fBcryptroot=\fIDEVICE\fR
+Attempt to decrypt \fIDEVICE\fR.
+.TP
+\fBdasd\fR
+Enable DASD devices on S/390x architectures.
+.TP
+\fBdebug_init\fR
+Print debug information during boot.
+.TP
+\fBinit_args=\fIARGUMENTS\fR
+Additional command like arguments for \fI/sbin/init\fR.
+.TP
+\fBip=\fICLIENT-IP\fR::\fIGATEWAY-IP\fR:\fINETMASK\fR::\fIINTERFACE\fR
+Specify the network configuration as a colon-separated list of variable length.
+The 3rd and the 5th list item is ignored. The format is compatible with the
+SYSAPPEND option of syslinux. Use \fBip=dhcp\fR for automatic configuration via
+DHCP.
+.TP
+\fBmodules=\fIMODULE\fR{,\fIMODULE\fR}
+Comma-sparated list of kernel modules to load explicitly.
+.TP
+\fBnodma\fR
+Disable DMA for ATA devices.
+.TP
+\fBoverlaytmpfs\fR
+When booting from an read-only partition, you can specify this flag to have
+your changes written to an in-memory overlayfs.
+.TP
+\fBquiet\fR
+Generate less output.
+.TP
+\fBresume=\fIDEVICE\fR
+Swap partition to resume from.
+.TP
+\fBroot=\fR(\fIDEVICE\fR | nfs:\fIIP-ADDRESS\fR:\fIPATH\fR)
+Device or NFS url for the root partition.
+.TP
+\fBrootflags=\fIOPTIONS\fR
+Mount options for the device specified with \fBroot=\fR.
+.TP
+\fBrootfstype=\fIFS_TYPE\fR
+File system type for the device specified with \fBroot=\fR.
+Allowed values are the same like the \fB\-t\fR option for \fImount(1)\fR.
+.TP
+\fBs390x_net=qeth_l2,\fIBUS-ID\fR{,\fIBUS-ID\fR}
+Configure network devices for the S/390x architecture.
+.TP
+\fBsingle\fR
+Launch root shell before switching to the root partition.
+.PP
+If no \fBroot=\fR parameter is given, the initramfs will build an live system
+in memory from scratch. This is also called diskless mode.
+.PP
+When booting in diskless mode, the following options are also available:
+.TP
+\fBalpine_repo=\fR(\fIURL\fR | \fIPATH\fR)
+If set, \fI/etc/apk/repositories\fR will be filled with this. May be an URL.
+.TP
+\fBapkovl=\fR(\fIURL\fR | [\fIDEVICE\fR[:\fIFS_TYPE\fR]:]\fIPATH\fR)\fR
+A HTTP, HTTPS or FTP URL to an apkovl.tar.gz file which will be retrieved and
+applied. Can also be an filesystem path, optionally prepended with the device
+name without the /dev/ prefix.
+.TP
+\fBnokeep_apk_new\fR
+Setup a fresh system, ignore any \fBapkovl\fR.
+.TP
+\fBpkgs=\fIPACKAGE\fR{,\fIPACKAGE\fR}\fR
+Comma-separated list of packages to be installed.
+.TP
+\fBssh_key=\fR(\fIURL\fR | \fISSH_KEY\fR)
+This setting installs openssh and places the public key given as value in
+\fI/root/.ssh/authorized_keys\fR.
+If the value is an HTTP or FTP url, its fetches the key(s) from there.
+.TP
+\fBsplash\fR
+Enable splash screen
+.TP
+\fBusbdelay=\fINUMBER\fR
+Wait \fINUMBER\fR seconds for USB devices to show up before searching for boot
+media.
+.SH FILES
+.TP
+\fI@datadir@/initramfs-init\fR
+Default script that will be run in the initramfs.
+.SH AUTHOR
+.PP
+Written by Natanael Copa <ncopa@alpinelinux.org>, Timo Teräs <timo.teras@iki.fi> and others.
+.SH "REPORTING BUGS"
+Alpine Linux Bugtracker: <https://bugs.alpinelinux.org/projects/alpine/issues>
+.SH "SEE ALSO"
+nlplug-findfs(1), mkinitfs(1), bootparam(7)
diff --git a/mkinitfs.1.in b/mkinitfs.1.in
new file mode 100644
index 0000000..dd8db94
--- /dev/null
+++ b/mkinitfs.1.in
@@ -0,0 +1,80 @@
+.TH MKINITFS "1" "July 2018" "mkinitfs @VERSION@" "Early startup"
+.SH NAME
+mkinitfs - Generate an initramfs
+.SH SYNOPSIS
+.PP
+mkinitfs [\fIOPTIONS\fR] [\fIKERNELVERSION\fR]
+.SH DESCRIPTION
+\fBmkinitfs\fR collects files from the root file system and creates a
+compressed initramfs from it.
+.TP
+\fB\-b\fR \fIBASEDIR\fR
+Dont use files from the root file system, use specified path instead.
+.TP
+\fB\-c\fR \fICONFIGFILE\fR
+Use configfile instead of \fI@sysconfdir@/mkinitfs.conf\fR.
+.TP
+\fB\-f\fR \fIFSTAB\fR
+Use fstab instead of \fI@datadir@/fstab\fR.
+.TP
+\fB\-F\fR \fIFEATURES\fR
+Use specified features.
+.TP
+\fB\-h\fR
+Print this help.
+.TP
+\fB\-i \fIINITFILE\fR
+Use initfile as init instead of \fI@datadir@/initramfs-init\fR.
+.TP
+\fB\-k\fR
+Do not clean up temporary files.
+.TP
+\fB\-K\fR
+Also copy also host apk keys to initramfs.
+.TP
+\fB\-l\fR
+Do a dry run and only list files that would have been used.
+.TP
+\fB\-L\fR
+List all available features.
+.TP
+\fB\-n\fR
+Don't include kernel modules or firmware into the initramfs.
+.TP
+\fB\-o \fIOUTFILE\fR
+Set another outfile.
+.TP
+\fB\-P \fIFEATURESDIR\fR
+Prepend features.d search path. Use this if you want to define your own features
+outside of the system-wide directories.
+.TP
+\fB\-q\fR
+Quiet mode.
+.TP
+\fB\-t \fITMPDIR\fR
+Use tempdir when creating initramfs image.
+.SH FILES
+.TP
+\fI@sysconfdir@/mkinitfs.conf\fR
+Default configuration file. It contains the list of default features in the
+format of \fBfeatures="..."\fR.
+.TP
+\fI@sysconfdir@/features.d/FEATURE.modules\fR
+Contains a list of kernel modules. Using the feature will cause the given
+kernel modules to be included in the initramfs. The modules are given by their
+filesystem paths, relative to \fI/lib/modules/KERNELVERSION/\fR.
+.TP
+\fI@sysconfdir@/features.d/FEATURE.files\fR
+Contains an list of absolute file names which will be included into the
+generated initramfs if the feature is enabled.
+.TP
+\fI@datadir@/initramfs-init\fR
+Shell script which will be placed as \fI/init\fR in the initramfs. This
+functions as the first executed program in early userspace.
+.SH AUTHOR
+.PP
+Written by Natanael Copa <ncopa@alpinelinux.org>, Timo Teräs <timo.teras@iki.fi> and others.
+.SH "REPORTING BUGS"
+Alpine Linux Bugtracker: <https://bugs.alpinelinux.org/projects/alpine/issues>
+.SH "SEE ALSO"
+mkinitfs-bootparam(7)
diff --git a/nlplug-findfs.1.in b/nlplug-findfs.1.in
new file mode 100644
index 0000000..7379aa5
--- /dev/null
+++ b/nlplug-findfs.1.in
@@ -0,0 +1,64 @@
+.TH NLPLUG-FINDFS "1" "July 2018" "mkinitfs @VERSION@" "Early startup"
+.SH NAME
+nlplug-findfs - Search for blockdevices to boot
+.SH SYNOPSIS
+.PP
+nlplug-findfs \fIOPTIONS\fR [\fISEARCHDEVICE\fR]
+.SH DESCRIPTION
+nlplug-findfs is part of the initramfs and is tasked to find the (possibly
+encrypted) boot partition and installer media.
+.TP
+\fB\-a \fIOUTFILE\fR
+When apk overlays are found during the search, a list of their paths will be
+stored in \fIOUTFILE\fR.
+.TP
+\fB\-b \fIOUTFILE\fR
+When boot media are found, a list of them is stored in \fIOUTFILE\fR.
+Boot media are identified by the existence of an .boot_repository file.
+.TP
+\fB\-c \fICRYPTDEVICE\fR
+Specifies an block device for decryption.
+.TP
+\fB\-h\fR
+Show usage information.
+.TP
+\fB\-H \fIHEADERDEVICE\fR
+When using an encrypted device with LUKS headers on an separate block device,
+that block device must be specified using this option.
+.TP
+\fB\-k \fIKEYFILE\fR
+Attempt to decrypt the block device given with \fB\-c\fR using a keyfile.
+.TP
+\fB\-m \fINAME\fR
+When the decryption of the block device is successful, it will appear as
+/dev/mapper/\fINAME\fR.
+.TP
+\fB\-n\fI
+Do not return non-zero if \fISEARCHDEVICE\fR is not found.
+.TP
+\fB\-D\fR
+Mount the encrypted devices with the discard (TRIM) option. Dont enable this if
+you dont know what its doing.
+.TP
+\fB\-d\fR
+Enable debugging output.
+.TP
+\fB\-f \fISUBSYSTEM\fR
+Ignore devices belonging to the given subsystem.
+.TP
+\fB\-o \fIOFFSET\fR
+When mounting an encrypted device, this specifies the payload offset for
+cryptsetup.
+.TP
+\fB\-p \fIPROGRAM\fR
+Call this program for uevents which have DEVNAME set.
+.TP
+\fB\-t \fITIMEOUT\fR
+Timeout after \fITIMEOUT\fR milliseconds without uevents.
+.SH AUTHOR
+.PP
+Written by Natanael Copa <ncopa@alpinelinux.org>, Timo Teräs <timo.teras@iki.fi> and others.
+.SH "REPORTING BUGS"
+Alpine Linux Bugtracker: <https://bugs.alpinelinux.org/projects/alpine/issues>
+.SH "SEE ALSO"
+mkinitfs-bootparam(7)