overlayfs
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| overlayfs [2016/10/26 21:29] – simon | overlayfs [Date inconnue] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== OverlayFS ====== | ||
| - | ===== Installation ===== | ||
| - | <code bash> | ||
| - | $ sudo apt-get install overlayroot | ||
| - | </ | ||
| - | |||
| - | ===== Configuration ===== | ||
| - | Sur une Ubuntu 14.04: | ||
| - | <code bash> | ||
| - | $ sudo vim / | ||
| - | (...) | ||
| - | overlayroot_cfgdisk=" | ||
| - | overlayroot=" | ||
| - | </ | ||
| - | |||
| - | Sur une Ubuntu 16.04, j'ai du activer le SWAP pour que ça fonctionne : | ||
| - | <code bash> | ||
| - | $ sudo vim / | ||
| - | (...) | ||
| - | overlayroot_cfgdisk=" | ||
| - | overlayroot=" | ||
| - | </ | ||
| - | |||
| - | Après avoir modifié le fichier '' | ||
| - | <code bash> | ||
| - | $ sudo reboot | ||
| - | </ | ||
| - | |||
| - | Le kernel ne charge pas forcément overlay au boot, pour vérifier : | ||
| - | <code bash> | ||
| - | $ lsmod | grep overlay | ||
| - | overlay | ||
| - | </ | ||
| - | |||
| - | Si la commande précédente ne renvoie rien, on peut forcément le chargement du module avec [[: | ||
| - | <code bash> | ||
| - | $ sudo modprobe overlay | ||
| - | </ | ||
| - | (La commande [[: | ||
| - | |||
| - | <code bash> | ||
| - | $ modinfo overlay | ||
| - | filename: | ||
| - | alias: | ||
| - | alias: | ||
| - | alias: | ||
| - | license: | ||
| - | description: | ||
| - | author: | ||
| - | srcversion: | ||
| - | depends: | ||
| - | intree: | ||
| - | vermagic: | ||
| - | </ | ||
| - | |||
| - | Pour que le module '' | ||
| - | <code bash> | ||
| - | $ sudo vim / | ||
| - | $ sudo cat / | ||
| - | # / | ||
| - | # | ||
| - | # This file contains the names of kernel modules that should be loaded | ||
| - | # at boot time, one per line. Lines beginning with "#" | ||
| - | overlay | ||
| - | </ | ||
| - | ===== Vérifications ===== | ||
| - | On peut vérifier dans /etc/fstab et /etc/mtab les changements : | ||
| - | |||
| - | <code bash>$ cat /etc/mtab | ||
| - | overlayroot / overlayfs rw, | ||
| - | proc /proc proc rw, | ||
| - | sysfs /sys sysfs rw, | ||
| - | none / | ||
| - | none / | ||
| - | none / | ||
| - | none / | ||
| - | udev /dev devtmpfs rw, | ||
| - | devpts /dev/pts devpts rw, | ||
| - | tmpfs /run tmpfs rw, | ||
| - | none /run/lock tmpfs rw, | ||
| - | none /run/shm tmpfs rw, | ||
| - | none /run/user tmpfs rw, | ||
| - | none / | ||
| - | /dev/sda1 / | ||
| - | tmpfs-root / | ||
| - | /dev/sda6 /media/data vfat rw, | ||
| - | systemd / | ||
| - | gvfsd-fuse / | ||
| - | /proc / | ||
| - | /run / | ||
| - | /sys / | ||
| - | </ | ||
| - | |||
| - | <code bash> | ||
| - | $ cat /etc/fstab | ||
| - | # | ||
| - | # This fstab is in an overlayfs. | ||
| - | # / | ||
| - | # The original entry for '/' | ||
| - | # under / | ||
| - | # To permanently modify this (or any other file), you should change-root into | ||
| - | # a writable view of the underlying filesystem using: | ||
| - | # sudo overlayroot-chroot | ||
| - | # | ||
| - | # /etc/fstab: static file system information. | ||
| - | # | ||
| - | # Use ' | ||
| - | # device; this may be used with UUID= as a more robust way to name devices | ||
| - | # that works even if disks are added and removed. See fstab(5). | ||
| - | # | ||
| - | # <file system> <mount point> < | ||
| - | # / was on /dev/sda1 during installation | ||
| - | #bkp: | ||
| - | UUID=23568d1b-88a5-4a9e-83cb-d97fdfcf57de / ext2 errors=remount-ro 0 1 | ||
| - | # /media/data was on /dev/sda6 during installation | ||
| - | UUID=1851-AC68 /media/data vfat utf8, | ||
| - | # swap was on /dev/sda5 during installation | ||
| - | UUID=037cea84-169f-4fd6-a56a-97994591af17 none swap sw 0 0 | ||
| - | </ | ||
| - | |||
| - | ===== Désactiver Overlayroot ===== | ||
| - | Pour accéder à la partition racine réellement et pouvoir la modifier malgré Overlayroot, | ||
| - | |||
| - | <code bash> | ||
| - | $ sudo overlayroot-chroot | ||
| - | root@ordi:/# | ||
| - | root@ordi:/# | ||
| - | </ | ||
| - | |||
| - | Pour désactiver OverlayFS, on modifie le fichier de configuration dans le chroot et on redémarre : | ||
| - | <code bash> | ||
| - | alx@systems: | ||
| - | [sudo] password for alx: | ||
| - | INFO: Chrooting into [/ | ||
| - | root@systems:/# | ||
| - | (...) | ||
| - | overlayroot="" | ||
| - | # | ||
| - | (...) | ||
| - | root@systems:/# | ||
| - | exit | ||
| - | alx@systems: | ||
| - | </ | ||
| - | |||
| - | ===== Réactiver overlayfs ===== | ||
| - | <code bash> | ||
| - | alx@systems: | ||
| - | (...) | ||
| - | # | ||
| - | overlayroot=" | ||
| - | (...) | ||
| - | alx@systems: | ||
| - | </ | ||
| - | |||
| - | ===== Problèmes de réseau ===== | ||
| - | J'ai eu des problème avec " | ||
| - | |||
| - | <code bash> | ||
| - | alx@systems: | ||
| - | [sudo] password for alx: | ||
| - | INFO: Chrooting into [/ | ||
| - | root@systems:/# | ||
| - | root@systems:/# | ||
| - | exit | ||
| - | alx@systems: | ||
| - | </ | ||
| - | |||
| - | ===== Sources ===== | ||
| - | * [[http:// | ||
| - | * [[https:// | ||
overlayfs.1477517372.txt.gz · Dernière modification : (modification externe)
