wiki/HowtoDebian/Backports.md
2018-04-17 17:35:20 +02:00

105 lines
3.2 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.**
# Howto Debian backports
Une distribution stable de Debian garde en permanence (ou presque) les mêmes versions des logiciels (c'est le principe d'une version stable). Certaines versions plus récentes sont néanmoins distribuées via des paquets Debian de _backports_.
## Utilisation
Pour disposer des backports, on ajoutera le dépôt Debian Backports dans un fichier `/etc/apt/sources.list.d/backports.list` :
~~~
deb http://mirror.evolix.org/debian jessie-backports main
~~~
On utilisera le _pinning APT_ pour bénéficier des mises-à-jour régulières en créant le fichier `/etc/apt/preferences.d/backports` ainsi, par exemple pour les paquets Samba :
~~~
Package: *
Pin: release n=jessie-backports
Pin-Priority: 50
Package: samba samba-common samba-common-bin libwbclient0
Pin: release n=jessie-backports
Pin-Priority: 999
~~~
## Mise-à-jour du noyau Linux
Pour Squeeze :
~~~
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
~~~
~~~
# aptitude install linux-image-3.2.0-0.bpo.4-amd64 initramfs-tools=0.99~bpo60+1 linux-base=3.4~bpo60+1 firmware-bnx2=0.36+wheezy.1~bpo60+1
~~~
## [Stretch] Créer une image CD netinst avec un kernel backporté stretch-backports
~~~
# apt build-dep debian-installer
~~~
~~~
# dpkg-checkbuilddeps
~~~
~~~
$ apt-get source debian-installer
$ cd debian-installer-20170615+deb9u3/build
~~~
Éditer le fichier ./build/config/amd64.cfg:
~~~
KERNELVERSION = 4.15.0-0.bpo.2-amd64
KERNELMAJOR = 4.15
~~~
Éditer le fichier ./build/config/common:
~~~
LINUX_KERNEL_ABI ?= 4.15.0-0.bpo.2
DEBIAN_RELEASE = stretch
USE_UDEBS_FROM ?= stable
~~~
Éditer le fichier ./build/sources.list.udeb.local :
~~~
deb http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch main/debian-installer
deb http://deb.debian.org/debian stretch-backports main/debian-installer
~~~
~~~
# make reallyclean
# fakeroot make build_netboot
[...]
install -m 644 -D ./tmp/netboot/mini.iso dest/netboot/mini.iso
update-manifest dest/netboot/mini.iso "tiny CD image that boots the netboot installer" ./tmp/netboot/udeb.list
~~~
Si tout se passe bien, vous obtiendrez un nouvel ISO:
~~~
$ file ./tmp/netboot/mini.iso dest/netboot/mini.iso
./tmp/netboot/mini.iso: DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 240, 832 sectors; partition 3 : ID=0x1, start-CHS (0x25,0,1), end-CHS (0x2a,63,32), startsector 75776, 12288 sectors
dest/netboot/mini.iso: DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 240, 832 sectors; partition 3 : ID=0x1, start-CHS (0x25,0,1), end-CHS (0x2a,63,32), startsector 75776, 12288 sectors
~~~
Pour copier le fichier ISO sur une clé USB:
~~~
$ cat dest/netboot/mini.iso > /dev/sdX
$ fdisk -l /dev/sdX
Disque /dev/sdX : 14,6 GiB, 15664676864 octets, 30595072 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x0421e6d7
~~~