sortix-mirror/update-initrd/update-initrd.8
Jonas 'Sortie' Termansen e933eb5a1c Replace mkinitrd(1) with tar(1).
The custom initrd format was originally useful when it was mounted,
however it has been extracted into the ramfs for a very long time and
has no advantages over the standard tar format which can be readily
created and modified using standard tools. The kernel initrd(7) support
already supports tar, so this change simply switches the format.
2023-07-12 21:45:11 +02:00

74 lines
1.5 KiB
Groff

.Dd October 6, 2015
.Dt UPDATE-INITRD 8
.Os
.Sh NAME
.Nm update-initrd
.Nd generate initialization ramdisk
.Sh SYNOPSIS
.Nm update-initrd
.Op Fl \-sysroot Ns "=" Ns Ar sysroot
.Sh DESCRIPTION
.Nm update-initrd
generates the
.Pa /boot/sortix.initrd
.Xr initrd 7
containing a minimal system that searches for the root filesystem and chain
boots it as described in
.Xr initrd 7
and
.Xr init 8 .
It contains an init system, fsck, filesystem drivers and configuration.
.Pp
The produced minimal system contains copies of
.Xr fstab 5 ,
.Xr extfs 8 ,
.Xr fsck.ext2 8 ,
and
.Xr init 8 .
If any of those files are updated then the
.Xr initrd 7
should be regenerated by invoking
.Nm .
.Pp
.Nm
is aware of
.Xr sysmerge 8
pending upgrades and will instead invoke the new
.Nm
in
.Pa /sysmerge
if an upgrade is pending.
.Nm
is written as a script so the initrd of the new system can produced even
across incompatible ABI changes.
.Pp
The options are as follows:
.Bl -tag -width "12345678"
.It Fl \-sysroot Ns "=" Ns Ar sysroot
Rather than generating an
.Xr initrd 7
for the root filesystem, locate files in the
.Ar sysroot
directory instead and store the result as
.Ar sysroot Ns Pa /boot/sortix.initrd .
.El
.Sh FILES
.Bl -tag -width "/sbin/fsck.ext2" -compact
.It Pa /etc/fstab
.It Pa /sbin/extfs
.It Pa /sbin/fsck.ext2
.It Pa /sbin/init
.El
.Sh EXIT STATUS
.Nm
will exit 0 on success and non-zero otherwise.
.Sh SEE ALSO
.Xr tar 1 ,
.Xr fstab 5 ,
.Xr initrd 7 ,
.Xr disked 8 ,
.Xr extfs 8 ,
.Xr init 8 ,
.Xr sysmerge 8 ,
.Xr update-grub 8