Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
installfreebsd [2019/03/25 08:40] – [Network Manager] cyrille | installfreebsd [2019/05/16 22:30] – [Mises à jour] cyrille | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
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. | ||
- | Attention si en parallèle d'un linux, laisser le Linux gérer le grub via le MBR et rajouter une entrée dans le grub. | ||
- | Exemple : | ||
- | <code bash>cat / | ||
- | #!/bin/sh | ||
- | exec tail -n +3 $0 | ||
- | # This file provides an easy way to add custom menu entries. | ||
- | # menu entries you want to add after this comment. | ||
- | # the 'exec tail' line above. | ||
- | menuentry " | ||
- | set root=' | ||
- | kfreebsd / | ||
- | }</ | ||
- | Si que freesbd sur le disque, utiliser <code bash> | ||
===== Installation ===== | ===== Installation ===== | ||
Ligne 69: | 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 86: | 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 159: | Ligne 159: | ||
<code bash> pkg install | <code bash> pkg install | ||
+ | |||
+ | {{ :: | ||
===== Devices : permissions ===== | ===== Devices : permissions ===== | ||
Permettra en autres l' | Permettra en autres l' | ||
Ligne 223: | Ligne 225: | ||
<code bash>/ | <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 698: | Ligne 714: | ||
</ | </ | ||
+ | |||
+ | ===== XFCE / Archives ===== | ||
+ | Si vous avez le message d' | ||
+ | |||
+ | <code bash>pkg install xarchiver</ | ||
=====Arduino===== | =====Arduino===== | ||
Ligne 730: | 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 784: | 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 |
- | + | ||
- | ==== 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> | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | <code bash>cat / | + | |
- | ## 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 | + | |
- | </ | + | |
- | + | ||
- | ===== SSD Config | + | |
Rien d' | Rien d' | ||
Chez moi ada0p2 (**/**) et ada0p4 (**/home**) | Chez moi ada0p2 (**/**) et ada0p4 (**/home**) | ||
Ligne 858: | Ligne 887: | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== 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> | ||
+ | |||
+ | => | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 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</ | ||
+ | |||
+ | Si ne fonctionne touojours pas après un redémarrage, | ||
+ | <code bash> | ||
+ | ******* Working on device /dev/ada0 ******* | ||
+ | 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 " | ||
+ | |||
+ | 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 gelés ==== | ||
+ | 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</ | ||
+ | ===== 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===== | + | ===== 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 875: | Ligne 1108: | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[http:// |