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:centos:8:admin:l118 [2022/03/09 18:44] – admin | elearning:workbooks:centos:8:admin:l118 [2022/06/05 17:57] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
Last updated : ~~LASTMOD~~ | Last updated : ~~LASTMOD~~ | ||
- | ======LCE600 | + | ======LCE512 |
=====Contents===== | =====Contents===== | ||
- | * **LCE600 | + | * **LCE512 |
* Contents | * Contents | ||
- | * Prerequisites | + | * The Linux Kernel |
- | * Hardware | + | * LAB #1 - Modules |
- | * Software | + | * LAB #2 - Compiling and Installing a Kernel and Modules |
- | * Internet | + | * 2.1 - Move /home |
- | * Using our infrastructure | + | * 2.2 - Preparing the Environment |
- | * Training Program | + | * 2.3 - Preparing the Kernel Source Tree |
- | * Skills Assessment | + | * The .config file |
+ | * The Makefile file | ||
+ | * 2.4 - Configuring the Kernel | ||
+ | * 2.5 - Compiling the Kernel | ||
+ | * 2.6 - Installing the Kernel | ||
+ | * LAB #3 - Managing Quotas | ||
+ | * 3.1 - The quotacheck Command | ||
+ | * 3.2 - The edquota Command | ||
+ | * 3.3 - The quotaon Command | ||
+ | * 3.4 - The repquota Command | ||
+ | * 3.5 - The quota Command | ||
+ | * 3.6 - The warnquota Command | ||
- | =====Prerequisites===== | + | =====The Linux Kernel===== |
- | ==== Hardware==== | + | The Kernel is the part of the OS that is responsible for managing peripherals' |
- | * A computer running either MacOS, Linux, Windows(tm) or Solaris(tm), | + | * reducing the Kernel footprint, |
- | * QWERTY US Keyboard, | + | * supporting new peripherals, |
- | * 4 GB of RAM, | + | * adding new functionalities, |
- | * Headphones, | + | * optimising code, |
- | * A mic (optional). | + | * correcting bugs, |
+ | * using experimental functions. | ||
+ | |||
+ | Start by updating CentOS 8: | ||
- | ====Software==== | + | < |
+ | [root@centos8 ~]# dnf update | ||
+ | ... | ||
+ | [root@centos8 ~]# reboot | ||
+ | </ | ||
- | * Chrome, Edge or Firefox web browser. | + | Now identifiy the current Linux kernel: |
- | ====Internet==== | + | < |
+ | [root@centos8 ~]# uname -r | ||
+ | 4.18.0-305.7.1.el8_4.x86_64 | ||
+ | </ | ||
- | * A fast, **direct** (no proxy or VPN), Internet connection (4G minimum), | + | =====LAB #1 - Modules===== |
- | * Access to : https:// | + | |
- | * Accessible ports : 80, 443. | + | |
- | =====Using our infrastructure===== | + | Under normal circumstances it is however preferable to make use of the Kernel modules as opposed to recompiling the Kernel. Kernel modules can be found in the **/ |
- | The Instructor will assign you an ID ranging from Trainee01 to Trainee10. | + | < |
+ | [root@centos8 ~]# ls / | ||
+ | bls.conf | ||
+ | build modules.builtin.bin | ||
+ | config | ||
+ | kernel | ||
+ | modules.alias | ||
+ | modules.alias.bin | ||
+ | modules.block | ||
+ | </ | ||
- | In order to access our infrastructure, | + | Commands used to manage modules are: |
- | ^ ID ^ Command ^ | + | * insmod |
- | | Trainee01 | ssh -l trainee compute01.ittraining.network -p 21022 | | + | * rmmod |
- | | Trainee02 | ssh -l trainee compute02.ittraining.network -p 21122 | | + | * lsmod |
- | | Trainee03 | ssh -l trainee compute03.ittraining.network -p 21222 | | + | * modprobe |
- | | Trainee04 | ssh -l trainee compute04.ittraining.network -p 21322 | | + | |
- | | Trainee05 | ssh -l trainee compute05.ittraining.network -p 21422 | | + | |
- | | Trainee06 | ssh -l trainee compute06.ittraining.network -p 21522 | | + | |
- | | Trainee07 | ssh -l trainee compute07.ittraining.network -p 21622 | | + | |
- | | Trainee08 | ssh -l trainee compute08.ittraining.network -p 21722 | | + | |
- | | Trainee09 | ssh -l trainee compute09.ittraining.network -p 21822 | | + | |
- | | Trainee10 | ssh -l trainee compute10.ittraining.network -p 21922 | | + | |
- | **Ask the Instructor for the password**. | + | For example : |
- | Once you are connected, use the following command to connect to your VM: | + | < |
+ | [root@centos8 ~]# lsmod | ||
+ | Module | ||
+ | xt_CHECKSUM | ||
+ | ipt_MASQUERADE | ||
+ | xt_conntrack | ||
+ | ipt_REJECT | ||
+ | nft_compat | ||
+ | nf_nat_tftp | ||
+ | nft_objref | ||
+ | nf_conntrack_tftp | ||
+ | nft_counter | ||
+ | tun 53248 1 | ||
+ | bridge | ||
+ | stp 16384 1 bridge | ||
+ | llc 16384 2 bridge,stp | ||
+ | nft_fib_inet | ||
+ | nft_fib_ipv4 | ||
+ | nft_fib_ipv6 | ||
+ | nft_fib | ||
+ | nft_reject_inet | ||
+ | nf_reject_ipv4 | ||
+ | nf_reject_ipv6 | ||
+ | nft_reject | ||
+ | nft_ct | ||
+ | nf_tables_set | ||
+ | nft_chain_nat | ||
+ | nf_nat | ||
+ | nf_conntrack | ||
+ | nf_defrag_ipv6 | ||
+ | nf_defrag_ipv4 | ||
+ | ip_set | ||
+ | nf_tables | ||
+ | nfnetlink | ||
+ | sunrpc | ||
+ | ext4 761856 | ||
+ | mbcache | ||
+ | jbd2 131072 | ||
+ | virtio_balloon | ||
+ | pcspkr | ||
+ | i2c_piix4 | ||
+ | joydev | ||
+ | ip_tables | ||
+ | xfs 1515520 | ||
+ | libcrc32c | ||
+ | sr_mod | ||
+ | sd_mod | ||
+ | cdrom 65536 1 sr_mod | ||
+ | t10_pi | ||
+ | sg | ||
+ | ata_generic | ||
+ | bochs_drm | ||
+ | drm_vram_helper | ||
+ | drm_kms_helper | ||
+ | syscopyarea | ||
+ | sysfillrect | ||
+ | sysimgblt | ||
+ | fb_sys_fops | ||
+ | drm_ttm_helper | ||
+ | ttm | ||
+ | drm | ||
+ | ahci | ||
+ | libahci | ||
+ | virtio_net | ||
+ | net_failover | ||
+ | ata_piix | ||
+ | serio_raw | ||
+ | failover | ||
+ | libata | ||
+ | dm_mirror | ||
+ | dm_region_hash | ||
+ | dm_log | ||
+ | dm_mod | ||
+ | fuse 151552 | ||
+ | </ | ||
- | **ssh -l trainee 10.0.2.45** | + | To add a module, you can use either the **insmod** or the **modprobe** command. The latter also manages the dependencies of the to-be-installed module: |
- | If, for any reason, you cannot login via SSH use your Internet browser to navigate to your login page: | + | < |
+ | [root@centos8 ~]# modprobe bonding | ||
+ | [root@centos8 ~]# lsmod | more | ||
+ | Module | ||
+ | bonding | ||
+ | xt_CHECKSUM | ||
+ | ipt_MASQUERADE | ||
+ | xt_conntrack | ||
+ | ipt_REJECT | ||
+ | nft_compat | ||
+ | nf_nat_tftp | ||
+ | nft_objref | ||
+ | nf_conntrack_tftp | ||
+ | nft_counter | ||
+ | tun 53248 1 | ||
+ | bridge | ||
+ | stp 16384 1 bridge | ||
+ | llc 16384 2 bridge,stp | ||
+ | nft_fib_inet | ||
+ | nft_fib_ipv4 | ||
+ | nft_fib_ipv6 | ||
+ | nft_fib | ||
+ | nft_reject_inet | ||
+ | nf_reject_ipv4 | ||
+ | nf_reject_ipv6 | ||
+ | --More-- | ||
+ | </ | ||
- | ^ ID ^ URL ( Notez http: et non https: ) ^ | + | To delete a module, you can use either the **rmmod** command or the **modprobe -r** command. The latter also deletes any unused dependencies of the deleted module: |
- | | Trainee01 | http:// | + | |
- | | Trainee02 | http:// | + | |
- | | Trainee03 | http:// | + | |
- | | Trainee04 | http:// | + | |
- | | Trainee05 | http:// | + | |
- | | Trainee06 | http:// | + | |
- | | Trainee07 | http:// | + | |
- | | Trainee08 | http:// | + | |
- | | Trainee09 | http:// | + | |
- | | Trainee10 | http:// | + | |
- | Enter your ID and ask the Instructor for the password. | + | < |
+ | [root@centos8 ~]# modprobe -r bonding | ||
+ | [root@centos8 ~]# lsmod | more | ||
+ | Module | ||
+ | xt_CHECKSUM | ||
+ | ipt_MASQUERADE | ||
+ | xt_conntrack | ||
+ | ipt_REJECT | ||
+ | nft_compat | ||
+ | nf_nat_tftp | ||
+ | nft_objref | ||
+ | nf_conntrack_tftp | ||
+ | nft_counter | ||
+ | tun 53248 1 | ||
+ | bridge | ||
+ | stp 16384 1 bridge | ||
+ | llc 16384 2 bridge, | ||
+ | nft_fib_inet | ||
+ | nft_fib_ipv4 | ||
+ | nft_fib_ipv6 | ||
+ | nft_fib | ||
+ | nft_reject_inet | ||
+ | nf_reject_ipv4 | ||
+ | nf_reject_ipv6 | ||
+ | nft_reject | ||
+ | --More-- | ||
+ | </ | ||
- | Once logged in, click on the **CentOS8_SSH_10.0.2.45** link. You will be logged into the VM automatically. | + | Module dependencies are resolved by the modprobe command by using the **/ |
- | The VM comes with two pre-configured accounts | + | < |
+ | [root@centos8 ~]# more / | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | xz kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | kernel/ | ||
+ | _64.ko.xz | ||
+ | kernel/ | ||
+ | --More--(0%) | ||
+ | </ | ||
- | ^ User Name ^ Password ^ | + | To see information about a specific module, use the **modinfo** command: |
- | | trainee | trainee | | + | |
- | | root | fenestros | | + | |
- | =====Training Program===== | + | < |
+ | [root@centos8 ~]# modinfo bonding | ||
+ | filename: | ||
+ | author: | ||
+ | description: | ||
+ | license: | ||
+ | alias: | ||
+ | rhelversion: | ||
+ | srcversion: | ||
+ | depends: | ||
+ | intree: | ||
+ | name: | ||
+ | vermagic: | ||
+ | sig_id: | ||
+ | signer: | ||
+ | sig_key: | ||
+ | sig_hashalgo: | ||
+ | signature: | ||
+ | B7: | ||
+ | 3F: | ||
+ | BE: | ||
+ | 44: | ||
+ | DE: | ||
+ | 7F: | ||
+ | D8: | ||
+ | BA: | ||
+ | B8: | ||
+ | 8F: | ||
+ | 58: | ||
+ | 6E: | ||
+ | 50: | ||
+ | 2F: | ||
+ | CA: | ||
+ | 0C: | ||
+ | A6: | ||
+ | AE: | ||
+ | 59: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | parm: | ||
+ | </ | ||
- | * **LCE601 - Managing Integrated Peripherals** | + | Finally, files in the **/etc/modprobe.d** directory are used to specify certain options to be passed to modules when they are loaded and also any aliases used to refer to modules: |
- | * Special Files | + | |
- | * LAB #1 - Commands | + | |
- | * 1.1 - The lspci Command | + | |
- | * 1.2 - The lsusb Command | + | |
- | * 1.3 - The dmidecode Command | + | |
- | * LAB #2 - The sysctl Command | + | |
- | * 2.1 - The /proc Directory | + | |
- | * Files | + | |
- | * / | + | |
- | * / | + | |
- | * /proc/dma | + | |
- | * / | + | |
- | * / | + | |
- | * / | + | |
- | * / | + | |
- | * / | + | |
- | * / | + | |
- | * / | + | |
- | * / | + | |
- | * / | + | |
- | * Directories | + | |
- | * ide/scsi | + | |
- | * acpi | + | |
- | * bus | + | |
- | * net | + | |
- | * sys | + | |
- | * 2.2 - Using the sysctl Command | + | |
- | | + | |
- | | + | |
- | * 3.2 - uptime ou w | + | |
- | * 3.3 - iostat | + | |
- | * 3.4 - hdparm | + | |
- | * 3.5 - vmstat | + | |
- | * 3.6 - mpstat | + | |
- | * 3.7 - sar | + | |
- | * USB Modules | + | |
- | * udev | + | |
- | * The udevadm Command | + | |
- | * The /sys Filesystem | + | |
- | * LAB #4 - Limiting Ressources | + | |
- | * 4.1 - ulimit | + | |
- | * 4.2 - CGroups | + | |
- | * Limiting Memeory Usage | + | |
- | * The cgcreate Command | + | |
- | * The cgdelete Command | + | |
- | * The /etc/cgconfig.conf File | + | |
- | | + | |
- | * **LCE602 | + | < |
- | * The Linux Kernel | + | [root@centos8 ~]# ls / |
- | * LAB #1 - Modules | + | firewalld-sysctls.conf |
- | * LAB #2 - Compiling and Installing | + | kvm.conf |
- | * 2.1 - Move /home | + | |
- | * 2.2 - Preparing the Environment | + | [root@centos8 ~]# cat / |
- | * 2.3 - Preparing the Kernel Source Tree | + | # Setting modprobe kvm_intel/ |
- | * The .config file | + | # only enables Nested Virtualization until the next reboot or |
- | * The Makefile | + | # module reload. Uncomment the option applicable |
- | * 2.4 - Configuring the Kernel | + | # to your system below to enable the feature permanently. |
- | * 2.5 - Compiling the Kernel | + | # |
- | * 2.6 - Installing the Kernel | + | # User changes in this file are preserved across upgrades. |
- | * LAB #3 - Managing Quotas | + | # |
- | * 3.1 - The quotacheck Command | + | # For Intel |
- | * 3.2 - The edquota Command | + | #options kvm_intel nested=1 |
- | * 3.3 - The quotaon Command | + | # |
- | * 3.4 - The repquota Command | + | # For AMD |
- | * 3.5 - The quota Command | + | #options kvm_amd nested=1 |
- | * 3.6 - The warnquota Command | + | </ |
+ | |||
+ | =====LAB #2 - Compiling and Installing a Kernel and Modules===== | ||
+ | |||
+ | Firstly, activate the **CentOS-Linux-PowerTools** repository by setting the **enabled** directive to **1**: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# vi / | ||
+ | [root@centos8 ~]# cat / | ||
+ | # CentOS-Linux-PowerTools.repo | ||
+ | # | ||
+ | # The mirrorlist system uses the connecting IP address of the client and the | ||
+ | # update status of each mirror to pick current mirrors that are geographically | ||
+ | # close to the client. | ||
+ | # manually picking other mirrors. | ||
+ | # | ||
+ | # If the mirrorlist does not work for you, you can try the commented out | ||
+ | # baseurl line instead. | ||
+ | |||
+ | [powertools] | ||
+ | name=CentOS Linux $releasever - PowerTools | ||
+ | mirrorlist=http:// | ||
+ | # | ||
+ | gpgcheck=1 | ||
+ | enabled=1 | ||
+ | gpgkey=file:/// | ||
+ | </ | ||
+ | |||
+ | Now install the package group " | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# dnf groupinstall " | ||
+ | ... | ||
+ | [root@centos8 ~]# dnf install asciidoc audit-libs-devel bash bc binutils binutils-devel bison diffutils elfutils elfutils-devel elfutils-libelf-devel findutils flex gawk gcc gettext gzip hmaccalc hostname make module-init-tools ncurses-devel net-tools newt-devel numactl-devel openssl patch pciutils-devel perl perl-ExtUtils-Embed pesign redhat-rpm-config rpm-build rpmdevtools sh-utils tar xmlto xz zlib-devel | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ====2.1 - Move /home==== | ||
+ | |||
+ | <WRAP center round alert 60%> | ||
+ | **Important** - You should not compile a Kernel as the root user for security reasons. To compile a Kernel a user requires **at least** 20 GB of free disk space in their home directory. | ||
+ | </ | ||
+ | |||
+ | <WRAP center round todo 60%> | ||
+ | **To do** - **Log out** of your **CentOS8_SSH_10.0.2.45** session | ||
+ | </ | ||
+ | |||
+ | Create a partition on **/dev/sdc** : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# fdisk /dev/sdc | ||
+ | |||
+ | Welcome to fdisk (util-linux 2.32.1). | ||
+ | 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 0xc321702b. | ||
+ | |||
+ | Command (m for help): n | ||
+ | Partition type | ||
+ | | ||
+ | | ||
+ | Select (default p): | ||
+ | |||
+ | Using default response p. | ||
+ | Partition number (1-4, default 1): | ||
+ | First sector (2048-41943039, | ||
+ | Last sector, +sectors or +size{K, | ||
+ | |||
+ | Created a new partition 1 of type 'Linux' and of size 20 GiB. | ||
+ | |||
+ | Command (m for help): w | ||
+ | The partition table has been altered. | ||
+ | Calling ioctl() to re-read partition table. | ||
+ | Syncing disks. | ||
+ | </ | ||
+ | |||
+ | Now create an ext4 filesystem on **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# mkfs.ext4 /dev/sdc1 | ||
+ | mke2fs | ||
+ | Discarding device blocks: done | ||
+ | Creating filesystem with 16776960 4k blocks and 4194304 inodes | ||
+ | Filesystem UUID: dc92c0d7-919b-4fff-8719-53e9e7e628dd | ||
+ | Superblock backups stored on blocks: | ||
+ | 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, | ||
+ | 4096000, 7962624, 11239424 | ||
+ | |||
+ | Allocating group tables: done | ||
+ | Writing inode tables: done | ||
+ | Creating journal (65536 blocks): done | ||
+ | Writing superblocks and filesystem accounting information: | ||
+ | </ | ||
+ | |||
+ | Mount **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# mount /dev/sdc1 /mnt | ||
+ | </ | ||
+ | |||
+ | Copy the content of /home to /mnt : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cp -a /home/* /mnt | ||
+ | </ | ||
+ | |||
+ | Unmount / | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# umount /mnt | ||
+ | [root@centos8 ~]# mv /home /root | ||
+ | </ | ||
+ | |||
+ | Get the UUID of /dev/sdc1 : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ls -l / | ||
+ | lrwxrwxrwx. 1 root root 10 Jul 19 12:02 f76d6b66-985b-4a91-af9c-4987e8c1443c -> ../../sdc | ||
+ | [root@centos8 ~]# | ||
+ | </ | ||
+ | |||
+ | Edit the **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# vi / | ||
+ | [root@centos8 ~]# cat / | ||
+ | |||
+ | # | ||
+ | # / | ||
+ | # Created by anaconda on Wed Jun 16 06:21:32 2021 | ||
+ | # | ||
+ | # Accessible filesystems, | ||
+ | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. | ||
+ | # | ||
+ | # After editing this file, run ' | ||
+ | # units generated from this file. | ||
+ | # | ||
+ | / | ||
+ | UUID=1c04981e-5317-4b73-9695-3ce25246835d /boot | ||
+ | / | ||
+ | UUID=f76d6b66-985b-4a91-af9c-4987e8c1443c /home | ||
+ | </ | ||
+ | |||
+ | Create a new mount point foe /home: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# mkdir /home | ||
+ | </ | ||
+ | |||
+ | Mount /dev/sdc1 : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# mount -a | ||
+ | [root@centos8 ~]# mount | ||
+ | sysfs on /sys type sysfs (rw, | ||
+ | proc on /proc type proc (rw, | ||
+ | devtmpfs on /dev type devtmpfs (rw, | ||
+ | securityfs on / | ||
+ | tmpfs on /dev/shm type tmpfs (rw, | ||
+ | devpts on /dev/pts type devpts (rw, | ||
+ | tmpfs on /run type tmpfs (rw, | ||
+ | tmpfs on / | ||
+ | cgroup on / | ||
+ | pstore on / | ||
+ | bpf on /sys/fs/bpf type bpf (rw, | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | cgroup on / | ||
+ | none on / | ||
+ | configfs on / | ||
+ | / | ||
+ | selinuxfs on / | ||
+ | mqueue on /dev/mqueue type mqueue (rw, | ||
+ | hugetlbfs on / | ||
+ | debugfs on / | ||
+ | systemd-1 on / | ||
+ | fusectl on / | ||
+ | /dev/sda1 on /boot type ext4 (rw, | ||
+ | sunrpc on / | ||
+ | tmpfs on / | ||
+ | tmpfs on / | ||
+ | gvfsd-fuse on / | ||
+ | tmpfs on /run/user/0 type tmpfs (rw, | ||
+ | gvfsd-fuse on / | ||
+ | /dev/sdc1 on /home type ext4 (rw, | ||
+ | </ | ||
+ | |||
+ | Check the current size of /home : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# df -h | ||
+ | Filesystem | ||
+ | devtmpfs | ||
+ | tmpfs 1.9G | ||
+ | tmpfs 1.9G 9.4M 1.9G 1% /run | ||
+ | tmpfs 1.9G | ||
+ | / | ||
+ | / | ||
+ | tmpfs 374M | ||
+ | tmpfs 374M 1.2M 373M 1% / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | <WRAP center round todo 60%> | ||
+ | **To do** - **Log out** of your **CentOS8_ROOT_10.0.2.45** session and open a new session using the **CentOS8_SSH_10.0.2.45** connection. | ||
+ | </ | ||
+ | |||
+ | ====2.2 - Preparing the Environment==== | ||
+ | |||
+ | To create the Kernel Source Tree in / | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 ~]$ rpmdev-setuptree | ||
+ | ...> | ||
+ | [trainee@centos8 ~]$ ls -laR rpmbuild/ | ||
+ | rpmbuild/: | ||
+ | total 28 | ||
+ | drwxrwxr-x. | ||
+ | drwxr-xr-x. 17 trainee trainee 4096 Jul 19 12:10 .. | ||
+ | drwxrwxr-x. | ||
+ | drwxrwxr-x. | ||
+ | drwxrwxr-x. | ||
+ | drwxrwxr-x. | ||
+ | drwxrwxr-x. | ||
+ | |||
+ | rpmbuild/ | ||
+ | total 8 | ||
+ | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | ||
+ | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | ||
+ | |||
+ | rpmbuild/ | ||
+ | total 8 | ||
+ | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | ||
+ | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | ||
+ | |||
+ | rpmbuild/ | ||
+ | total 8 | ||
+ | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | ||
+ | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | ||
+ | |||
+ | rpmbuild/ | ||
+ | total 8 | ||
+ | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | ||
+ | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | ||
+ | |||
+ | rpmbuild/ | ||
+ | total 8 | ||
+ | drwxrwxr-x. 2 trainee trainee 4096 Jul 19 12:10 . | ||
+ | drwxrwxr-x. 7 trainee trainee 4096 Jul 19 12:10 .. | ||
+ | </ | ||
+ | |||
+ | Download the Kernel source RPM: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 ~]$ uname -a | ||
+ | Linux centos8.ittraining.loc 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Tue Jun 29 21:55:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux | ||
+ | |||
+ | [trainee@centos8 ~]$ cat / | ||
+ | CentOS Linux release 8.4.2105 | ||
+ | |||
+ | [trainee@centos8 ~]$ wget https:// | ||
+ | --2021-07-14 02: | ||
+ | Resolving vault.centos.org (vault.centos.org)... 81.171.33.194, | ||
+ | Connecting to vault.centos.org (vault.centos.org)|81.171.33.194|: | ||
+ | HTTP request sent, awaiting response... 200 OK | ||
+ | Length: 123000617 (117M) [application/ | ||
+ | Saving to: ‘kernel-4.18.0-305.7.1.el8_4.src.rpm’ | ||
+ | |||
+ | kernel-4.18.0-305.7.1. 100%[===========================> | ||
+ | |||
+ | 2021-07-14 02:55:33 (1.49 MB/s) - ‘kernel-4.18.0-305.7.1.el8_4.src.rpm’ saved [123000617/ | ||
+ | </ | ||
+ | |||
+ | Now install the required dependencies: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 ~]$ su - | ||
+ | Mot de passe : fenestros | ||
+ | |||
+ | [root@centos8 ~]# dnf install yum-utils | ||
+ | ... | ||
+ | |||
+ | [root@centos8 ~]# yum-builddep / | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Install the **kernel-4.18.0-305.7.1.el8_4.src.rpm** package: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# exit | ||
+ | logout | ||
+ | [trainee@centos8 ~]$ rpm -Uvh kernel-4.18.0-305.7.1.el8_4.src.rpm | ||
+ | Updating / installing... | ||
+ | | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | ################################# | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | warning: user mockbuild does not exist - using root | ||
+ | warning: group mockbuild does not exist - using root | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - Note that the errors are not important. | ||
+ | </ | ||
+ | |||
+ | ====2.3 - Preparing the Kernel Source Tree==== | ||
+ | |||
+ | Move to the **~/ | ||
+ | |||
+ | < | ||
+ | [trainee@centos7 ~]$ cd ~/ | ||
+ | [trainee@centos7 SPECS]$ rpmbuild -bp --target=$(uname -m) kernel.spec | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | At the end of the process, check what has been created: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 SPECS]$ ls -la ~/ | ||
+ | total 812 | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | drwxr-xr-x. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. 119 trainee trainee | ||
+ | drwxr-xr-x. 137 trainee trainee | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | -rw-r--r--. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | -rw-r--r--. | ||
+ | drwxr-xr-x. | ||
+ | -rw-r--r--. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | drwxr-xr-x. | ||
+ | </ | ||
+ | |||
+ | ===The .config | ||
+ | |||
+ | Move to **~/ | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 SPECS]$ cd ~/ | ||
+ | </ | ||
+ | |||
+ | Copy the **configs/ | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cp configs/ | ||
+ | </ | ||
+ | |||
+ | Update the .config file with the configuration Kernel settings: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ make oldconfig | ||
+ | scripts/ | ||
+ | # | ||
+ | # configuration written to .config | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - The above command reads the .config | ||
+ | </ | ||
+ | |||
+ | The **.config** file is generated by one of three binaries and should not be edited manually: | ||
+ | |||
+ | * make config | ||
+ | * make menuconfig | ||
+ | * make xconfig | ||
+ | |||
+ | Run the **make menuconfig** command: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ make menuconfig | ||
+ | UPD | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
+ | HOSTLD | ||
+ | scripts/ | ||
+ | # | ||
+ | # using defaults found in / | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | Looking at the interface, you will see lines used to configure the Kernel. In the case a letter is used, these are: | ||
+ | |||
+ | * **y**, | ||
+ | * the configuration is included in the Kernel, | ||
+ | * **m**, | ||
+ | * the configuration is not included in the Kernel but in a Kernel module, | ||
+ | * **n**, | ||
+ | * the configuration is neither included in the Kernel nor in a Kernel module. | ||
+ | |||
+ | At this stage, simply save the configuration and exit the interface: | ||
+ | |||
+ | < | ||
+ | *** End of the configuration. | ||
+ | *** Execute ' | ||
+ | </ | ||
+ | |||
+ | Check the presence of the **.config** file: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ ls -a | ||
+ | . certs configs | ||
+ | .. | ||
+ | arch | ||
+ | block .config | ||
+ | </ | ||
+ | |||
+ | Lokk at the contents of the .config file: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ more .config | ||
+ | # | ||
+ | # Automatically generated file; DO NOT EDIT. | ||
+ | # Linux/x86 4.18.0 Kernel Configuration | ||
+ | # | ||
+ | |||
+ | # | ||
+ | # Compiler: gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) | ||
+ | # | ||
+ | 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_MMU=y | ||
+ | CONFIG_ARCH_MMAP_RND_BITS_MIN=28 | ||
+ | CONFIG_ARCH_MMAP_RND_BITS_MAX=32 | ||
+ | CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 | ||
+ | CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 | ||
+ | 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_GENERIC_CALIBRATE_DELAY=y | ||
+ | CONFIG_ARCH_HAS_CPU_RELAX=y | ||
+ | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y | ||
+ | CONFIG_ARCH_HAS_FILTER_PGPROT=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 | ||
+ | --More--(0%) | ||
+ | </ | ||
+ | |||
+ | ===The Makefile File=== | ||
+ | |||
+ | The Makefile contains the Kernel name and the following information: | ||
+ | |||
+ | | ||
+ | * PATCHLEVEL, | ||
+ | * SUBLEVEL, | ||
+ | * EXTRAVERSION. | ||
+ | |||
+ | Values for the first three directives are managed directly by **kernel.org** and Linus Torvalds whilst the EXTRAVERSION is managed by Red Hat: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ more Makefile | ||
+ | # SPDX-License-Identifier: | ||
+ | VERSION = 4 | ||
+ | PATCHLEVEL = 18 | ||
+ | SUBLEVEL = 0 | ||
+ | EXTRAVERSION = | ||
+ | NAME = Merciless Moray | ||
+ | |||
+ | # | ||
+ | # DRM backport version | ||
+ | # | ||
+ | RHEL_DRM_VERSION = 5 | ||
+ | RHEL_DRM_PATCHLEVEL = 9 | ||
+ | RHEL_DRM_SUBLEVEL = 14 | ||
+ | |||
+ | # *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. | ||
+ | |||
+ | # That's our default target when none is given on the command line | ||
+ | PHONY := _all | ||
+ | _all: | ||
+ | |||
+ | # o Do not use make's built-in rules and variables | ||
+ | # (this increases performance and avoids hard-to-debug behaviour); | ||
+ | # o Look for make include files relative to root of kernel src | ||
+ | MAKEFLAGS += -rR --include-dir=$(CURDIR) | ||
+ | |||
+ | # 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 | ||
+ | |||
+ | # Set RHEL variables | ||
+ | # Use this spot to avoid future merge conflicts | ||
+ | include Makefile.rhelver | ||
+ | |||
+ | # We are using a recursive build, so we need to do a little thinking | ||
+ | --Plus--(2%) | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - The 2.6 version of the Linux Kernel came into being in **2003**. Version 3.0 came out on the 20th anniversary of the Linux Kernel. | ||
+ | </ | ||
+ | |||
+ | ====2.4 - Configuring the Kernel==== | ||
+ | |||
+ | Add the value shown by the **uname -i** command to the first line of the .config file: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ uname -i | ||
+ | x86_64 | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ vi .config | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ head .config | ||
+ | # x86_64 | ||
+ | # | ||
+ | # Automatically generated file; DO NOT EDIT. | ||
+ | # Linux/x86 4.18.0 Kernel Configuration | ||
+ | # | ||
+ | |||
+ | # | ||
+ | # Compiler: gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) | ||
+ | # | ||
+ | CONFIG_64BIT=y | ||
+ | </ | ||
+ | |||
+ | Rename the .config file and place it in the **~/ | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cp .config ~/ | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ ls ~/ | ||
+ | centos-ca-secureboot.der | ||
+ | centos-dup.x509 | ||
+ | centos-kpatch.x509 | ||
+ | centos.pem | ||
+ | centossecureboot001.der | ||
+ | centossecureboot201.der | ||
+ | centossecurebootca2.der | ||
+ | check-kabi | ||
+ | config-x86_64-generic | ||
+ | </ | ||
+ | |||
+ | Copy the entire contents of the **configs** directory to the **~/ | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cp configs/* ~/ | ||
+ | </ | ||
+ | |||
+ | Edit the **buildid** directive in the **~/ | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cd ~/ | ||
+ | |||
+ | [trainee@centos8 SPECS]$ vi kernel.spec | ||
+ | |||
+ | [trainee@centos8 SPECS]$ head -n 50 kernel.spec | ||
+ | # We have to override the new %%install behavior because, well... the kernel is special. | ||
+ | %global __spec_install_pre %{___build_pre} | ||
+ | |||
+ | # At the time of this writing (2019-03), RHEL8 packages use w2.xzdio | ||
+ | # compression for rpms (xz, level 2). | ||
+ | # Kernel has several large (hundreds of mbytes) rpms, they take ~5 mins | ||
+ | # to compress by single-threaded xz. Switch to threaded compression, | ||
+ | # and from level 2 to 3 to keep compressed sizes close to " | ||
+ | # | ||
+ | # NB: if default compression in / | ||
+ | # this one might need tweaking (e.g. if default changes to w3.xzdio, | ||
+ | # change below to w4T.xzdio): | ||
+ | %define _binary_payload w3T.xzdio | ||
+ | |||
+ | # For a kernel released for public testing, released_kernel should be 1. | ||
+ | # For internal testing builds during development, | ||
+ | %global released_kernel 1 | ||
+ | |||
+ | %global distro_build 305 | ||
+ | |||
+ | # Sign the x86_64 kernel for secure boot authentication | ||
+ | %ifarch x86_64 aarch64 | ||
+ | %global signkernel 1 | ||
+ | %else | ||
+ | %global signkernel 0 | ||
+ | %endif | ||
+ | |||
+ | # Sign modules on all arches | ||
+ | %global signmodules 1 | ||
+ | |||
+ | # Compress modules only for architectures that build modules | ||
+ | %ifarch noarch | ||
+ | %global zipmodules 0 | ||
+ | %else | ||
+ | %global zipmodules 1 | ||
+ | %endif | ||
+ | |||
+ | %if %{zipmodules} | ||
+ | %global zipsed -e ' | ||
+ | %endif | ||
+ | |||
+ | %define buildid .i2tch | ||
+ | |||
+ | %define rpmversion 4.18.0 | ||
+ | %define pkgrelease 305.7.1.el8_4 | ||
+ | |||
+ | # allow pkg_release to have configurable %%{?dist} tag | ||
+ | %define specrelease 305.7.1%{? | ||
+ | |||
+ | %define pkg_release %{specrelease}%{? | ||
+ | </ | ||
+ | |||
+ | ====2.5 - Compiling the Kernel==== | ||
+ | |||
+ | Compiling the Kernel can take a long time (~5 heures). Execute the following command: | ||
+ | |||
+ | < | ||
+ | [trainee@centos7 SPECS]$ rpmbuild -bb --target=`uname -m` kernel.spec 2> build-err.log | tee build-out.log & | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - Once you are sure that the compilation process has started without errors, stop it using ^C. Stop the virtual machine and ask the Instructor to start the virtual machine in which the Kernel has already been compiled. | ||
+ | </ | ||
+ | |||
+ | When the compilation has finished, you would see the following output: | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Wrote: / | ||
+ | Executing(%clean): | ||
+ | |||
+ | [1]+ Done rpmbuild -bb --target=`uname -m` kernel.spec 2> build-err.log | tee build-out.log | ||
+ | </ | ||
+ | |||
+ | The installable RPMs can be found in the **/ | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 SPECS]$ cd ../RPMS | ||
+ | [trainee@centos8 RPMS]$ ls | ||
+ | x86_64 | ||
+ | [trainee@centos8 RPMS]$ cd x86_64/ | ||
+ | [trainee@centos8 x86_64]$ ls | ||
+ | bpftool-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | bpftool-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | kernel-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | kernel-core-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | kernel-cross-headers-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | kernel-debug-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | kernel-debug-core-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | kernel-debug-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | kernel-debug-devel-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | kernel-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
+ | </ | ||
+ | |||
+ | Note that the compilation has consumed over 20 GB of disk space: | ||
+ | |||
+ | < | ||
+ | [trainee@centos8 x86_64]$ df -h | ||
+ | Filesystem | ||
+ | devtmpfs | ||
+ | tmpfs 1.9G | ||
+ | tmpfs 1.9G 9.4M 1.9G 1% /run | ||
+ | tmpfs 1.9G | ||
+ | / | ||
+ | / | ||
+ | tmpfs 374M | ||
+ | tmpfs 374M 1.2M 373M 1% / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ====2.6 - Installing the Kernel==== | ||
+ | |||
+ | Now install the new Kernel. Installing the new Kernel can take a long time (~2 heures). Use the following command: | ||
+ | |||
+ | < | ||
+ | [root@centos8 x86_64]# dnf localinstall kernel-*.rpm | ||
+ | Last metadata expiration check: 2:25:32 ago on Tue 20 Jul 2021 08:37:00 EDT. | ||
+ | Dependencies resolved. | ||
+ | =============================================================================================================================================================================================================== | ||
+ | | ||
+ | =============================================================================================================================================================================================================== | ||
+ | Installing: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | Downgrading: | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Transaction Summary | ||
+ | =============================================================================================================================================================================================================== | ||
+ | Install | ||
+ | Downgrade | ||
+ | |||
+ | Total size: 1.6 G | ||
+ | Is this ok [y/N]: y | ||
+ | </ | ||
+ | |||
+ | When all is installed, re-start the virtual machine: | ||
+ | |||
+ | < | ||
+ | [root@centos7 ~]# reboot | ||
+ | </ | ||
+ | |||
+ | Open a session as trainee and become root. List the installed Kernels: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# rpm -qa | grep kernel | ||
+ | kernel-modules-4.18.0-305.3.1.el8.x86_64 | ||
+ | kernel-tools-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-headers-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-debug-core-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-modules-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-modules-4.18.0-305.7.1.el8_4.x86_64 | ||
+ | kernel-debug-modules-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-tools-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-tools-libs-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-debug-modules-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-cross-headers-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-core-4.18.0-305.7.1.el8_4.x86_64 | ||
+ | kernel-devel-4.18.0-305.7.1.el8_4.x86_64 | ||
+ | kernel-debuginfo-common-x86_64-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-debug-modules-extra-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-debug-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-tools-libs-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-modules-extra-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-4.18.0-305.7.1.el8_4.x86_64 | ||
+ | kernel-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-core-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-selftests-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-debug-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-debug-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-4.18.0-305.3.1.el8.x86_64 | ||
+ | kernel-core-4.18.0-305.3.1.el8.x86_64 | ||
+ | kernel-modules-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | kernel-ipaclones-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | </ | ||
+ | |||
+ | Check the **saved-entry** from the **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# grep i2tch / | ||
+ | saved_entry=95bd69e34a7444a7b58cb74fbfb86df2-4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | </ | ||
+ | |||
+ | Finally, check the output of the **uname -r** command: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# uname -r | ||
+ | 4.18.0-305.7.1.el8.i2tch.x86_64 | ||
+ | </ | ||
+ | |||
+ | =====LAB #3 - Managing Quotas===== | ||
+ | |||
+ | User and group disk quotas can be placed on partitions | ||
+ | |||
+ | <WRAP center round todo 60%> | ||
+ | **To do** - **Log out** of your **CentOS8_SSH_10.0.2.45** session and open a new session using the **CentOS8_ROOT_10.0.2.45** connection. | ||
+ | </ | ||
+ | |||
+ | Before configuring the quotas, set SELINUX to **permissive** mode for the current session: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# getenforce | ||
+ | Enforcing | ||
+ | [root@centos8 ~]# setenforce permissive | ||
+ | [root@centos8 ~]# getenforce | ||
+ | Permissive | ||
+ | [root@centos8 ~]# | ||
+ | </ | ||
+ | |||
+ | Edit the **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# vi / | ||
+ | [root@centos8 ~]# cat / | ||
+ | |||
+ | # This file controls the state of SELinux on the system. | ||
+ | # SELINUX= can take one of these three values: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | SELINUX=permissive | ||
+ | # SELINUXTYPE= can take one of these three values: | ||
+ | # | ||
+ | # | ||
+ | # mls - Multi Level Security protection. | ||
+ | SELINUXTYPE=targeted | ||
+ | |||
+ | </ | ||
+ | |||
+ | Now check that the **quota** package is installed: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# rpm -qa | grep quota | ||
+ | quota-4.04-12.el8.x86_64 | ||
+ | quota-nls-4.04-12.el8.noarch | ||
+ | </ | ||
+ | |||
+ | Edit the **/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# vi / | ||
+ | [root@centos8 ~]# cat / | ||
+ | |||
+ | # | ||
+ | # / | ||
+ | # Created by anaconda on Wed Jun 16 06:21:32 2021 | ||
+ | # | ||
+ | # Accessible filesystems, | ||
+ | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. | ||
+ | # | ||
+ | # After editing this file, run ' | ||
+ | # units generated from this file. | ||
+ | # | ||
+ | / | ||
+ | UUID=1c04981e-5317-4b73-9695-3ce25246835d /boot | ||
+ | / | ||
+ | UUID=f76d6b66-985b-4a91-af9c-4987e8c1443c /home | ||
+ | </ | ||
+ | |||
+ | Restart the virtual machine: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# reboot | ||
+ | </ | ||
+ | |||
+ | <WRAP center round todo 60%> | ||
+ | **To do** - Open a new session using the **CentOS8_ROOT_10.0.2.45** connection. | ||
+ | </ | ||
+ | |||
+ | Check that the **usrquota** and **grpquota** options have been activated on /home: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# cat /etc/mtab | grep /home | ||
+ | /dev/sdc1 /home ext4 rw, | ||
+ | </ | ||
+ | |||
+ | ====3.1 - The quotacheck Command==== | ||
+ | |||
+ | To activate the quotas on /home, use the **quotacheck** command: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# quotacheck -cugvm -f /dev/sdc1 | ||
+ | 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/sdc1 [/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 6763 directories and 129772 files | ||
+ | quotacheck: Old file not found. | ||
+ | quotacheck: Old file not found. | ||
+ | </ | ||
+ | |||
+ | The command line switches of the **quotacheck** command are as follows: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# quotacheck --help | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | Two files, **aquota.user** and **aquota.group** are created in /home: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# ls -la /home | ||
+ | total 40 | ||
+ | drwxr-xr-x. | ||
+ | dr-xr-xr-x. 17 root root 224 Jul 19 12:05 .. | ||
+ | -rw-------. | ||
+ | -rw-------. | ||
+ | drwx------. | ||
+ | drwxr-xr-x. 17 trainee trainee | ||
+ | </ | ||
+ | |||
+ | Now create a user called | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# groupadd fenestros && useradd fenestros -c FenestrOs -d / | ||
+ | [root@centos8 ~]# passwd fenestros | ||
+ | Changing password for user fenestros. | ||
+ | New password: | ||
+ | BAD PASSWORD: The password contains the user name in some form | ||
+ | Retype new password: | ||
+ | passwd: all authentication tokens updated successfully. | ||
+ | </ | ||
+ | |||
+ | ====3.2 - The edquota Command==== | ||
+ | |||
+ | Set a 10Mo quota for the fenestros user: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# edquota -u fenestros -f /home | ||
+ | </ | ||
+ | |||
+ | The **vi** editor launches and you will see the following output: | ||
+ | |||
+ | < | ||
+ | Disk quotas for user fenestros (uid 1001): | ||
+ | Filesystem | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Change the file as follows: | ||
+ | |||
+ | < | ||
+ | Disk quotas for user fenestros (uid 1001): | ||
+ | Filesystem | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - This sets a **soft** quota of 8 000 KB and a **hard** quota of 10 000 KB for the fenestros user. When fenestros goes over the soft limit, he/she will recieve a warning message. Going over the hard limit means thet he/she can no longer save files to **/ | ||
+ | </ | ||
+ | |||
+ | Save and quit the file. | ||
+ | |||
+ | The command line switches of the **edquota** command are as follows: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# edquota --help | ||
+ | edquota: Usage: | ||
+ | edquota [-rm] [-u] [-F formatname] [-p username] [-f filesystem] username ... | ||
+ | edquota [-rm] -g [-F formatname] [-p groupname] [-f filesystem] groupname ... | ||
+ | edquota [-rm] -P [-F formatname] [-p projectname] [-f filesystem] projectname ... | ||
+ | edquota [-u|g|-P] [-F formatname] [-f filesystem] -t | ||
+ | edquota [-u|g|-P] [-F formatname] [-f filesystem] -T username|groupname|projectname ... | ||
+ | |||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -P, --project | ||
+ | -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 60%> | ||
+ | **Important** - The procedure is similar in the case that you specify a group quota. In this case, use the **-g** switch of the edquota command. | ||
+ | </ | ||
+ | |||
+ | ====3.3 - The quotaon Command==== | ||
+ | |||
+ | Now apply the quotas : | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# quotaon -a | ||
+ | </ | ||
+ | |||
+ | The command line switches of the **quotaon** command are as follows: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# quotaon --help | ||
+ | quotaon: Usage: | ||
+ | quotaon [-guPvp] [-F quotaformat] [-x state] -a | ||
+ | quotaon [-guPvp] [-F quotaformat] [-x state] filesys ... | ||
+ | |||
+ | -a, --all turn quotas on for all filesystems | ||
+ | -f, --off turn quotas off | ||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -P, --project | ||
+ | -p, --print-state | ||
+ | -x, --xfs-command=cmd | ||
+ | -F, --format=formatname | ||
+ | -v, --verbose | ||
+ | -h, --help | ||
+ | -V, --version | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **important** - To turn **off** quotas, use the **quotaoff** command. | ||
+ | </ | ||
+ | |||
+ | ====3.4 - The repquota Command==== | ||
+ | |||
+ | To see quotas, use the **repquota** command: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# repquota /home | ||
+ | *** Report for user quotas on device /dev/sdc1 | ||
+ | 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 60%> | ||
+ | **Important** - Note that fenestros is not visible in this list. With RHEL / CentOS, quotas are not visible until the user has connected for the first time. | ||
+ | </ | ||
+ | |||
+ | The command line switches of the **repquota** command are as follows: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# repquota --help | ||
+ | repquota: Utility for reporting quotas. | ||
+ | Usage: | ||
+ | repquota [-vugsi] [-c|C] [-t|n] [-F quotaformat] [-O (default | xml | csv)] (-a | mntpoint) | ||
+ | |||
+ | -v, --verbose | ||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -P, --project | ||
+ | -s, --human-readable | ||
+ | -t, --truncate-names | ||
+ | -p, --raw-grace | ||
+ | -n, --no-names | ||
+ | -i, --no-autofs | ||
+ | -c, --cache | ||
+ | -C, --no-cache | ||
+ | -F, --format=formatname | ||
+ | -O, --output=format | ||
+ | -a, --all | ||
+ | -h, --help | ||
+ | -V, --version | ||
+ | |||
+ | Bugs to jack@suse.cz | ||
+ | </ | ||
+ | |||
+ | ====3.5 - The quota Command==== | ||
+ | |||
+ | To see quotas for a specific user, use the **quota** command: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# quota fenestros | ||
+ | Disk quotas for user fenestros (uid 1001): no limited resources used | ||
+ | [root@centos8 ~]# su - fenestros | ||
+ | [fenestros@centos8 ~]$ touch test | ||
+ | [fenestros@centos8 ~]$ exit | ||
+ | logout | ||
+ | [root@centos8 ~]# quota fenestros | ||
+ | Disk quotas for user fenestros (uid 1001): | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | The command line switches of the **quota** command are as follows: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# quota --help | ||
+ | quota: Usage: quota [-guPqvswim] [-l | [-Q | -A]] [-F quotaformat] | ||
+ | quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -u username ... | ||
+ | quota [-qvswim] [-l | [-Q | -A]] [-F quotaformat] -g groupname ... | ||
+ | quota [-qvswugPQm] [-F quotaformat] -f filesystem ... | ||
+ | |||
+ | -u, --user | ||
+ | -g, --group | ||
+ | -P, --project | ||
+ | -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, --all-nfs | ||
+ | -m, --no-mixed-pathnames | ||
+ | --show-mntpoint | ||
+ | --hide-device | ||
+ | -h, --help | ||
+ | -V, --version | ||
+ | |||
+ | Bugs to: jack@suse.cz | ||
+ | </ | ||
+ | |||
+ | ====3.6 - The warnquota Command==== | ||
+ | |||
+ | The **warnquota** command checks user and group disk usage and sends out messages when the **soft** limit is reached. This command is normally called by a cron job however it is possible to use it interactively. With RHEL/ | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# which warnquota | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Install the **quota-warnquota** package: | ||
+ | |||
+ | < | ||
+ | [root@centos7 ~]# dnf install quota-warnquota | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | The command line switches of the **warnquota** command are as follows: | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# warnquota --help | ||
+ | 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 | ||
+ | |||
+ | warnquota: Bugs to jack@suse.cz | ||
+ | </ | ||
- | * **LCE603 | + | ----- |
- | * Presentation | + | Copyright © 2022 Hugh Norris. |
- | * The nmcli Command | + | |
- | * LAB #1 - Configuring the Network | + | |
- | * 1.1 - Connections and Profils | + | |
- | * 1.2 - Name Resolution | + | |
- | * 1.3 - Adding a Second IP Address to a Profile | + | |
- | * 1.4 - The hostname Command | + | |
- | * 1.5 - The ip Command | + | |
- | * 1.6 - Manually Activating and Disactivating a Device | + | |
- | * 1.7 - Static Routing | + | |
- | * The ip Command | + | |
- | * Disactivating/ | + | |
- | * LAB #2 - Diagnostics | + | |
- | * 2.1 - The ping Command | + | |
- | * 2.2 - The netstat Command | + | |
- | * 2.3 - The traceroute Command | + | |
- | * LAB #3 - SSH | + | |
- | * 3.1 - Presentation | + | |
- | * SSH-1 | + | |
- | * SSH-2 | + | |
- | * 3.2 - Configuring the Server | + | |
- | * 3.3 - Configuring the Client | + | |
- | * 3.4 - SCP | + | |
- | * Presentation | + | |
- | * Usage | + | |
- | * 3.5 - Authentication with Asymetric Keys | + |