write up man pages

This commit is contained in:
illiliti 2020-03-08 03:28:00 +03:00
parent 2f725a9ff7
commit 537b89819f
5 changed files with 293 additions and 39 deletions

29
config
View File

@ -5,29 +5,28 @@
# debug mode
#debug=0
# overwrite existing initramfs image
# overwrite initramfs
#force=0
# custom init
# init
#init=""
# custom output name
# initramfs name
#initramfs=""
# custom drivers directory
# drivers directory
#moddir=""
# custom kernel version
# kernel version
#kernel=""
# custom compression program
# compression program
#compress=""
# root fs ( device,partuuid,uuid,label )
# root
#root=""
# root type
# change this if you using busybox util-linux
#root_type=""
# root options
@ -36,19 +35,19 @@
# util-linux binaries
#util_linux=0
# device manager ( mdev,mdevd,udev )
# device manager
#devmgr=""
# hostonly mode
#hostonly=0
# custom drivers
# additional drivers
#drivers=""
# exclude drivers
#drivers_exclude=""
# custom binaries
# additional binaries
#binaries=""
# LVM support
@ -60,8 +59,8 @@
# LVM volume group name
#lvm_group=""
# LVM include config
#lvm_conf=0
# LVM config
#lvm_config=0
# LVM issue_discards
#lvm_discard=0
@ -72,10 +71,10 @@
# LUKS support
#luks=0
# LUKS encrypted root ( device,partuuid,uuid,label )
# LUKS encrypted root
#luks_root=""
# luks mapper name ( /dev/mapper/<name> )
# LUKS mapper name
#luks_name=""
# LUKS detached header

View File

