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 | ||
elearning:workbooks:debian:6:avance:l103 [2020/03/01 08:23] – supprimée admin | elearning:workbooks:debian:6:avance:l103 [2020/08/07 16:18] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ~~PDF: | ||
+ | |||
+ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
+ | |||
+ | ======LDF303 - Gestion du Noyau et des Quotas====== | ||
+ | |||
+ | =====Contenu du Module===== | ||
+ | |||
+ | * **LDF303 - Gestion du Noyau et des Quotas** | ||
+ | * Rôle du noyau | ||
+ | * Compilation et installation du noyau et des modules | ||
+ | * Déplacer /home | ||
+ | * Télécharger le Code Source du Noyau | ||
+ | * Configurer le Noyau | ||
+ | * La Commande make-kpkg | ||
+ | * Compiler le Noyau | ||
+ | * Installer le Nouveau Noyau | ||
+ | * Désinstaller un Noyau | ||
+ | * Gestion des Quotas | ||
+ | * La Commande quotacheck | ||
+ | * La Commande edquota | ||
+ | * La Commande quotaon | ||
+ | * La Commande repquota | ||
+ | * La Commande quota | ||
+ | * La Commande warnquota | ||
+ | |||
+ | =====Rôle du noyau===== | ||
+ | |||
+ | Le noyau ou //kernel// est la partie du système d' | ||
+ | |||
+ | * la diminution de la taille du noyau, | ||
+ | * la prise en charge de nouveau matériel, | ||
+ | * l' | ||
+ | * l' | ||
+ | * la correction de bogues, | ||
+ | * le besoin d'une fonctionnalité expérimentale. | ||
+ | |||
+ | Commencez par identifier le noyau utilisé par votre machine : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | 3.16.0-4-amd64 | ||
+ | </ | ||
+ | |||
+ | Dans le cas d'une utilisation courante de Linux, il est cependant préférable de faire appel aux **modules**. Les modules se trouvent dans le répertoire **/ | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | kernel | ||
+ | modules.alias | ||
+ | modules.alias.bin | ||
+ | </ | ||
+ | |||
+ | Les commandes pour manipuler les modules sont : | ||
+ | |||
+ | * insmod | ||
+ | * rmmod | ||
+ | * lsmod | ||
+ | * modprobe | ||
+ | |||
+ | Par exemple : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | Module | ||
+ | cfg80211 | ||
+ | rfkill | ||
+ | nfsd 263032 | ||
+ | auth_rpcgss | ||
+ | oid_registry | ||
+ | nfs_acl | ||
+ | nfs | ||
+ | lockd 83389 2 nfs,nfsd | ||
+ | fscache | ||
+ | sunrpc | ||
+ | crc32_pclmul | ||
+ | aesni_intel | ||
+ | joydev | ||
+ | aes_x86_64 | ||
+ | lrw 12757 1 aesni_intel | ||
+ | gf128mul | ||
+ | glue_helper | ||
+ | i2c_piix4 | ||
+ | ablk_helper | ||
+ | cryptd | ||
+ | ppdev 16782 0 | ||
+ | i2c_core | ||
+ | serio_raw | ||
+ | evdev 17445 7 | ||
+ | pcspkr | ||
+ | parport_pc | ||
+ | snd_intel8x0 | ||
+ | snd_ac97_codec | ||
+ | snd_pcm | ||
+ | snd_timer | ||
+ | snd 65244 4 snd_ac97_codec, | ||
+ | ac | ||
+ | soundcore | ||
+ | video 18096 0 | ||
+ | battery | ||
+ | ac97_bus | ||
+ | parport | ||
+ | button | ||
+ | processor | ||
+ | thermal_sys | ||
+ | fuse | ||
+ | autofs4 | ||
+ | ext4 473801 | ||
+ | crc16 12343 1 ext4 | ||
+ | mbcache | ||
+ | jbd2 | ||
+ | hid_generic | ||
+ | usbhid | ||
+ | hid | ||
+ | sr_mod | ||
+ | cdrom 47424 1 sr_mod | ||
+ | ohci_pci | ||
+ | sg | ||
+ | sd_mod | ||
+ | crc_t10dif | ||
+ | crct10dif_generic | ||
+ | ata_generic | ||
+ | ohci_hcd | ||
+ | ehci_pci | ||
+ | ehci_hcd | ||
+ | ata_piix | ||
+ | e1000 | ||
+ | ahci | ||
+ | libahci | ||
+ | crct10dif_pclmul | ||
+ | crct10dif_common | ||
+ | usbcore | ||
+ | usb_common | ||
+ | crc32c_intel | ||
+ | libata | ||
+ | scsi_mod | ||
+ | psmouse | ||
+ | </ | ||
+ | |||
+ | Pour ajouter un module, on peut utiliser la commande **insmod** ou **modprobe**. Cette dernière ajoute non seulement le module passé en argument mais également ses dépendances : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | Module | ||
+ | bonding | ||
+ | cfg80211 | ||
+ | rfkill | ||
+ | nfsd 263032 | ||
+ | auth_rpcgss | ||
+ | oid_registry | ||
+ | nfs_acl | ||
+ | nfs | ||
+ | lockd 83389 2 nfs,nfsd | ||
+ | fscache | ||
+ | sunrpc | ||
+ | crc32_pclmul | ||
+ | aesni_intel | ||
+ | joydev | ||
+ | aes_x86_64 | ||
+ | lrw 12757 1 aesni_intel | ||
+ | gf128mul | ||
+ | glue_helper | ||
+ | i2c_piix4 | ||
+ | ablk_helper | ||
+ | cryptd | ||
+ | ppdev 16782 0 | ||
+ | --More-- | ||
+ | </ | ||
+ | |||
+ | Pour supprimer un module, on peut utiliser la commande **rmmod** ou **modprobe -r**. Cette dernière essaie de supprimer les dépendances non-utilisées : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | Module | ||
+ | cfg80211 | ||
+ | rfkill | ||
+ | nfsd 263032 | ||
+ | auth_rpcgss | ||
+ | oid_registry | ||
+ | nfs_acl | ||
+ | nfs | ||
+ | lockd 83389 2 nfs,nfsd | ||
+ | fscache | ||
+ | sunrpc | ||
+ | crc32_pclmul | ||
+ | aesni_intel | ||
+ | joydev | ||
+ | aes_x86_64 | ||
+ | lrw 12757 1 aesni_intel | ||
+ | gf128mul | ||
+ | glue_helper | ||
+ | i2c_piix4 | ||
+ | ablk_helper | ||
+ | cryptd | ||
+ | ppdev 16782 0 | ||
+ | i2c_core | ||
+ | --More-- | ||
+ | </ | ||
+ | |||
+ | Les dépendances des modules sont résolues par la commande **modprobe** grâce aux fichier **/ | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | w.ko kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | 6_64.ko kernel/ | ||
+ | o kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | o/ | ||
+ | x86/ | ||
+ | kernel/ | ||
+ | el/ | ||
+ | | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | --More--(0%) | ||
+ | </ | ||
+ | |||
+ | Il est possible d' | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | filename: | ||
+ | author: | ||
+ | description: | ||
+ | version: | ||
+ | license: | ||
+ | alias: | ||
+ | srcversion: | ||
+ | depends: | ||
+ | intree: | ||
+ | vermagic: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | </ | ||
+ | |||
+ | Dernièrement, | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | fbdev-blacklist.conf | ||
+ | |||
+ | root@debian8: | ||
+ | # This file blacklists most old-style PCI framebuffer drivers. | ||
+ | |||
+ | blacklist arkfb | ||
+ | blacklist aty128fb | ||
+ | blacklist atyfb | ||
+ | blacklist radeonfb | ||
+ | blacklist cirrusfb | ||
+ | blacklist cyber2000fb | ||
+ | blacklist kyrofb | ||
+ | blacklist matroxfb_base | ||
+ | blacklist mb862xxfb | ||
+ | blacklist neofb | ||
+ | blacklist pm2fb | ||
+ | blacklist pm3fb | ||
+ | blacklist s3fb | ||
+ | blacklist savagefb | ||
+ | blacklist sisfb | ||
+ | blacklist tdfxfb | ||
+ | blacklist tridentfb | ||
+ | blacklist vt8623fb | ||
+ | </ | ||
+ | |||
+ | =====Compilation et installation du noyau et des modules===== | ||
+ | |||
+ | Commencez par installer les paquets necessaires : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | |||
+ | root@debian8: | ||
+ | Reading package lists... Done | ||
+ | Building dependency tree | ||
+ | Reading state information... Done | ||
+ | Note, selecting ' | ||
+ | The following extra packages will be installed: | ||
+ | autopoint binutils dblatex docbook-dsssl docbook-utils docbook-xsl fonts-lmodern fonts-texgyre g++ g++-4.9 gcc gcc-4.9 gettext intltool-debian jadetex kernel-common | ||
+ | libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan1 libasprintf-dev libatomic1 libc-dev-bin libc6-dev libcilkrts5 libdpkg-perl | ||
+ | libfakeroot libfile-fcntllock-perl libfile-homedir-perl libfile-which-perl libgcc-4.9-dev libgettextpo-dev libgettextpo0 libitm1 liblsan0 libmail-sendmail-perl | ||
+ | libosp5 libostyle1c2 libpoppler-qt4-4 libpotrace0 libptexenc1 libruby2.1 libsgmls-perl libsp1c2 libstdc++-4.9-dev libsynctex1 libsys-hostname-long-perl libtcl8.6 | ||
+ | libtinfo-dev libtk8.6 libtsan0 libubsan0 libunistring0 libxml2-utils libxss1 libyaml-0-2 libyaml-tiny-perl libzzip-0-13 linux-libc-dev lmodern make manpages-dev | ||
+ | openjade po-debconf prerex preview-latex-style prosper ps2eps ruby ruby2.1 rubygems-integration sgmlspl sp tcl tcl8.6 tex-common tex-gyre texlive texlive-base | ||
+ | texlive-bibtex-extra texlive-binaries texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-fonts-recommended-doc texlive-generic-recommended | ||
+ | texlive-latex-base texlive-latex-base-doc texlive-latex-extra texlive-latex-extra-doc texlive-latex-recommended texlive-latex-recommended-doc texlive-math-extra | ||
+ | texlive-pictures texlive-pictures-doc texlive-pstricks texlive-pstricks-doc tipa tk tk8.6 vprerex xmlto xsltproc zip | ||
+ | Suggested packages: | ||
+ | binutils-doc docbook graphicsmagick-imagemagick-compat imagemagick latex-cjk-all opensp texlive-lang-all texlive-lang-cyrillic texlive-xetex transfig dh-make | ||
+ | docbook-dsssl-doc dbtoepub docbook-xsl-doc-html docbook-xsl-doc-pdf docbook-xsl-doc-text docbook-xsl-doc docbook-xsl-saxon fop libsaxon-java libxalan2-java | ||
+ | libxslthl-java xalan debian-keyring g++-multilib g++-4.9-multilib gcc-4.9-doc libstdc++6-4.9-dbg gcc-multilib autoconf automake libtool flex bison gdb gcc-doc | ||
+ | gcc-4.9-multilib gcc-4.9-locales libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan1-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg | ||
+ | libquadmath0-dbg gettext-doc linux-source libncurses-dev glibc-doc ncurses-doc sgmls-doc libstdc++-4.9-doc make-doc doc-base libmail-box-perl ri ruby-dev bundler | ||
+ | tcl-tclreadline perl-tk latexdiff latexmk dvidvi fragmaster lacheck purifyeps xindy chktex dvipng psutils t1utils libtcltk-ruby dot2tex xmltex | ||
+ | Recommended packages: | ||
+ | uboot-mkimage wish | ||
+ | The following NEW packages will be installed: | ||
+ | autopoint binutils build-essential dblatex debconf-utils debhelper docbook-dsssl docbook-utils docbook-xsl dpkg-dev fakeroot fonts-lmodern fonts-texgyre g++ g++-4.9 | ||
+ | gcc gcc-4.9 gettext intltool-debian jadetex kernel-common kernel-package libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan1 | ||
+ | libasprintf-dev libatomic1 libc-dev-bin libc6-dev libcilkrts5 libdpkg-perl libfakeroot libfile-fcntllock-perl libfile-homedir-perl libfile-which-perl libgcc-4.9-dev | ||
+ | libgettextpo-dev libgettextpo0 libitm1 liblsan0 libmail-sendmail-perl libncurses5-dev libosp5 libostyle1c2 libpoppler-qt4-4 libpotrace0 libptexenc1 libruby2.1 | ||
+ | libsgmls-perl libsp1c2 libstdc++-4.9-dev libsynctex1 libsys-hostname-long-perl libtcl8.6 libtinfo-dev libtk8.6 libtsan0 libubsan0 libunistring0 libxml2-utils | ||
+ | libxss1 libyaml-0-2 libyaml-tiny-perl libzzip-0-13 linux-libc-dev lmodern make manpages-dev openjade po-debconf prerex preview-latex-style prosper ps2eps ruby | ||
+ | ruby2.1 rubygems-integration sgmlspl sp tcl tcl8.6 tex-common tex-gyre texlive texlive-base texlive-bibtex-extra texlive-binaries texlive-extra-utils | ||
+ | texlive-font-utils texlive-fonts-recommended texlive-fonts-recommended-doc texlive-generic-recommended texlive-latex-base texlive-latex-base-doc texlive-latex-extra | ||
+ | texlive-latex-extra-doc texlive-latex-recommended texlive-latex-recommended-doc texlive-math-extra texlive-pictures texlive-pictures-doc texlive-pstricks | ||
+ | texlive-pstricks-doc tipa tk tk8.6 vprerex xmlto xsltproc zip | ||
+ | 0 upgraded, 111 newly installed, 0 to remove and 0 not upgraded. | ||
+ | Need to get 793 MB of archives. | ||
+ | After this operation, 1,343 MB of additional disk space will be used. | ||
+ | Do you want to continue? [Y/n] Y | ||
+ | ... | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | <WRAP center round alert> | ||
+ | **Important** - Il n'est pas conseillé de compiler en tant que root pour des raisons de sécurité. Pour pouvoir utiliser le compte d'un utilisateur pour créer un nouveau noyau, celui-ci doit disposer de plusieurs Go d' | ||
+ | </ | ||
+ | |||
+ | Ajoutez l' | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | src:x:40: | ||
+ | root@debian8: | ||
+ | Adding user trainee to group src | ||
+ | root@debian8: | ||
+ | src: | ||
+ | </ | ||
+ | |||
+ | ====Déplacer /home==== | ||
+ | |||
+ | <WRAP center round todo> | ||
+ | **A Faire** - Arrêtez votre machine virtuelle. Ajoutez un deuxième disque de 20 Go au contrôleur SATA en utilisant la section **Stockage** des paramètres de la machine virtuelle. Le format du disque doit être **vmdk**. Nommez ce disque **DebianHome** et re-démarrez la machine virtuelle. | ||
+ | </ | ||
+ | |||
+ | Créez une seule partition sur **/ | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | |||
+ | Welcome to fdisk (util-linux 2.25.2). | ||
+ | Changes will remain in memory only, until you decide to write them. | ||
+ | Be careful before using the write command. | ||
+ | |||
+ | Device does not contain a recognized partition table. | ||
+ | Created a new DOS disklabel with disk identifier 0x5b6171fe. | ||
+ | |||
+ | Command (m for help): n | ||
+ | Partition type | ||
+ | | ||
+ | | ||
+ | Select (default p): p | ||
+ | Partition number (1-4, default 1): | ||
+ | First sector (2048-41943039, | ||
+ | Last sector, +sectors or +size{K, | ||
+ | |||
+ | Created a new partition 1 of type ' | ||
+ | |||
+ | Command (m for help): w | ||
+ | The partition table has been altered. | ||
+ | Calling ioctl() to re-read partition table. | ||
+ | Syncing disks. | ||
+ | </ | ||
+ | |||
+ | Créez maintenant un système de fichiers ext4 sur **/ | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | mke2fs 1.42.12 (29-Aug-2014) | ||
+ | Creating filesystem with 5242624 4k blocks and 1310720 inodes | ||
+ | Filesystem UUID: 6e4ea901-a36d-4b3f-bbbf-eeea866fca40 | ||
+ | Superblock backups stored on blocks: | ||
+ | 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, | ||
+ | 4096000 | ||
+ | |||
+ | Allocating group tables: done | ||
+ | Writing inode tables: done | ||
+ | Creating journal (32768 blocks): done | ||
+ | Writing superblocks and filesystem accounting information: | ||
+ | </ | ||
+ | |||
+ | <WRAP center round todo> | ||
+ | **A Faire** - Déconnectez-vous en ssh. Connectez-vous directement en tant que root dans la fenetre de VirtualBox. | ||
+ | </ | ||
+ | |||
+ | Montez **/ | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | Copiez le contenu de /home vers /mnt : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | Démontez /dev/sdb1 et déplacez /home vers /root : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | Identifiez l'UUID de /dev/sdb1 : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | lrwxrwxrwx 1 root root 10 Aug 13 12:26 6e4ea901-a36d-4b3f-bbbf-eeea866fca40 -> ../../sdb1 | ||
+ | </ | ||
+ | |||
+ | Editez le fichier **/ | ||
+ | |||
+ | <file txt / | ||
+ | # /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 | ||
+ | UUID=4a230056-285f-42f4-bfe0-5a73dbc5b745 / | ||
+ | # swap was on /dev/sda5 during installation | ||
+ | UUID=da5a77e9-344d-42aa-aed6-a38d381ba436 none swap sw 0 0 | ||
+ | UUID=6e4ea901-a36d-4b3f-bbbf-eeea866fca40 / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Créez le point de montage /home : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | Montez /dev/sdb1 : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | sysfs on /sys type sysfs (rw, | ||
+ | proc on /proc type proc (rw, | ||
+ | udev on /dev type devtmpfs (rw, | ||
+ | devpts on /dev/pts type devpts (rw, | ||
+ | tmpfs on /run type tmpfs (rw, | ||
+ | /dev/sda1 on / type ext4 (rw, | ||
+ | securityfs on / | ||
+ | tmpfs on /dev/shm type tmpfs (rw, | ||
+ | tmpfs on /run/lock type tmpfs (rw, | ||
+ | tmpfs on / | ||
+ | cgroup on / | ||
+ | pstore on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | systemd-1 on / | ||
+ | debugfs on / | ||
+ | mqueue on /dev/mqueue type mqueue (rw, | ||
+ | hugetlbfs on / | ||
+ | fusectl on / | ||
+ | rpc_pipefs on / | ||
+ | tmpfs on /run/user/0 type tmpfs (rw, | ||
+ | tmpfs on / | ||
+ | /dev/sdb1 on /home type ext4 (rw, | ||
+ | </ | ||
+ | |||
+ | Notez la taille de /home : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | Filesystem | ||
+ | / | ||
+ | udev | ||
+ | tmpfs 99M 4.8M | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs 50M | ||
+ | tmpfs 50M | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | <WRAP center round todo> | ||
+ | **A Faire** - Fermez la session de root et connectez-vous en tant que trainee en ssh. | ||
+ | </ | ||
+ | |||
+ | ====Télécharger le Code Source du Noyau==== | ||
+ | |||
+ | Le code source est disponible sur le site **www.kernel.org** : | ||
+ | |||
+ | < | ||
+ | trainee@debian8: | ||
+ | --2016-08-13 12: | ||
+ | Resolving www.kernel.org (www.kernel.org)... 198.145.20.140, | ||
+ | Connecting to www.kernel.org (www.kernel.org)|198.145.20.140|: | ||
+ | HTTP request sent, awaiting response... 404 Not Found | ||
+ | 2016-08-13 12:37:53 ERROR 404: Not Found. | ||
+ | |||
+ | trainee@debian8: | ||
+ | --2016-08-13 12: | ||
+ | Resolving www.kernel.org (www.kernel.org)... 198.145.20.140, | ||
+ | Connecting to www.kernel.org (www.kernel.org)|198.145.20.140|: | ||
+ | HTTP request sent, awaiting response... 200 OK | ||
+ | Length: 80487456 (77M) [application/ | ||
+ | Saving to: ‘linux-3.16.1.tar.xz’ | ||
+ | |||
+ | linux-3.16.1.tar.xz | ||
+ | |||
+ | 2016-08-13 12:40:15 (2.08 MB/s) - ‘linux-3.16.1.tar.xz’ saved [80487456/ | ||
+ | </ | ||
+ | |||
+ | Désarchivez le tar.xz que vous avez téléchargé : | ||
+ | |||
+ | < | ||
+ | trainee@debian8: | ||
+ | </ | ||
+ | |||
+ | Notez que l' | ||
+ | |||
+ | < | ||
+ | trainee@debian8: | ||
+ | 634M ./ | ||
+ | </ | ||
+ | |||
+ | ====Configurer le Noyau==== | ||
+ | |||
+ | Le fichier **Makefile** contient le nom du noyau et spécifie les informations suivantes : | ||
+ | |||
+ | * VERSION, | ||
+ | * PATCHLEVEL, | ||
+ | * SUBLEVEL, | ||
+ | * EXTRAVERSION. | ||
+ | |||
+ | Les trois premières informations sont gérées par **kernel.org** et Linus Torvalds en personne tandis que l' | ||
+ | |||
+ | < | ||
+ | trainee@debian8: | ||
+ | VERSION = 3 | ||
+ | PATCHLEVEL = 16 | ||
+ | SUBLEVEL = 1 | ||
+ | EXTRAVERSION = | ||
+ | NAME = Museum of Fishiegoodies | ||
+ | |||
+ | # *DOCUMENTATION* | ||
+ | # To see a list of typical targets execute "make help" | ||
+ | # More info can be located in ./README | ||
+ | # Comments in this file are targeted only to the developer, do not | ||
+ | # expect to learn how to build the kernel reading this file. | ||
+ | |||
+ | # Do not: | ||
+ | # o use make's built-in rules and variables | ||
+ | # (this increases performance and avoids hard-to-debug behaviour); | ||
+ | # o print " | ||
+ | MAKEFLAGS += -rR --no-print-directory | ||
+ | |||
+ | # Avoid funny character set dependencies | ||
+ | unexport LC_ALL | ||
+ | LC_COLLATE=C | ||
+ | LC_NUMERIC=C | ||
+ | export LC_COLLATE LC_NUMERIC | ||
+ | |||
+ | # Avoid interference with shell env settings | ||
+ | unexport GREP_OPTIONS | ||
+ | |||
+ | # We are using a recursive build, so we need to do a little thinking | ||
+ | # to get the ordering right. | ||
+ | # | ||
+ | # Most importantly: | ||
+ | # their own directory. If in some directory we have a dependency on | ||
+ | # a file in another dir (which doesn' | ||
+ | # unavoidable when linking the built-in.o targets which finally | ||
+ | # turn into vmlinux), we will call a sub make in that other dir, and | ||
+ | # after that we are sure that everything which is in that other dir | ||
+ | # is now up to date. | ||
+ | # | ||
+ | # The only cases where we need to modify files which have global | ||
+ | --More-- | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Important** - La version 2.6 du noyau a vu le jour en **2003**. Les **SUBLEVEL** se suivaient régulièrement. Avec la version 2.6 du noyau, la valeur paire du **PATCHLEVEL** indiquait que le noyau était stable. Quand vous recompilez le noyau à partir des sources, vous devez modifier la valeur de l' | ||
+ | </ | ||
+ | |||
+ | Utilisez maintenant la commande **make defconfig** pour créer le fichier de configuration .config : | ||
+ | |||
+ | < | ||
+ | trainee@debian8: | ||
+ | Password: | ||
+ | root@debian8: | ||
+ | root@debian8:/ | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
+ | SHIPPED scripts/ | ||
+ | SHIPPED scripts/ | ||
+ | SHIPPED scripts/ | ||
+ | HOSTCC | ||
+ | In file included from scripts/ | ||
+ | scripts/ | ||
+ | scripts/ | ||
+ | | ||
+ | ^ | ||
+ | scripts/ | ||
+ | struct jump_key *jump; | ||
+ | ^ | ||
+ | HOSTLD | ||
+ | *** Default configuration is based on ' | ||
+ | # | ||
+ | # configuration written to .config | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | Ce fichier est configuré par une des trois commandes suivantes : | ||
+ | |||
+ | * make config | ||
+ | * make menuconfig | ||
+ | * make xconfig | ||
+ | |||
+ | Dans ce fichier, vous pouvez constater la présence de lignes correspondantes à des fonctionalités suivies par une lettre ou une valeur. Dans le cas d'une lettre, la signification est la suivante : | ||
+ | |||
+ | * **y** | ||
+ | * la fonctionalité est incluse dans le noyau monolithique ou dans le cas d'une dépendance d'un module, dans le module concerné, | ||
+ | * **m** | ||
+ | * la fonctionalité est incluse en tant que module, | ||
+ | * **n** | ||
+ | * la fonctionalité n'est pas incluse. Cette option est rarement visible car dans bien les cas, la fonctionalité est simplement commentée dans le fichier lui-même. | ||
+ | |||
+ | < | ||
+ | root@debian8:/ | ||
+ | # | ||
+ | # Automatically generated file; DO NOT EDIT. | ||
+ | # Linux/x86 3.16.1 Kernel Configuration | ||
+ | # | ||
+ | CONFIG_64BIT=y | ||
+ | CONFIG_X86_64=y | ||
+ | CONFIG_X86=y | ||
+ | CONFIG_INSTRUCTION_DECODER=y | ||
+ | CONFIG_OUTPUT_FORMAT=" | ||
+ | CONFIG_ARCH_DEFCONFIG=" | ||
+ | CONFIG_LOCKDEP_SUPPORT=y | ||
+ | CONFIG_STACKTRACE_SUPPORT=y | ||
+ | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
+ | CONFIG_MMU=y | ||
+ | CONFIG_NEED_DMA_MAP_STATE=y | ||
+ | CONFIG_NEED_SG_DMA_LENGTH=y | ||
+ | CONFIG_GENERIC_ISA_DMA=y | ||
+ | CONFIG_GENERIC_BUG=y | ||
+ | CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y | ||
+ | CONFIG_GENERIC_HWEIGHT=y | ||
+ | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
+ | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
+ | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
+ | CONFIG_ARCH_HAS_CPU_RELAX=y | ||
+ | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y | ||
+ | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | ||
+ | CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y | ||
+ | CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y | ||
+ | CONFIG_ARCH_HIBERNATION_POSSIBLE=y | ||
+ | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
+ | CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y | ||
+ | CONFIG_ARCH_WANT_GENERAL_HUGETLB=y | ||
+ | CONFIG_ZONE_DMA32=y | ||
+ | CONFIG_AUDIT_ARCH=y | ||
+ | CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y | ||
+ | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | ||
+ | CONFIG_HAVE_INTEL_TXT=y | ||
+ | CONFIG_X86_64_SMP=y | ||
+ | CONFIG_X86_HT=y | ||
+ | --More--(1%) | ||
+ | </ | ||
+ | |||
+ | Dernièrement, | ||
+ | |||
+ | < | ||
+ | root@debian8:/ | ||
+ | </ | ||
+ | |||
+ | ====La Commande make-kpkg==== | ||
+ | |||
+ | Cette commande permet d' | ||
+ | |||
+ | < | ||
+ | root@debian8:/ | ||
+ | exec make kpkg_version=13.014+nmu1 -f / | ||
+ | ====== making target minimal_clean [new prereqs: ]====== | ||
+ | This is kernel package version 13.014+nmu1. | ||
+ | test ! -f .config || cp -pf .config config.precious | ||
+ | test ! -e stamp-building || rm -f stamp-building | ||
+ | test ! -f Makefile || \ | ||
+ | make ARCH=x86_64 distclean | ||
+ | make[1]: Entering directory '/ | ||
+ | CLEAN | ||
+ | CLEAN | ||
+ | CLEAN | ||
+ | CLEAN | ||
+ | make[1]: Leaving directory '/ | ||
+ | test ! -f config.precious || mv -f config.precious .config | ||
+ | rm -f modules/ | ||
+ | </ | ||
+ | |||
+ | ====Compiler le Noyau==== | ||
+ | |||
+ | La compilation du noyau peut prendre beaucoup de temps. La commande utilisée est la suivante : | ||
+ | |||
+ | < | ||
+ | root@debian8:/ | ||
+ | logout | ||
+ | trainee@debian8: | ||
+ | trainee@debian8: | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Important** : La commande **fakeroot** simule l' | ||
+ | </ | ||
+ | |||
+ | A l'issu du processus, vous obtiendrez une sortie similaire à ce qui suit : | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | cp -pf debian/ | ||
+ | k=`find / | ||
+ | if file -b $i | egrep -q " | ||
+ | j="$j $i"; | ||
+ | | ||
+ | done; echo $j; )`; test -z " | ||
+ | echo "Elf Files: $K" > / | ||
+ | test -n " | ||
+ | test ! -e debian/ | ||
+ | dpkg-gencontrol -isp -DArchitecture=amd64 -plinux-headers-3.16.1i2tch \ | ||
+ | -P/ | ||
+ | dpkg-gencontrol: | ||
+ | create_md5sums_fn () { cd $1 ; find . -type f ! -regex ' | ||
+ | chown -R root: | ||
+ | chmod -R og=rX / | ||
+ | dpkg --build | ||
+ | dpkg-deb: building package `linux-headers-3.16.1i2tch' | ||
+ | cp -pf debian/ | ||
+ | make[2]: Leaving directory '/ | ||
+ | make[1]: Leaving directory '/ | ||
+ | </ | ||
+ | |||
+ | Notez que la génération du nouveau noyau a consommé presque 1,2 Go d' | ||
+ | |||
+ | < | ||
+ | trainee@debian8: | ||
+ | Filesystem | ||
+ | / | ||
+ | udev | ||
+ | tmpfs 99M 4.8M | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | / | ||
+ | tmpfs 50M | ||
+ | </ | ||
+ | |||
+ | ====Installer le Nouveau Noyau==== | ||
+ | |||
+ | Les paquets du nouveau noyau est les fichiers en-tête se trouvent dans le répertoire **/ | ||
+ | |||
+ | < | ||
+ | trainee@debian8: | ||
+ | trainee@debian8: | ||
+ | Desktop | ||
+ | Documents | ||
+ | </ | ||
+ | |||
+ | Installez maintenant les deux paquets **linux-image** et **linux-headers** : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | Selecting previously unselected package linux-headers-3.16.1i2tch. | ||
+ | (Reading database ... 134500 files and directories currently installed.) | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking linux-headers-3.16.1i2tch (3.16.1i2tch-10.00.Custom) ... | ||
+ | Selecting previously unselected package linux-image-3.16.1i2tch. | ||
+ | Preparing to unpack .../ | ||
+ | Done. | ||
+ | Unpacking linux-image-3.16.1i2tch (3.16.1i2tch-10.00.Custom) ... | ||
+ | Setting up linux-headers-3.16.1i2tch (3.16.1i2tch-10.00.Custom) ... | ||
+ | Examining / | ||
+ | Setting up linux-image-3.16.1i2tch (3.16.1i2tch-10.00.Custom) ... | ||
+ | Running depmod. | ||
+ | Examining / | ||
+ | run-parts: executing / | ||
+ | run-parts: executing / | ||
+ | update-initramfs: | ||
+ | run-parts: executing / | ||
+ | Generating grub configuration file ... | ||
+ | Found background image: / | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | Constatez la création d'un nouveau grub.cfg : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | echo ' | ||
+ | linux / | ||
+ | initrd / | ||
+ | menuentry ' | ||
+ | echo ' | ||
+ | linux / | ||
+ | initrd / | ||
+ | menuentry ' | ||
+ | echo ' | ||
+ | linux / | ||
+ | initrd / | ||
+ | </ | ||
+ | |||
+ | ====Désinstaller un Noyau==== | ||
+ | |||
+ | Re-démarrez votre VM en utilisant le noyau d' | ||
+ | |||
+ | < | ||
+ | Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | ||
+ | permitted by applicable law. | ||
+ | You have new mail. | ||
+ | Last login: Sat Aug 13 12:36:26 2016 from 10.0.2.2 | ||
+ | trainee@debian8: | ||
+ | Password: | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | Lister maintenant les noyaux installés : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | linux-image-3.16.0-4-amd64 | ||
+ | linux-image-3.16.1i2tch | ||
+ | linux-image-amd64 | ||
+ | </ | ||
+ | |||
+ | Le noyau se désinstalle comme tout autre paquet : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | Reading package lists... Done | ||
+ | Building dependency tree | ||
+ | Reading state information... Done | ||
+ | The following packages will be REMOVED: | ||
+ | linux-image-3.16.1i2tch* | ||
+ | 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. | ||
+ | After this operation, 9,251 kB disk space will be freed. | ||
+ | Do you want to continue? [Y/n] y | ||
+ | (Reading database ... 147056 files and directories currently installed.) | ||
+ | Removing linux-image-3.16.1i2tch (3.16.1i2tch-10.00.Custom) ... | ||
+ | Examining / | ||
+ | Examining / | ||
+ | run-parts: executing / | ||
+ | update-initramfs: | ||
+ | run-parts: executing / | ||
+ | Generating grub configuration file ... | ||
+ | Found background image: / | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | done | ||
+ | Purging configuration files for linux-image-3.16.1i2tch (3.16.1i2tch-10.00.Custom) ... | ||
+ | Examining / | ||
+ | run-parts: executing / | ||
+ | run-parts: executing / | ||
+ | </ | ||
+ | |||
+ | Vérifiez que le fichier grub.cfg a été modifié : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | Dernièrement, | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | linux-image-3.16.0-4-amd64 | ||
+ | linux-image-amd64 | ||
+ | </ | ||
+ | |||
+ | =====Gestion des Quotas===== | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Important** : Déconnectez-vous et re-connectez-vous directement en tant que root. | ||
+ | </ | ||
+ | |||
+ | Sous Linux il est possible de mettre en place des quotas par utilisateur et par groupe. Ceci étant, Linux ne sait pas gérer des quotas par répertoire, | ||
+ | quotas par partition. L' | ||
+ | |||
+ | Commencez par vérifiez que le paquet **quota** est bien installé : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | Reading package lists... Done | ||
+ | Building dependency tree | ||
+ | Reading state information... Done | ||
+ | Suggested packages: | ||
+ | libnet-ldap-perl | ||
+ | The following NEW packages will be installed: | ||
+ | quota | ||
+ | 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | ||
+ | Need to get 319 kB of archives. | ||
+ | After this operation, 1,580 kB of additional disk space will be used. | ||
+ | Get:1 http:// | ||
+ | Fetched 319 kB in 0s (1,884 kB/s) | ||
+ | Preconfiguring packages ... | ||
+ | Selecting previously unselected package quota. | ||
+ | (Reading database ... 146985 files and directories currently installed.) | ||
+ | Preparing to unpack .../ | ||
+ | Unpacking quota (4.01-8+deb8u1) ... | ||
+ | Processing triggers for man-db (2.7.0.2-5) ... | ||
+ | Processing triggers for systemd (215-17+deb8u4) ... | ||
+ | Setting up quota (4.01-8+deb8u1) ... | ||
+ | Processing triggers for systemd (215-17+deb8u4) ... | ||
+ | </ | ||
+ | |||
+ | Editez le fichier **/ | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | # /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 | ||
+ | UUID=4a230056-285f-42f4-bfe0-5a73dbc5b745 / | ||
+ | # swap was on /dev/sda5 during installation | ||
+ | UUID=da5a77e9-344d-42aa-aed6-a38d381ba436 none swap sw 0 0 | ||
+ | UUID=6e4ea901-a36d-4b3f-bbbf-eeea866fca40 / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Démontez puis remontez /home : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | Vérifiez ensuite que les options soient prises en compte : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | rootfs / rootfs rw 0 0 | ||
+ | sysfs /sys sysfs rw, | ||
+ | proc /proc proc rw, | ||
+ | udev /dev devtmpfs rw, | ||
+ | devpts /dev/pts devpts rw, | ||
+ | tmpfs /run tmpfs rw, | ||
+ | /dev/sda1 / ext4 rw, | ||
+ | securityfs / | ||
+ | tmpfs /dev/shm tmpfs rw, | ||
+ | tmpfs /run/lock tmpfs rw, | ||
+ | tmpfs / | ||
+ | cgroup / | ||
+ | pstore / | ||
+ | cgroup / | ||
+ | cgroup / | ||
+ | cgroup / | ||
+ | cgroup / | ||
+ | cgroup / | ||
+ | cgroup / | ||
+ | cgroup / | ||
+ | systemd-1 / | ||
+ | hugetlbfs / | ||
+ | debugfs / | ||
+ | mqueue /dev/mqueue mqueue rw,relatime 0 0 | ||
+ | fusectl / | ||
+ | rpc_pipefs / | ||
+ | tmpfs /run/user/0 tmpfs rw, | ||
+ | /dev/sdb1 /home ext4 rw, | ||
+ | </ | ||
+ | |||
+ | ====La Commande quotacheck==== | ||
+ | |||
+ | Pour activer les quotas sur /home, il convient d' | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown. | ||
+ | quotacheck: Scanning /dev/sdb1 [/home] done | ||
+ | quotacheck: Cannot stat old user quota file / | ||
+ | quotacheck: Cannot stat old group quota file / | ||
+ | quotacheck: Cannot stat old user quota file / | ||
+ | quotacheck: Cannot stat old group quota file / | ||
+ | quotacheck: Checked 6754 directories and 64246 files | ||
+ | quotacheck: Old file not found. | ||
+ | quotacheck: Old file not found. | ||
+ | </ | ||
+ | |||
+ | Les options de la commande quotacheck sont : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | Utility for checking and repairing quota files. | ||
+ | quotacheck [-gucbfinvdmMR] [-F < | ||
+ | |||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -c, --create-files | ||
+ | -b, --backup | ||
+ | -f, --force | ||
+ | -i, --interactive | ||
+ | -n, --use-first-dquot | ||
+ | -v, --verbose | ||
+ | -d, --debug | ||
+ | -m, --no-remount | ||
+ | -M, --try-remount | ||
+ | continue even if it fails | ||
+ | -R, --exclude-root | ||
+ | -F, --format=formatname | ||
+ | -a, --all check all filesystems | ||
+ | -h, --help | ||
+ | -V, --version | ||
+ | |||
+ | Bugs to jack@suse.cz | ||
+ | </ | ||
+ | |||
+ | Les quotas ont été activés et les fichier **aquota.user** et **aquota.group** ont été créés dans le répertoire /home : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | total 44 | ||
+ | drwxr-xr-x | ||
+ | drwxr-xr-x 23 root root 4096 Aug 13 15:38 .. | ||
+ | -rw------- | ||
+ | -rw------- | ||
+ | drwx------ | ||
+ | drwxr-xr-x 18 trainee trainee | ||
+ | </ | ||
+ | |||
+ | Créez maintenant un utilisateur **fenestros** avec le mot de passe **fenestros** : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | Enter new UNIX password: | ||
+ | Retype new UNIX password: | ||
+ | passwd: password updated successfully | ||
+ | </ | ||
+ | |||
+ | ====La Commande edquota==== | ||
+ | |||
+ | Mettez en place maintenant un quota de 10Mo pour l' | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | Disk quotas for user fenestros (uid 1001): | ||
+ | Filesystem | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Modifiez ce fichier ainsi : | ||
+ | |||
+ | < | ||
+ | Disk quotas for user fenestros (uid 1001): | ||
+ | Filesystem | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Les options de la commande **edquota** sont : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | edquota: Usage: | ||
+ | edquota [-rm] [-u] [-F formatname] [-p username] [-f filesystem] username ... | ||
+ | edquota [-rm] -g [-F formatname] [-p groupname] [-f filesystem] groupname ... | ||
+ | edquota [-u|g] [-F formatname] [-f filesystem] -t | ||
+ | edquota [-u|g] [-F formatname] [-f filesystem] -T username|groupname ... | ||
+ | |||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -r, --remote | ||
+ | -m, --no-mixed-pathnames | ||
+ | -F, --format=formatname | ||
+ | -p, --prototype=name | ||
+ | --always-resolve | ||
+ | composed only of digits | ||
+ | -f, --filesystem=filesystem | ||
+ | -t, --edit-period | ||
+ | -T, --edit-times | ||
+ | -h, --help | ||
+ | -V, --version | ||
+ | |||
+ | Bugs to: jack@suse.cz | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Important** - Pour mettre en place un quota par group, la procédure est similaire. Il suffit d' | ||
+ | </ | ||
+ | |||
+ | ====La Commande quotaon==== | ||
+ | |||
+ | Appliquez maintenant les quotas : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | </ | ||
+ | |||
+ | Les options de la commande **quotaon** sont : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | quotaon: Usage: | ||
+ | quotaon [-guvp] [-F quotaformat] [-x state] -a | ||
+ | quotaon [-guvp] [-F quotaformat] [-x state] filesys ... | ||
+ | |||
+ | -a, --all turn quotas on for all filesystems | ||
+ | -f, --off turn quotas off | ||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -p, --print-state | ||
+ | -x, --xfs-command=cmd | ||
+ | -F, --format=formatname | ||
+ | -v, --verbose | ||
+ | -h, --help | ||
+ | -V, --version | ||
+ | </ | ||
+ | |||
+ | De cette manière vous avez mis en place un quota **souple** pour fenestros de 8 000 Ko et un quota **stricte** de 10 000 Ko. | ||
+ | |||
+ | Quand l' | ||
+ | |||
+ | Il est à noter que vous pouvez soit mettre en place un quota en taille, soit mettre en place un quota basé sur le nombre d' | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Important** - La commande pour désactivez les quotas est **quotaoff**. | ||
+ | </ | ||
+ | |||
+ | ====La Commande repquota==== | ||
+ | |||
+ | Pour visualiser les quotas utilisez la commande **repquota** : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | *** Report for user quotas on device /dev/sdb1 | ||
+ | Block grace time: 7days; Inode grace time: 7days | ||
+ | Block limits | ||
+ | User used soft hard grace used soft hard grace | ||
+ | ---------------------------------------------------------------------- | ||
+ | root -- 20 | ||
+ | trainee | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Important** - Notez que l' | ||
+ | </ | ||
+ | |||
+ | Les options de la commande **repquota** sont : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | repquota: Utility for reporting quotas. | ||
+ | Usage: | ||
+ | repquota [-vugsi] [-c|C] [-t|n] [-F quotaformat] (-a | mntpoint) | ||
+ | |||
+ | -v, --verbose | ||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -s, --human-readable | ||
+ | -t, --truncate-names | ||
+ | -p, --raw-grace | ||
+ | -n, --no-names | ||
+ | -i, --no-autofs | ||
+ | -c, --batch-translation | ||
+ | -C, --no-batch-translation | ||
+ | -F, --format=formatname | ||
+ | -h, --help | ||
+ | -V, --version | ||
+ | |||
+ | Bugs to jack@suse.cz | ||
+ | </ | ||
+ | |||
+ | ====La Commande quota==== | ||
+ | |||
+ | Pour visualiser les quotas d'un utilisateur spécifique, | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | Disk quotas for user fenestros (uid 1001): none | ||
+ | root@debian8: | ||
+ | fenestros@debian8: | ||
+ | fenestros@debian8: | ||
+ | logout | ||
+ | root@debian8: | ||
+ | Disk quotas for user fenestros (uid 1001): | ||
+ | | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Les options de la commande **quota** sont : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | quota: Usage: quota [-guqvswim] [-l | [-Q | -A]] [-F quotaformat] | ||
+ | quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -u username ... | ||
+ | quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -g groupname ... | ||
+ | quota [-qvswugQm] [-F quotaformat] -f filesystem ... | ||
+ | |||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -q, --quiet | ||
+ | -v, --verbose | ||
+ | -s, --human-readable | ||
+ | --always-resolve | ||
+ | composed of only digits | ||
+ | -w, --no-wrap | ||
+ | -p, --raw-grace | ||
+ | -l, --local-only | ||
+ | -Q, --quiet-refuse | ||
+ | not respond | ||
+ | -i, --no-autofs | ||
+ | -F, --format=formatname | ||
+ | -f, --filesystem-list | ||
+ | -A, --nfs-all | ||
+ | -m, --no-mixed-pathnames | ||
+ | --show-mntpoint | ||
+ | --hide-device | ||
+ | -h, --help | ||
+ | -V, --version | ||
+ | |||
+ | Bugs to: jack@suse.cz | ||
+ | </ | ||
+ | |||
+ | ====La Commande warnquota==== | ||
+ | |||
+ | La commande **warnquota** vérifie le ou les disques et envoie un message par mail à tout utilisateur qui a dépassé la limite soft. Elle est enrègle générale appelée par un job cron. Cependant elle peut aussi est appelée d'une manière intéractive. | ||
+ | |||
+ | Les options de la commande **warnquota** sont : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | warnquota: Usage: | ||
+ | warnquota [-ugsid] [-F quotaformat] [-c configfile] [-q quotatabfile] [-a adminsfile] [filesystem...] | ||
+ | |||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -s, --human-readable | ||
+ | -i, --no-autofs | ||
+ | -d, --no-details | ||
+ | -F, --format=formatname | ||
+ | -c, --config=config-file | ||
+ | -q, --quota-tab=quotatab-file | ||
+ | -a, --admins-file=admins-file | ||
+ | -h, --help | ||
+ | -v, --version | ||
+ | |||
+ | Bugs to jack@suse.cz | ||
+ | </ | ||
+ | |||
+ | ----- | ||
+ | < | ||
+ | <div align=" | ||
+ | Copyright © 2020 Hugh Norris.< | ||
+ | </ | ||
+ | </ | ||
+ | ----- | ||