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édenteProchaine révisionLes deux révisions suivantes | ||
installfreebsd [2019/03/23 18:21] – [Pour activer le suspend et resume] cyrille | installfreebsd [2019/06/05 13:45] – [Gestion des paquets gelés] cyrille | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
Sur laptop, DELL Latitude E5430 et DELL Latitude E6410 | Sur laptop, DELL Latitude E5430 et DELL Latitude E6410 | ||
+ | |||
+ | Testé avec un schéma de partition UFS et ZFS, en mode UEFI et LEGACY. | ||
+ | |||
+ | |||
===== Installation ===== | ===== Installation ===== | ||
Ligne 53: | Ligne 57: | ||
: | : | ||
: | : | ||
- | :lang=fr-FR.UTF-8:\ | + | :lang=fr_FR.UTF-8:\ |
: | : | ||
Ajouter pour que les locales soient prises en compte | Ajouter pour que les locales soient prises en compte | ||
<code bash> | <code bash> | ||
- | :lang=fr-FR.UTF-8: | + | :lang=fr_FR.UTF-8: |
Le recharger | Le recharger | ||
Ligne 70: | Ligne 74: | ||
<code bash># adduser</ | <code bash># adduser</ | ||
L’inclure dans les groupes : **wheel operator video** | L’inclure dans les groupes : **wheel operator video** | ||
+ | |||
+ | Editer .login_conf | ||
+ | |||
+ | <code bash> | ||
+ | [ragnarok@asgard-freebsd: | ||
+ | # $FreeBSD: releng/ | ||
+ | # | ||
+ | # see login.conf(5) | ||
+ | # | ||
+ | me:\ | ||
+ | : | ||
+ | : | ||
Ligne 103: | Ligne 119: | ||
+ | ===== Network Manager ===== | ||
+ | |||
+ | |||
+ | ==== Network Manager ==== | ||
+ | |||
+ | |||
+ | <code bash>pkg show networkmgr | ||
+ | WWW : https:// | ||
+ | Comment | ||
+ | Annotations | ||
+ | repo_type | ||
+ | repository | ||
+ | Flat size : 1.71MiB | ||
+ | Description | ||
+ | NetworkMgr is an open source, Network Manager based on the look of the Linux | ||
+ | Network Manager user interface. It use ifconfig and netif if make all work. | ||
+ | </ | ||
+ | |||
+ | Il faudra ensuite configurer DOA pour que ça fonctionne | ||
+ | |||
+ | <code bash>cat / | ||
+ | |||
+ | permit nopass keepenv root | ||
+ | permit : | ||
+ | permit nopass keepenv :wheel cmd netcardmgr | ||
+ | permit nopass keepenv :wheel cmd ifconfig | ||
+ | permit nopass keepenv :wheel cmd service</ | ||
+ | |||
+ | Se delogguer, l' | ||
+ | |||
+ | |||
+ | Gestion de la connexion par ce fichier | ||
+ | |||
+ | <code bash> cat / | ||
+ | |||
+ | {{ :: | ||
+ | |||
+ | ==== CLI graphique de gestion ==== | ||
+ | |||
+ | <code bash> pkg install | ||
+ | |||
+ | {{ :: | ||
+ | ===== Devices : permissions ===== | ||
+ | Permettra en autres l' | ||
+ | |||
+ | <code bash>cat / | ||
+ | |||
+ | # Allow all users to access optical media | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | |||
+ | # Allow all USB Devices to be mounted | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | |||
+ | # Misc other devices | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | perm / | ||
+ | </ | ||
+ | |||
+ | <code bash>cat / | ||
+ | |||
+ | [devfsrules_common=7] | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | add path ' | ||
+ | | ||
+ | Mettre à jour le **/ | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | Prendre en compte les modifications sans rebooter | ||
+ | <code bash>/ | ||
+ | |||
+ | ===== Powerd++ ===== | ||
+ | Gestion des processeurs multicores. | ||
+ | |||
+ | Desinstaller **powerd** | ||
+ | |||
+ | <code bash># service powerd stop | ||
+ | Stopping powerd. | ||
+ | Waiting for PIDS: 50127. | ||
+ | # service powerd disable | ||
+ | powerd disabled in / | ||
+ | |||
+ | Ensuite on peut installer et lancer **powerd++** : | ||
+ | <code bash># service powerdxx enable | ||
+ | powerdxx enabled in / | ||
+ | # service powerdxx start | ||
+ | Starting powerdxx.</ | ||
=====X11 / XFCE===== | =====X11 / XFCE===== | ||
Ligne 145: | Ligne 283: | ||
<code bash>Pkg install dbus | <code bash>Pkg install dbus | ||
service dbus onestart</ | service dbus onestart</ | ||
+ | |||
+ | Démarrage auttomatique, | ||
+ | <code bash>cat / | ||
+ | dbus_enable=" | ||
On utilisera xinit pour le lacement de XFCE | On utilisera xinit pour le lacement de XFCE | ||
Ligne 551: | Ligne 693: | ||
Puis peaufinage via | Puis peaufinage via | ||
<code bash>$ winecfg</ | <code bash>$ winecfg</ | ||
+ | |||
+ | Accepter tout ce qu'il propose de télécharger et installer. | ||
+ | |||
Fonctionne nickel, mais les polices sont vraiment bizarres. | Fonctionne nickel, mais les polices sont vraiment bizarres. | ||
Ligne 569: | Ligne 714: | ||
</ | </ | ||
+ | |||
+ | ===== XFCE / Archives ===== | ||
+ | Si vous avez le message d' | ||
+ | |||
+ | <code bash>pkg install xarchiver</ | ||
=====Arduino===== | =====Arduino===== | ||
Ligne 579: | Ligne 729: | ||
# sudo pw groupmod dialer -m $USER</ | # sudo pw groupmod dialer -m $USER</ | ||
- | Donner l' | + | Donner l' |
# cat / | # cat / | ||
# | # | ||
Ligne 587: | Ligne 737: | ||
add path usbctl mode 0660 group operator | add path usbctl mode 0660 group operator | ||
add path ' | add path ' | ||
- | add path ' | + | add path ' |
Prise en compte des changements | Prise en compte des changements | ||
Ligne 601: | Ligne 751: | ||
{{ :: | {{ :: | ||
+ | |||
+ | |||
+ | ===== Bash ===== | ||
+ | |||
+ | ==== bash comme shell par défaut ==== | ||
+ | |||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | Attention ne pas changer le shell du root | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | <code bash># chsh -s / | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | |||
+ | |||
+ | |||
+ | __Cas d'un système UFS__ | ||
+ | <code bash>cat /etc/fstab | ||
+ | ## append the following to /etc/fstab file ## | ||
+ | fdesc / | ||
+ | |||
+ | __Cas d'un système ZFS__ (**fdescfs** doit être monté après la racine zfs) | ||
+ | <code bash>cat /etc/fstab | ||
+ | ## append the following to /etc/fstab file ## | ||
+ | fdesc / | ||
+ | |||
+ | ==== Autocomplétion ==== | ||
+ | <code bash>add the following to your ~/.bashrc or ~/ | ||
+ | [[ $PS1 && -f / | ||
+ | . / | ||
+ | |||
+ | |||
+ | <code bash># pkg install bash-completion</ | ||
+ | |||
+ | ==== Alias ==== | ||
+ | Créer un fichier **.bash_aliases** | ||
+ | touch .bash_aliases | ||
+ | Et y mettre ses alias. Si non fait, insérer cette section dans le .bashrc | ||
+ | <code bash># Alias definitions. | ||
+ | # You may want to put all your additions into a separate file like | ||
+ | # ~/ | ||
+ | # See / | ||
+ | if [ -f ~/ | ||
+ | . ~/ | ||
+ | fi | ||
+ | </ | ||
+ | |||
+ | ===== VirtualBox ===== | ||
+ | Jeter un oeil : [[freebsdvirtualbox|VirtualBox sous freeBSD]] | ||
Ligne 655: | Ligne 858: | ||
Rebooter et la nouvelle entrée est fonctionnelle dans le grub. | Rebooter et la nouvelle entrée est fonctionnelle dans le grub. | ||
- | ===== Bash ===== | + | ===== SSD Config [UFS] ===== |
+ | Rien d' | ||
+ | Chez moi ada0p2 (**/**) et ada0p4 (**/home**) | ||
- | <code bash># chsh -s / | + | Rebooter et démarrer en mode :** Boot Single User** (le n°2). (Il ne faut pas que les partitions soient montées) |
+ | <code bash> | ||
+ | tunefs | ||
+ | tunefs -t enable ada0p4</ | ||
+ | Rebooter | ||
- | <code bash>grep ragnarok | + | Vérfier que ce soit pris en compte |
+ | <code bash>tunefs -p /dev/ada0p4 | grep trim | ||
+ | tunefs: POSIX.1e ACLs: (-a) disabled | ||
+ | tunefs: NFSv4 ACLs: (-N) | ||
+ | tunefs: MAC multilabel: (-l) | ||
+ | tunefs: soft updates: (-n) | ||
+ | tunefs: soft update journaling: (-j) | ||
+ | tunefs: gjournal: (-J) | ||
+ | tunefs: trim: (-t) | ||
+ | tunefs: maximum blocks per file in a cylinder group: (-e) 4096 | ||
+ | tunefs: average file size: (-f) 16384 | ||
+ | tunefs: average number of files in a directory: (-s) 64 | ||
+ | tunefs: minimum percentage of free space: (-m) 8% | ||
+ | tunefs: space to hold for metadata blocks: (-k) 6408 | ||
+ | tunefs: optimization preference: (-o) time | ||
+ | tunefs: volume label: (-L) | ||
+ | </ | ||
+ | ===== Problème de boot UFS ===== | ||
+ | Pour schéma de disque **UFS** | ||
+ | Au boot du système, j' | ||
+ | " | ||
+ | Une pression sur ENTER lançait cependant le système. | ||
+ | Voici la marche suivit par régler le problème (déclarer // | ||
- | <code bash>cat /etc/fstab | ||
- | ## append the following to /etc/fstab file ## | ||
- | fdesc / | ||
- | <code bash>add the following to your ~/.bashrc or ~/ | + | <code bash>gpart show |
- | [[ $PS1 && -f / | + | |
- | . / | + | |
+ | => | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 440401960 | ||
+ | | ||
+ | Dans un premier temps, régénérer le secteur de boot | ||
+ | <code bash>cd /boot | ||
+ | gpart bootcode -b pmbr -p gptboot -i1 ada0</ | ||
- | <code bash># pkg install bash-completion< | + | Si ne fonctionne touojours pas après un redémarrage, |
+ | <code bash>[ragnarok@asgard-freebsd:~] $ sudo fdisk -a | ||
+ | ******* Working on device | ||
+ | parameters extracted from in-core disklabel are: | ||
+ | cylinders=465141 heads=16 sectors/ | ||
+ | Figures below won't work with BIOS for partitions not in cyl 1 | ||
+ | parameters to be used for BIOS calculations are: | ||
+ | cylinders=465141 heads=16 sectors/ | ||
+ | Media sector size is 512 | ||
+ | Warning: BIOS sector numbering starts with sector 1 | ||
+ | Information from DOS bootblock is: | ||
+ | The data for partition 1 is: | ||
+ | sysid 238 (0xee),(EFI GPT) | ||
+ | start 1, size 468862127 (228936 Meg), flag 0 | ||
+ | beg: cyl 0/ head 0/ sector 2; | ||
+ | end: cyl 1023/ head 255/ sector 63 | ||
+ | The data for partition 2 is: | ||
+ | < | ||
+ | The data for partition 3 is: | ||
+ | < | ||
+ | The data for partition 4 is: | ||
+ | < | ||
+ | Do you want to change the active partition? [n] y | ||
+ | Supply a decimal value for " | ||
- | =====Sources===== | + | On précise le numéro de la partition où booter et valide le reste. |
+ | |||
+ | On reboote et ça devrait passer | ||
+ | |||
+ | ===== ZFS Configuration ===== | ||
+ | Si vous avez choisi cette option, vous devriez avoir cette sortie. | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | [ragnarok@asgard-freeBSD: | ||
+ | NAME | ||
+ | zroot | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | NAME PROPERTY | ||
+ | zroot | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | </ | ||
+ | |||
+ | Si problème de montage au boot, vérifier que **/ | ||
+ | <code bash> | ||
+ | |||
+ | |||
+ | Normalement le TRIM est pris en compte par défaut | ||
+ | <code bash> | ||
+ | vfs.zfs.trim.max_interval: | ||
+ | vfs.zfs.trim.timeout: | ||
+ | vfs.zfs.trim.txg_delay: | ||
+ | vfs.zfs.trim.enabled: | ||
+ | <code bash> | ||
+ | kstat.zfs.misc.zio_trim: | ||
+ | kstat.zfs.misc.zio_trim.failed: | ||
+ | kstat.zfs.misc.zio_trim.unsupported: | ||
+ | kstat.zfs.misc.zio_trim.success: | ||
+ | kstat.zfs.misc.zio_trim.bytes: | ||
+ | <code bash> | ||
+ | kern.cam.nda.max_trim: | ||
+ | kstat.zfs.misc.zio_trim.failed: | ||
+ | kstat.zfs.misc.zio_trim.unsupported: | ||
+ | kstat.zfs.misc.zio_trim.success: | ||
+ | kstat.zfs.misc.zio_trim.bytes: | ||
+ | </ | ||
+ | |||
+ | |||
+ | OPtimisation en lecture / écriture | ||
+ | (mais tout dépend de l' | ||
+ | <code bash> | ||
+ | zpool add ' | ||
+ | |||
+ | |||
+ | ===== Gestion des fichiers core ===== | ||
+ | ==== core générés par le kernel ==== | ||
+ | Dans **__/ | ||
+ | Ajouter cette option | ||
+ | <code bash> kern.coredump=0</ | ||
+ | Ou celle-ci : Reroutage des fichiers core | ||
+ | <code bash> | ||
+ | |||
+ | OU | ||
+ | | ||
+ | |||
+ | |||
+ | ==== core générés par les applications ==== | ||
+ | |||
+ | |||
+ | |||
+ | CSH | ||
+ | limit coredumpsize 0 dans **/ | ||
+ | |||
+ | BASH | ||
+ | |||
+ | |||
+ | ulimit -c 0 dans **.bash_profile** | ||
+ | |||
+ | ===== Mises à jour ===== | ||
+ | Récupérer la liste des mises à jour | ||
+ | <code bash># pkg update</ | ||
+ | |||
+ | |||
+ | La déployer | ||
+ | <code bash># pkg upgrade</ | ||
+ | |||
+ | |||
+ | ==== Gestion des paquets via pkg ==== | ||
+ | ===Lister les paquets gelés=== | ||
+ | <code bash># pkg lock -l</ | ||
+ | ===Geler un paquet === | ||
+ | <code bash># pkg lock -y LePaquet</ | ||
+ | Dégeler un paquet | ||
+ | <code bash># pkg unlock LePaquet</ | ||
+ | ===Installer la dernière version des paquets de pkg=== | ||
+ | |||
+ | Créer ce dossier | ||
+ | <code bash> | ||
+ | |||
+ | et ce fichier | ||
+ | <code bash>cat / | ||
+ | FreeBSD: { | ||
+ | url: " | ||
+ | }</ | ||
+ | |||
+ | Mettre à jour | ||
+ | === Vérfier quel dépôt est utilisé=== | ||
+ | <code bash>pkg -vv</ | ||
+ | === Informations sur pkg=== | ||
+ | <code bash>pkg info pkg</ | ||
+ | ===== Patchs de sécurité ===== | ||
+ | <code bash> | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | These are hardcoded into freebsd-version during the build.</ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <code bash> | ||
+ | src component not installed, skipped | ||
+ | Looking up update.FreeBSD.org mirrors... 3 mirrors found. | ||
+ | Fetching public key from update4.freebsd.org... done. | ||
+ | Fetching metadata signature for 12.0-RELEASE from update4.freebsd.org... done. | ||
+ | Fetching metadata index... done. | ||
+ | Fetching 2 metadata files... done. | ||
+ | Inspecting system... done. | ||
+ | Preparing to download files... done. | ||
+ | </ | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | src component not installed, skipped | ||
+ | Installing updates... done.</ | ||
+ | <code bash> | ||
+ | root@asgard-freeBSD: | ||
+ | FreeBSD asgard-freeBSD 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC | ||
+ | <code bash> | ||
+ | 12.0-RELEASE-p5</ | ||
+ | <code bash> | ||
+ | 12.0-RELEASE-p4</ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Sources ===== | ||
Je n'ai pas pondu tout cela tout seul, j'ai lu pas mal de docs et les forums BSD. | Je n'ai pas pondu tout cela tout seul, j'ai lu pas mal de docs et les forums BSD. | ||
Voici les sources indispensables à mon avis : | Voici les sources indispensables à mon avis : | ||
Ligne 686: | Ligne 1119: | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
- | + | *[[https:// | |
Et surtout | Et surtout | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[http:// |