# LINUX-UPDATE-SYMLINKS(1) - man - phpMan

[LINUX-UPDATE-SYMLINKS(1)](https://www.chedong.com/phpMan.php/man/LINUX-UPDATE-SYMLINKS/1/markdown)               General Commands Manual              [LINUX-UPDATE-SYMLINKS(1)](https://www.chedong.com/phpMan.php/man/LINUX-UPDATE-SYMLINKS/1/markdown)



## NAME
       linux-update-symlinks - maintain symlinks to default kernel and initramfs


## SYNOPSIS
       **linux-update-symlinks** {**install**|**upgrade**|**remove**} _VERSION_ _IMAGE-PATH_


## DESCRIPTION
       **linux-update-symlinks**  is  intended  to  be  called  from  the postinst and postrm maintainer
       scripts of Linux kernel packages.  The postinst script must pass the first  argument  **install**
       or **upgrade** depending on whether a fresh installation or an upgrade has taken place.

       The _VERSION_ argument must be the kernel version string as shown by **uname** **-r** and used in file‐
       names.

       The _IMAGE-PATH_ argument must be the absolute filename of the kernel image.

       By default, this command maintains symlinks in the root directory.   This  behaviour  can  be
       modified by settings in _/etc/kernel-img.conf_:

       **image**___**dest**
              Specifies the directory in which to maintain symlinks
       **link**___**in**___**boot**
              If set to a true value, specifies that the directory is _/boot_
       **no**___**symlinks**
              If set to a false value, disables maintenance of symlinks

       The  symlinks  for the primary default kernel version are named _vmlinuz_ or _vmlinux_ (depending
       on whether the architecture normally uses compressed kernel images)  and  _initrd.img_  (if  it
       uses an initramfs).  The symlinks for the secondary default have the same names with the suf‐
       fix _.old_.

       If symlink maintenance is disabled, **linux-update-symlinks** does nothing, successfully.  Other‐
       wise it makes a list of kernel versions in decreasing order of priority:

       • The given _VERSION_, if the first argument is **install**

       • The current primary default version, if it exists and is not already listed

       • The current secondary default version, if it exists and is not already listed

       • All  other versions whose files are installed, excluding the specified _VERSION_ if the first
         argument is **remove**, in decreasing version order

       The top two entries on the list are the new primary and secondary default  versions,  and  it
       updates  the symlinks accordingly.  In case there is only one entry, this is both the primary
       and secondary default version.  If there are no entries, there are no default versions and it
       removes the default symlinks.


## ENVIRONMENT VARIABLES
       _INITRD_ When  the first argument is **install** or **upgrade**, **linux-update-symlinks** assumes that the
              given _VERSION_ will use an initramfs unless this variable is set to **No**.

## FILES
       _/boot/initrd.img-_*
              Installed initramfs images
       _/boot/vmlinuz-_* | _/boot/vmlinux-_*
              Installed kernel images
       _/etc/kernel-img.conf_
              Configuration file specifying whether and where to create symlinks
       _/initrd.img_
              Symlink to the initramfs image for the primary default version
       _/initrd.img.old_
              Symlink to the initramfs image for the secondary default version
       _/vmlinuz_ | _/vmlinux_
              Symlink to the kernel image for the primary default version
       _/vmlinuz.old_ | _/vmlinux.old_
              Symlink to the kernel image for the secondary default version

## AUTHOR
       **linux-update-symlinks** and this manual page were written by Ben Hutchings as part of  the  De‐
       bian **linux-base** package.

## SEE ALSO
       [_kernel-img.conf_(5)](https://www.chedong.com/phpMan.php/man/kernel-img.conf/5/markdown), [_linux-version_(1)](https://www.chedong.com/phpMan.php/man/linux-version/1/markdown).



                                             5 June 2016                    [LINUX-UPDATE-SYMLINKS(1)](https://www.chedong.com/phpMan.php/man/LINUX-UPDATE-SYMLINKS/1/markdown)