@ -165,7 +165,7 @@ install_devmgr() {
! -path "*hwdb.d*" \
-type f |
cpio -pd "$workdir" > /dev/null 2>&1 || msg panic "failed to install udev"
cpio -pd "$workdir" > /dev/null 2>&1
;;
mdev)
install -m644 "${filesdir}/mdev.conf" "${workdir}/etc/mdev.conf"
@ -179,9 +179,6 @@ install_devmgr() {
install -m644 "${filesdir}/mdev.conf" "${workdir}/etc/mdev.conf"
install -Dm755 "${filesdir}/storage-device" "${workdir}/lib/mdev/storage-device"
;;
*)
msg panic "devmgr option broken"
;;
esac
}
@ -196,11 +193,10 @@ install_lvm() {
done
# install lvm config
if [ "$lvm_conf" = 1 ]; then
if [ "$lvm_config" = 1 ]; then
mkdir -p "${workdir}/etc/lvm"
cp /etc/lvm/*.conf "${workdir}/etc/lvm" ||
msg panic "failed to install LVM config"
cp /etc/lvm/*.conf "${workdir}/etc/lvm"
else
mkdir -p "${workdir}/etc/lvm"
@ -238,17 +234,13 @@ install_luks() {
# copy luks header
[ -f "$luks_header" ] && {
install -m400 "$luks_header" "${workdir}/root/luks_header" ||
msg panic "failed to copy LUKS header"
install -m400 "$luks_header" "${workdir}/root/luks_header"
luks_args="--header=/root/luks_header $luks_args"
}
# copy luks keyfile
[ -f "$luks_keyfile" ] && {
install -m400 "$luks_keyfile" "${workdir}/root/luks_keyfile" ||
msg panic "failed to copy LUKS keyfile"
install -m400 "$luks_keyfile" "${workdir}/root/luks_keyfile"
luks_args="--key-file=/root/luks_keyfile $luks_args"
}
}
@ -283,9 +275,6 @@ install_driver() {
install_hostonly_drivers() {
msg info "installing hostonly drivers"
[ "$root_type" ] ||
msg panic "hostonly mode required root_type option to be configured"
# perform autodetection of drivers via /sys
find /sys -name modalias -exec sort -u {} + |
@ -293,9 +282,6 @@ install_hostonly_drivers() {
install_driver "$_driver"
done
# install root fs driver
install_driver "$root_type"
# install user specified drivers
[ "$drivers" ] &&
for _driver in $drivers; do

View File

@ -0,0 +1,172 @@
.TH tinyramfs 5 "March 2020" tinyramfs
.SH NAME
tinyramfs \- configuration options
.SH GENERAL
.TP
.BR \fBdebug=\fR"\&\fI {0|1} \fR\&"
Enable shell debugging
This option also drop you to shell after root partition being mounted in initramfs
.TP
.TP
.BR \fBforce=\fR"\&\fI {0|1} \fR\&"
Disable warning about exists initramfs image
.TP
.TP
.BR \fBinit=\fR"\&\fI /path/to/file \fR\&"
Specify init program
.TP
.TP
.BR \fBinitramfs=\fR"\&\fI /path/to/file \fR\&"
Specify initramfs output name
.TP
.TP
.BR \fBmoddir=\fR"\&\fI /path/to/dir \fR\&"
Specify directory of drivers
.TP
.TP
.BR \fBkernel=\fR"\&\fI ... \fR\&"
Specify kernel version
.TP
.TP
.BR \fBcompress=\fR"\&\fI ... \fR\&"
Specify compression program
.TP
.TP
.BR \fBroot=\fR"\&\fI ... \fR\&"
Specify root partition [PARTUUID, UUID, LABEL, DEVICE]
This option is required
.TP
.TP
.BR \fBroot_type=\fR"\&\fI ... \fR\&"
Specify root partition type
.TP
.TP
.BR \fBroot_opts=\fR"\&\fI ... \fR\&"
Specify root partition mount options (comma separated)
.TP
.TP
.BR \fButil_linux=\fR"\&\fI {0|1} \fR\&"
Include util-linux binaries
This option required if you need PARTUUID support
.TP
.TP
.BR \fBdevmgr=\fR"\&\fI ... \fR\&"
Specify device manager [udev, mdev, mdevd]
This option is required
.TP
.TP
.BR \fBhostonly=\fR"\&\fI {0|1} \fR\&"
Enable hostonly mode
.TP
.TP
.BR \fBdrivers=\fR"\&\fI ... \fR\&"
Include additional drivers (space separated)
If host only mode enabled you need to specify your root partition driver
.TP
.TP
.BR \fBdrivers_exclude=\fR"\&\fI ... \fR\&"
Exclude specified drivers (space separated)
.TP
.TP
.BR \fBbinaries=\fR"\&\fI ... \fR\&"
Include additional binaries (space separated)
.TP
.SH LVM
.TP
.BR \fBlvm=\fR"\&\fI {0|1} \fR\&"
Enable LVM support
This option required if you need LVM support
.TP
.TP
.BR \fBlvm_name=\fR"\&\fI ... \fR\&"
Specify logical volume name
.TP
.TP
.BR \fBlvm_group=\fR"\&\fI ... \fR\&"
Specify volume group name
.TP
.TP
.BR \fBlvm_config=\fR"\&\fI {0|1} \fR\&"
Include config from /etc/lvm
This option overwrite lvm_discard option
.TP
.TP
.BR \fBlvm_discard=\fR"\&\fI {0|1} \fR\&"
Enable TRIM requests
.TP
.TP
.BR \fBlvm_args=\fR"\&\fI ... \fR\&"
Pass additional options to lvm
.TP
.SH LUKS
.TP
.BR \fBluks=\fR"\&\fI {0|1} \fR\&"
Enable LUKS support
This option required if you need LUKS support
.TP
.TP
.BR \fBluks_root=\fR"\&\fI ... \fR\&"
Specify encrypted root partition [PARTUUID, UUID, LABEL, DEVICE]
This option required if you need LUKS support
.TP
.TP
.BR \fBluks_name=\fR"\&\fI ... \fR\&"
Specify device mapper name
.TP
.TP
.BR \fBluks_header=\fR"\&\fI /path/to/file \fR\&"
Embed header into initramfs
.TP
.TP
.BR \fBluks_keyfile=\fR"\&\fI /path/to/file \fR\&"
Embed key into initramfs
.TP
.TP
.BR \fBluks_discard=\fR"\&\fI {0|1} \fR\&"
Enable TRIM requests
.TP
.TP
.BR \fBluks_args=\fR"\&\fI ... \fR\&"
Pass additional options to cryptsetup
.TP

View File

@ -0,0 +1,102 @@
.TH tinyramfs 7 "March 2020" tinyramfs
.SH NAME
tinyramfs \- kernel command line options
.SH GENERAL
.TP
.BR \fBdebug=\fR"\&\fI {0|1} \fR\&"
Enable shell debugging
This option also drop you to shell after root partition being mounted
.TP
.TP
.BR \fBinit=\fR"\&\fI /path/to/file \fR\&"
Specify init program
.TP
.TP
.BR \fBroot=\fR"\&\fI ... \fR\&"
Specify root partition [PARTUUID, UUID, LABEL, DEVICE]
.TP
.TP
.BR \fBroot.type=\fR"\&\fI ... \fR\&"
Specify root partition type
.TP
.TP
.BR \fBroot.opts=\fR"\&\fI ... \fR\&"
Specify root partition mount options (comma separated)
.TP
.SH LVM
.TP
.BR \fBlvm=\fR"\&\fI {0|1} \fR\&"
Enable LVM support
.TP
.TP
.BR \fBlvm.name=\fR"\&\fI ... \fR\&"
Specify logical volume name
.TP
.TP
.BR \fBlvm.group=\fR"\&\fI ... \fR\&"
Specify volume group name
.TP
.TP
.BR \fBlvm.config=\fR"\&\fI {0|1} \fR\&"
Not implemented
.TP
.TP
.BR \fBlvm.discard=\fR"\&\fI {0|1} \fR\&"
Not implemented
.TP
.TP
.BR \fBlvm.args=\fR"\&\fI ... \fR\&"
Pass additional options to lvm
.TP
.SH LUKS
.TP
.BR \fBluks=\fR"\&\fI {0|1} \fR\&"
Enable LUKS support
.TP
.TP
.BR \fBluks.root=\fR"\&\fI ... \fR\&"
Specify encrypted root partition [PARTUUID, UUID, LABEL, DEVICE]
.TP
.TP
.BR \fBluks.name=\fR"\&\fI ... \fR\&"
Specify device mapper name
.TP
.TP
.BR \fBluks.header=\fR"\&\fI /path/to/file \fR\&"
Not implemented
.TP
.TP
.BR \fBluks.keyfile=\fR"\&\fI /path/to/file \fR\&"
Not implemented
.TP
.TP
.BR \fBluks.discard=\fR"\&\fI {0|1} \fR\&"
Enable TRIM requests
.TP
.TP
.BR \fBluks.args=\fR"\&\fI ... \fR\&"
Pass additional options to cryptsetup
.TP

View File

@ -68,9 +68,6 @@ setup_devmgr() {
mdevd &
mdevd-coldplug
;;
*)
panic "devmgr option broken"
;;
esac
}
@ -82,7 +79,6 @@ findfs_sh() {
UUID) device="/dev/disk/by-uuid/${value}" ;;
PARTUUID) device="/dev/disk/by-partuuid/${value}" ;;
/dev/*) device="$1" ;;
*) panic "findfs option broken" ;;
esac
# avoid race condition
@ -131,7 +127,6 @@ cleanup() {
mdevd) killall mdevd ;;
esac
# unmount pseudofs's
umount /dev /sys /proc
}