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/09 18:41] – cyrille | installfreebsd [2019/05/16 22:30] – [Mises à jour] cyrille | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Francisation | + | ======Installation de freeBSD 12====== |
- | Editer le fichier / | + | |
+ | Sur laptop, DELL Latitude E5430 et DELL Latitude E6410 | ||
- | default:\ | + | Testé avec un schéma de partition UFS et ZFS, en mode UEFI et LEGACY. |
+ | |||
+ | |||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | Récupérer l'iso de freeBSD. La graver sur une clef USB et booter dessus. | ||
+ | Suivre l' | ||
+ | |||
+ | | {{ : | ||
+ | Faire attention au stade de configuration réseau de choisir pour ETSI / FR | ||
+ | " | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | |||
+ | Voici les options que j'ai choisies lors de **System Configuration** | ||
+ | {{ : | ||
+ | |||
+ | |||
+ | Rebooter sur freeBSD | ||
+ | |||
+ | |||
+ | =====Francisation===== | ||
+ | Editer le fichier **/ | ||
+ | |||
+ | |||
+ | < | ||
: | : | ||
: | : | ||
Ligne 28: | Ligne 57: | ||
: | : | ||
: | : | ||
- | :lang=fr-FR.UTF-8:\ | + | :lang=fr_FR.UTF-8:\ |
- | : | + | : |
- | Ajouter | + | |
- | : | + | Ajouter |
- | :lang=fr-FR.UTF-8:\ | + | <code bash> : |
+ | :lang=fr_FR.UTF-8:\</ | ||
Le recharger | Le recharger | ||
- | cap_mkdb /etc /login.conf | + | <code bash>cap_mkdb / |
+ | =====Initialisation de pkg===== | ||
+ | | {{ : | ||
- | AJOUTER un user | ||
- | # adduser | ||
- | L’inclure dans les groupes : wheel operator video | ||
+ | =====AJOUTER un user===== | ||
+ | <code bash># adduser</ | ||
+ | L’inclure dans les groupes : **wheel operator video** | ||
+ | Editer .login_conf | ||
- | Gestion du son | + | <code bash> |
+ | [ragnarok@asgard-freebsd: | ||
+ | # $FreeBSD: releng/ | ||
+ | # | ||
+ | # see login.conf(5) | ||
+ | # | ||
+ | me:\ | ||
+ | : | ||
+ | : | ||
- | #kldload snd_driver | + | |
- | cat / | + | |
+ | =====Gestion du son===== | ||
+ | |||
+ | <code bash># kldload snd_driver</ | ||
+ | <code bash>cat / | ||
Installed devices: | Installed devices: | ||
pcm0: <IDT 92HD93BXX (Analog 2.0+HP/ | pcm0: <IDT 92HD93BXX (Analog 2.0+HP/ | ||
Ligne 54: | Ligne 99: | ||
pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play) | pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play) | ||
pcm4: <Intel Panther Point (HDMI/DP 8ch)> (play) | pcm4: <Intel Panther Point (HDMI/DP 8ch)> (play) | ||
- | No devices installed from userspace. | + | No devices installed from userspace.</ |
+ | |||
+ | <code bash># sysrc kld_list+=snd_hda</ | ||
+ | |||
+ | |||
+ | =====Affichage | ||
+ | Installer le paquet | ||
+ | <code bash>pkg install drm-kmod</ | ||
+ | |||
+ | Initialisation au boot | ||
+ | <code bash> | ||
+ | |||
+ | Le charger | ||
+ | <code bash> | ||
+ | |||
+ | Vérifier | ||
+ | <code bash> | ||
+ | |||
+ | |||
+ | |||
+ | ===== 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 :wheel | ||
+ | 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>/ | ||
- | #sysrc kld_list+=snd_hda | + | ===== Powerd++ ===== |
+ | Gestion des processeurs multicores. | ||
+ | Desinstaller **powerd** | ||
- | drm-kmod | + | <code bash># service powerd stop |
- | pkg install drm-kmod | + | Stopping powerd. |
- | sysrc kld_list+="/ | + | Waiting for PIDS: 50127. |
- | kldload | + | # service powerd disable |
- | kldstat -v | grep i915 | + | powerd disabled in /etc/rc.conf</code> |
+ | Ensuite on peut installer et lancer **powerd++** : | ||
+ | <code bash># service powerdxx enable | ||
+ | powerdxx enabled in / | ||
+ | # service powerdxx start | ||
+ | Starting powerdxx.</ | ||
+ | =====X11 / XFCE===== | ||
+ | <code bash>pkg install xorg xfce xfce4-goodies xfce4-mixer xfce4-volumed xf86-video-intel file-roller</ | ||
- | X11 / XFCE | ||
- | pkg install xorg xfce xfce4-goodies xfce4-mixer xfce4-volumed xf86-video-intel file-roller | ||
+ | ====Pour activer le suspend et resume ==== | ||
+ | Créer ces 2 fichiers | ||
+ | **/ | ||
- | Pour activer le suspend et resume | ||
- | pkg info -D xfce4-session | ||
- | xfce4-session-4.12.1_4: | ||
- | Always: | ||
- | To be able to shutdown or reboot your system, you'll have to add .rules | ||
- | files in / | ||
- | like this (replace PUTYOURGROUPHERE by your group): | ||
- | polkit.addRule(function (action, subject) { | + | <code bash>polkit.addRule(function (action, subject) { |
if ((action.id == " | if ((action.id == " | ||
action.id == " | action.id == " | ||
Ligne 88: | Ligne 260: | ||
} | } | ||
}); | }); | ||
+ | </ | ||
- | For those who have working suspend/resume: | + | **/usr/ |
- | polkit.addRule(function (action, subject) { | + | <code bash>polkit.addRule(function (action, subject) { |
if (action.id == " | if (action.id == " | ||
&& subject.isInGroup(" | && subject.isInGroup(" | ||
return polkit.Result.YES; | return polkit.Result.YES; | ||
} | } | ||
- | }); | + | });</ |
+ | |||
+ | puis | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | |||
+ | ====Démarrer xfce==== | ||
+ | On aura besoin de dbus | ||
+ | <code bash>Pkg install dbus | ||
+ | service dbus onestart</ | ||
- | Démarrer xfce | + | Démarrage auttomatique, |
+ | <code bash>cat / | ||
+ | dbus_enable=" | ||
- | Lancer dbus | + | On utilisera xinit pour le lacement de XFCE |
- | Pkg install dbus | + | Créer dans le Home un **.xinitrc** |
- | service dbus onestart | + | |
- | Créer dans le Home un .xinitrc | + | |
- | # SET PROPER locale | + | <code bash># SET PROPER locale |
export LANG=" | export LANG=" | ||
export LC_ALL=" | export LC_ALL=" | ||
Ligne 116: | Ligne 299: | ||
setxkbmap fr & | setxkbmap fr & | ||
# Lancer xfce | # Lancer xfce | ||
- | / | + | / |
Lier xinitrc et xsession | Lier xinitrc et xsession | ||
- | ln -s ~/.xinitrc ~/.xsession | + | <code bash> |
+ | Enfin lancer la session X | ||
+ | <code bash> | ||
+ | Pour démarrer la session de XFCE, j'ai choisi la façon manuelle sinon on peut passer, entre autre par SLIM. | ||
+ | J'ai donc créer cet alias | ||
+ | <code bash> | ||
+ | et la commande **x** suffit au démarrage de XFCE | ||
- | anti-aliasing avec la police Helvetica | + | Sinon : jeter un oeil à SLIM : [[https:// |
- | Editer ce fichier ainsi | + | |
- | <?xml version=' | + | |
+ | |||
+ | |||
+ | ====anti-aliasing avec la police Helvetica===== | ||
+ | Editer ce fichier ainsi : **/ | ||
+ | <code bash><?xml version=' | ||
< | < | ||
< | < | ||
Ligne 170: | Ligne 364: | ||
</ | </ | ||
- | </ | + | </ |
+ | ====Gestionnaire WIFI==== | ||
+ | Bien que par défaut, on n'en a pas besoin. On peut vouloir utiliser un outil style Gestionnaire Wifi | ||
+ | <code bash>pkg install wifimgr</ | ||
- | Paramétrage de Xorg | + | Sinon la(es) connexion(s) se gère(nt) via : |
+ | <code bash> cat / | ||
- | # cat / | + | ====Barre de Menu pour XFCE==== |
+ | |||
+ | J' | ||
+ | |||
+ | <code bash># pkg install plank</ | ||
+ | |||
+ | Ajouter cette commande au démarrage de XFCE | ||
+ | =====Paramétrage de Xorg===== | ||
+ | ====Carte video==== | ||
+ | Créer ces 2 fichiers | ||
+ | <code bash># cat / | ||
Section " | Section " | ||
Identifier " | Identifier " | ||
Ligne 181: | Ligne 389: | ||
Option " | Option " | ||
Option | Option | ||
- | EndSection | + | EndSection</ |
- | + | ====Le clavier==== | |
- | # cat / | + | <code bash># cat / |
Section " | Section " | ||
Identifier " | Identifier " | ||
Ligne 190: | Ligne 398: | ||
Option " | Option " | ||
Option " | Option " | ||
- | EndSection | + | EndSection</ |
+ | =====Configuration spécifique===== | ||
+ | ====timeout boot==== | ||
+ | Diminuer le timeout du menu du boot loader à 2 secondes | ||
+ | <code bash> | ||
- | + | ====Acc. chiffr.==== | |
- | Diminuer le timeout du menu du boot loader à 2 secondes | + | |
- | sysrc -f / | + | |
Accélération de chiffrement des processeurs modernes | Accélération de chiffrement des processeurs modernes | ||
- | #echo ' | + | <code bash>#echo ' |
- | Module à charger dans /boot et non etcrc.conf pour un chargement plus rapide | + | Module à charger dans /boot et non /etc/rc.conf pour un chargement plus rapide |
- | + | ||
- | + | ||
- | On commence par optimiser le scheduler pour un usage desktop: | + | |
- | sysrc -f / | + | ====Scheduler==== |
+ | Configuration pour une utilisation pour desktop/ | ||
+ | <code bash>sysrc -f / | ||
Pour activer la réponse «yes» aux questions de fsck au démarrage: | Pour activer la réponse «yes» aux questions de fsck au démarrage: | ||
- | + | <code bash>sysrc fsck_y_enable=YES</ | |
- | sysrc fsck_y_enable=YES | + | ====Micro codes CPU==== |
Utiliser micro codes CPU | Utiliser micro codes CPU | ||
- | pkg install devcpu-data | + | <code bash>pkg install devcpu-data |
service microcode_update enable | service microcode_update enable | ||
- | service microcode_update start | + | service microcode_update start</ |
+ | |||
+ | ==== ACPI ==== | ||
+ | === CPU et TEMP === | ||
| | ||
| | ||
- | sysrc kld_list+=coretemp | + | <code bash>sysrc kld_list+=coretemp |
- | sysrc kld_list+=cpuctl | + | sysrc kld_list+=cpuctl</ |
+ | ==== Fn Keys : DELL latitude E5430 ==== | ||
+ | Ai rencontré un soucis avec les touches **Fn + brightness** seulement sur le Latitude E5430. Avec le Latitude E6410 pas de soucis. | ||
- | Monter les périphériques amovibles | + | Les touches** FN et luminosité -up/ |
- | Attention la version d’automount des repos ne permet | + | |
- | Installer git | + | Solution adoptée. |
- | # pkg install git | + | |
- | # git clone https:// | + | |
+ | Installer : | ||
+ | <code bash>pkg install xbindkeys intel-backlight</ | ||
+ | Fichier de configuration : | ||
+ | <code bash>cat .xbindkeysrc | ||
+ | # PERSONNAL XBINDKEYS | ||
+ | " | ||
+ | Alt + Down | ||
- | Initialisation des ports | + | " |
- | (nécessaires pour compiler exfat-utils/ | + | Alt + Up |
+ | </code> | ||
- | # portsnap fetch | + | Lancer xbindkeys au démarrage de la session **~/ |
- | # portsnap extract | + | |
+ | Ajouter cette section avant le démarrage de XFCE dans | ||
+ | <code bash># Démarrer xbindkeys | ||
+ | / | ||
- | # cd /usr/ports/ | + | ==== XFCE / FLUXBOX |
- | # make install clean | + | Pour avoir le choix entre plus Windows Manager : ici fluxbox, openbox |
- | Accepter la licence et toutes les options par défaut | + | |
- | # cd / | + | <code bash>pkg install openbox openbox-themes obconf fluxbox fluxbox-tenr-styles-pack icewm wmakerconf windowmaker blackbox |
- | # make install clean | + | |
- | Même procédure | + | |
- | Installer | + | Modifier |
- | # pkg install fusefs-ntfs fusefs-ext4fuse fusefs-hfsfuse fusefs-lkl fusefs-simple-mtpfs zenity | + | |
+ | <code bash># GESTIONNAIRE X | ||
+ | DEFAULT_SESSION=startxfce4 | ||
+ | case $1 in | ||
+ | o) | ||
+ | exec openbox | ||
+ | ;; | ||
+ | f) | ||
+ | exec fluxbox | ||
+ | ;; | ||
+ | i) | ||
+ | icewmbg & | ||
+ | icewmtray & | ||
+ | exec icewm | ||
+ | ;; | ||
+ | w) | ||
+ | exec wmaker | ||
+ | ;; | ||
+ | b) | ||
+ | exec blackbox | ||
+ | ;; | ||
+ | *) | ||
+ | exec $DEFAULT_SESSION | ||
+ | ;; | ||
+ | esac | ||
+ | </ | ||
+ | Dans votre shell, créer l' | ||
+ | <code bash> | ||
+ | A la connexion, un **x** lancer xfce, **x o** openbox **x b** blackbox.... | ||
+ | =====Monter les périphériques amovibles===== | ||
+ | Attention la version d’automount des repos ne permet pas de monter du FAT32. Utiliser cette procédure. | ||
+ | ====Installer git==== | ||
+ | <code bash># pkg install git | ||
+ | # git clone https:// | ||
+ | </ | ||
- | Détarer automount-1.6.1.tar.gz , entrez dans le dossier | + | |
- | # cp automount.conf | + | ====Initialisation des ports==== |
+ | (nécessaires pour compiler exfat-utils/ | ||
+ | |||
+ | <code bash># portsnap fetch | ||
+ | # portsnap extract | ||
+ | </ | ||
+ | |||
+ | Compilation de fusefs-exfat | ||
+ | <code bash># cd / | ||
+ | # make install clean</ | ||
+ | Accepter la licence et toutes les options par défaut | ||
+ | |||
+ | Compilation de exfat-utils | ||
+ | <code bash># cd / | ||
+ | # make install clean</ | ||
+ | Même procédure | ||
+ | |||
+ | Installer le reste des dépendances via pkg | ||
+ | <code bash># pkg install fusefs-ntfs fusefs-ext4fuse fusefs-hfsfuse fusefs-lkl fusefs-simple-mtpfs zenity | ||
+ | |||
+ | |||
+ | Détarer automount-1.6.1.tar.gz | ||
Editer ce fichier de cette façon | Editer ce fichier de cette façon | ||
- | $ cat / | + | <code bash>$ cat / |
USERUMOUNT=YES | USERUMOUNT=YES | ||
ATIME=NO | ATIME=NO | ||
Ligne 269: | Ligne 540: | ||
USER=ragnarok | USER=ragnarok | ||
ENCODING=fr_FR.UTF-8 | ENCODING=fr_FR.UTF-8 | ||
- | CODEPAGE=cp850 | + | CODEPAGE=cp850</ |
+ | Installation manuelle d' | ||
+ | <code bash># cp automount.conf | ||
# cp automount_devd.conf / | # cp automount_devd.conf / | ||
# cp automount | # cp automount | ||
# chmod +x / | # chmod +x / | ||
- | # / | + | # / |
Et hop, ça fonctionne…... | Et hop, ça fonctionne…... | ||
+ | |||
+ | =====Dropbox===== | ||
+ | Pas de portage Dropbox sous freeBSD | ||
+ | Le kernel de freeBSD ne prend pas en charge **inotify** donc pas de dropbox... En tout cas dropbox ne fournit pas de client freeBSD. Reste à trouver une alternative ou utiliser wine et le client windows (parait il)... Il y aussi [[https:// | ||
+ | |||
+ | En alternative, | ||
+ | |||
+ | < | ||
+ | rclone-1.43 | ||
+ | Name : rclone | ||
+ | Version | ||
+ | Installed on : Sat Feb 23 19:02:31 2019 CET | ||
+ | Origin | ||
+ | Architecture | ||
+ | Prefix | ||
+ | Categories | ||
+ | Licenses | ||
+ | Maintainer | ||
+ | WWW : https:// | ||
+ | Comment | ||
+ | Annotations | ||
+ | FreeBSD_version: | ||
+ | repo_type | ||
+ | repository | ||
+ | Flat size : 26.1MiB | ||
+ | Description | ||
+ | Sync files to and from Google Drive, S3, Swift, Cloudfiles, Dropbox and | ||
+ | Google Cloud Storage | ||
+ | |||
+ | WWW: https:// | ||
+ | |||
+ | On l' | ||
+ | <code bash># pkg install rclone</ | ||
+ | |||
+ | Puis on le configure | ||
+ | <code bash>$ rclone config</ | ||
+ | |||
+ | Toute la doc est là [[https:// | ||
+ | |||
+ | L' | ||
+ | |||
+ | Sur mon système mon répertoire **dropbox** et dans mon** / | ||
+ | |||
+ | J'ai écrit ce script qui fonctionne sur 3 arguments | ||
+ | * le premier : **IN** ou **OUT** : la synchronisation se fait vers la Dropbox ou depuis la Dropbox | ||
+ | * le second : **répertoire à mettre à jour** : COURS ou DIR | ||
+ | * le dernier : **dry** ou **write** : **dry** : on simule, **write** on met à jour | ||
+ | |||
+ | Puis 1 alias : | ||
+ | <code bash> | ||
+ | |||
+ | Pour mettre à jour le répertoire DIR depuis la Dropbox vers mon PC | ||
+ | <code bash> | ||
+ | |||
+ | Pour simuler une synchroniation du répertoire COURS de mon PC vers la Dropbox | ||
+ | <code bash> | ||
+ | |||
+ | Et c'est tout ! Le script ci-dessous : | ||
+ | |||
+ | |||
+ | <code bash># | ||
+ | echo == DEBUG == | ||
+ | echo "Nom du script : $0"; | ||
+ | echo argument 1 : $1 | ||
+ | echo argument 2 : $2 | ||
+ | echo "Tous les arguments : $* ($# arguments)" | ||
+ | echo == FIN DEBUG == | ||
+ | |||
+ | |||
+ | # ========================================= | ||
+ | case $# in | ||
+ | 0) echo "Aucun parametre" | ||
+ | echo " | ||
+ | 1) echo "Il manque un paramètre !" | ||
+ | echo " | ||
+ | 2) echo "2 parametres passes au programme : $1 et $2";; | ||
+ | 3) echo "Le 3eme argument ne peut être que --dry-run ou write";; | ||
+ | *) echo "TROP DE PARAMETRES !" | ||
+ | echo " | ||
+ | esac | ||
+ | |||
+ | # ========================================= | ||
+ | if [ $1 == " | ||
+ | then | ||
+ | echo " | ||
+ | source=" | ||
+ | dest="/ | ||
+ | |||
+ | elif [ $1 == " | ||
+ | then | ||
+ | echo "Vers la dropbox" | ||
+ | source="/ | ||
+ | dest=" | ||
+ | |||
+ | else | ||
+ | echo " | ||
+ | exit; | ||
+ | fi | ||
+ | # ========================================= | ||
+ | if [ $2 == " | ||
+ | then | ||
+ | echo " | ||
+ | dir=" | ||
+ | elif [ $2 == " | ||
+ | then | ||
+ | echo " | ||
+ | dir=" | ||
+ | elif [ $2 == " | ||
+ | then | ||
+ | echo " | ||
+ | dir=" | ||
+ | else | ||
+ | echo " | ||
+ | exit; | ||
+ | fi | ||
+ | # ========================================= | ||
+ | |||
+ | if [ $3 == " | ||
+ | then | ||
+ | echo " | ||
+ | option=" | ||
+ | elif [ $3 == " | ||
+ | then | ||
+ | echo " | ||
+ | option=""; | ||
+ | else | ||
+ | echo " | ||
+ | exit; | ||
+ | fi | ||
+ | # ========================================= | ||
+ | |||
+ | echo " | ||
+ | rclone sync $source$dir $dest$dir $option --progress | ||
+ | |||
+ | echo " --------------- Done."; | ||
+ | </ | ||
+ | ===== WINE ===== | ||
+ | Attention il faut installer le paquet i386 même si on est en 64bit, sinon erreur de segmentation. | ||
+ | |||
+ | Donc | ||
+ | <code bash>pkg install i386-wine</ | ||
+ | |||
+ | Puis peaufinage via | ||
+ | <code bash>$ winecfg</ | ||
+ | |||
+ | Accepter tout ce qu'il propose de télécharger et installer. | ||
+ | |||
+ | |||
+ | Fonctionne nickel, mais les polices sont vraiment bizarres. | ||
+ | |||
+ | Éditer **~/ | ||
+ | <code bash><? | ||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | <!-- antialias all fonts --> | ||
+ | <match target=" | ||
+ | <edit name=" | ||
+ | <edit name=" | ||
+ | <edit name=" | ||
+ | <edit name=" | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== XFCE / Archives ===== | ||
+ | Si vous avez le message d' | ||
+ | |||
+ | <code bash>pkg install xarchiver</ | ||
+ | |||
+ | =====Arduino===== | ||
+ | Surtout ne pas installer la version depuis les ports, elle ne passe pas (l'iDE d' | ||
+ | <code bash>pkg install arduino</ | ||
+ | |||
+ | Si nécessaire, | ||
+ | <code bash> | ||
+ | # sudo pw groupmod operator -m $USER | ||
+ | # sudo pw groupmod dialer -m $USER</ | ||
+ | |||
+ | Donner l' | ||
+ | # cat / | ||
+ | # | ||
+ | # Allow operators access to usb devices. | ||
+ | # | ||
+ | [operator_usb=5] | ||
+ | add path usbctl mode 0660 group operator | ||
+ | add path ' | ||
+ | add path ' | ||
+ | |||
+ | Prise en compte des changements | ||
+ | <code bash># sudo sysrc devfs_system_ruleset=operator_usb</ | ||
+ | Relance du service devfs | ||
+ | <code bash># sudo service devfs restart</ | ||
+ | |||
+ | On branche sa carte et on vérifie sa détection | ||
+ | <code bash>$ usbconfig | ||
+ | ... | ||
+ | ugen0.2: <Arduino (www.arduino.cc) product 0x0043> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) | ||
+ | </ | ||
+ | |||
+ | {{ :: | ||
+ | |||
+ | |||
+ | ===== 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]] | ||
+ | |||
+ | |||
+ | =====DUAL BOOT freeBSD / Linux===== | ||
+ | J' | ||
+ | |||
+ | <code bash>$ sudo fdisk -l | ||
+ | Disque /dev/sda : 111,8 GiB, 120034123776 octets, 234441648 secteurs | ||
+ | Unités : secteur de 1 × 512 = 512 octets | ||
+ | Taille de secteur (logique / physique) : 512 octets / 512 octets | ||
+ | taille d'E/S (minimale / optimale) : 512 octets / 512 octets | ||
+ | Type d' | ||
+ | Identifiant de disque : 0x0c3bb11c | ||
+ | |||
+ | Périphérique Amorçage | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Donc on voit | ||
+ | * sda1 : Partition primaire : Racine linux / | ||
+ | * sda2 : Partition étendue | ||
+ | * sda 3 : FreeBSD | ||
+ | * sda5 : swap Linux | ||
+ | |||
+ | **Configuration du grub sous LINUX** | ||
+ | Sous LINUX, éditer le fichier suivant : **/ | ||
+ | |||
+ | Attention hd0,3 car freeBSD est sur /dev/sda3, s'il était sur le 1, mettre hd0,1, sur le 2 hd0,2, sur la seconde partition d'un deuxième disque hd1,2... Donc à adapter à votre configuration | ||
+ | |||
+ | <code bash># | ||
+ | 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 / | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Prendre en compte les modifications de la configuration du grub | ||
+ | |||
+ | <code bash># update-grub | ||
+ | Création du fichier de configuration GRUB… | ||
+ | Image Linux trouvée : / | ||
+ | Image mémoire initiale trouvée : / | ||
+ | Found memtest86+ image: / | ||
+ | Found memtest86+ image: / | ||
+ | unknown Linux distribution trouvé sur /dev/sda3 | ||
+ | </ | ||
+ | |||
+ | Rebooter et la nouvelle entrée est fonctionnelle dans le grub. | ||
+ | |||
+ | ===== SSD Config [UFS] ===== | ||
+ | Rien d' | ||
+ | Chez moi ada0p2 (**/**) et ada0p4 (**/home**) | ||
+ | |||
+ | 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 -t enable ada0p2 | ||
+ | tunefs -t enable ada0p4</ | ||
+ | |||
+ | Rebooter | ||
+ | |||
+ | Vérfier que ce soit pris en compte | ||
+ | < | ||
+ | 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> | ||
+ | |||
+ | => | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 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 | ||
+ | ==== 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 ===== | ||
+ | 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 : | ||
+ | *[[http:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | Et surtout | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[http:// |