| 1 |
.TH LINUX-UPDATE-SYMLINKS 1 "5 June 2016" |
| 2 |
.SH NAME |
| 3 |
linux\-update\-symlinks \- maintain symlinks to default kernel and initramfs |
| 4 |
|
| 5 |
.SH SYNOPSIS |
| 6 |
.HP |
| 7 |
.BR linux\-update\-symlinks \ { install | upgrade | remove } |
| 8 |
.I KERNEL\-VER IMAGE\-PATH |
| 9 |
|
| 10 |
.SH DESCRIPTION |
| 11 |
\fBlinux\-update\-symlinks\fR is intended to be called from the |
| 12 |
postinst and postrm maintainer scripts of Linux kernel packages. The |
| 13 |
postinst script must pass the first argument \fBinstall\fR or |
| 14 |
\fBupgrade\fR depending on whether a fresh installation or an upgrade |
| 15 |
has taken place. |
| 16 |
.PP |
| 17 |
The \fIKERNEL\-VER\fR argument must be the kernel version string as shown by |
| 18 |
\fBuname \-r\fR and used in filenames, not the package version. |
| 19 |
.PP |
| 20 |
The \fIIMAGE\-PATH\fR argument must be the absolute filename of the |
| 21 |
kernel image. |
| 22 |
.PP |
| 23 |
By default, this command maintains symlinks in the root directory. |
| 24 |
This behaviour can be modified by settings in |
| 25 |
\fI/etc/kernel\-img.conf\fR: |
| 26 |
.TP |
| 27 |
.PD 0 |
| 28 |
.B image_dest |
| 29 |
Specifies the directory in which to maintain symlinks |
| 30 |
.TP |
| 31 |
.B link_in_boot |
| 32 |
If set to a true value, specifies that the directory is \fI/boot\fR |
| 33 |
.TP |
| 34 |
.B do_symlinks |
| 35 |
If set to a false value, disables maintenance of symlinks |
| 36 |
.PD 1 |
| 37 |
.PP |
| 38 |
The symlinks for the primary default kernel version are named |
| 39 |
\fIvmlinuz\fR or \fIvmlinux\fR (depending on whether the architecture |
| 40 |
normally uses compressed kernel images) and \fIinitrd.img\fR (if it |
| 41 |
uses an initramfs). The symlinks for the secondary default have the |
| 42 |
same names with the suffix \fI.old\fR. |
| 43 |
.PP |
| 44 |
If symlink maintenance is disabled, \fBlinux\-update\-symlinks\fR does |
| 45 |
nothing, successfully. Otherwise it makes a list of kernel versions |
| 46 |
in decreasing order of priority: |
| 47 |
.IP \(bu 2 |
| 48 |
The given \fIKERNEL\-VER\fR, if the first argument is \fBinstall\fR |
| 49 |
.IP \(bu 2 |
| 50 |
The current primary default version, if it exists and is not already |
| 51 |
listed |
| 52 |
.IP \(bu 2 |
| 53 |
The current secondary default version, if it exists and is not already |
| 54 |
listed |
| 55 |
.IP \(bu 2 |
| 56 |
All other versions whose files are installed, excluding the specified |
| 57 |
\fIKERNEL\-VER\fR if the first argument is \fBremove\fR, in decreasing |
| 58 |
version order |
| 59 |
.PP |
| 60 |
The top two entries on the list are the new primary and secondary |
| 61 |
default versions, and it updates the symlinks accordingly. In case |
| 62 |
there is only one entry, this is both the primary and secondary |
| 63 |
default version. If there are no entries, there are no default |
| 64 |
versions and it removes the default symlinks. |
| 65 |
|
| 66 |
.SH ENVIRONMENT VARIABLES |
| 67 |
.PD 0 |
| 68 |
.TP |
| 69 |
.B INITRD |
| 70 |
When the first argument is \fBinstall\fR or \fBupgrade\fR, |
| 71 |
\fBlinux\-update\-symlinks\fR assumes that the given \fIKERNEL\-VER\fR |
| 72 |
will use an initramfs unless this variable is set to \fBNo\fR. |
| 73 |
|
| 74 |
.SH FILES |
| 75 |
.PD 0 |
| 76 |
.TP |
| 77 |
.IR /boot/initrd.img\- * |
| 78 |
Installed initramfs images |
| 79 |
.TP |
| 80 |
.IR /boot/vmlinuz\- *\ |\ /boot/vmlinux\- * |
| 81 |
Installed kernel images |
| 82 |
.TP |
| 83 |
.I /etc/kernel-img.conf |
| 84 |
Configuration file specifying whether and where to create symlinks |
| 85 |
.TP |
| 86 |
.I /initrd.img |
| 87 |
Symlink to the initramfs image for the primary default version |
| 88 |
.TP |
| 89 |
.I /initrd.img.old |
| 90 |
Symlink to the initramfs image for the secondary default version |
| 91 |
.TP |
| 92 |
.IR /vmlinuz \ |\ /vmlinux |
| 93 |
Symlink to the kernel image for the primary default version |
| 94 |
.TP |
| 95 |
.IR /vmlinuz.old \ |\ /vmlinux.old |
| 96 |
Symlink to the kernel image for the secondary default version |
| 97 |
|
| 98 |
.SH AUTHOR |
| 99 |
\fBlinux\-update\-symlinks\fR and this manual page were written by Ben |
| 100 |
Hutchings as part of the Debian \fBlinux\-base\fR package. |
| 101 |
|
| 102 |
.SH SEE ALSO |
| 103 |
.IR kernel\-img.conf (5), |
| 104 |
.IR linux\-version (1). |