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/24 10:41] – [WINE] cyrille | installfreebsd [2019/03/27 15:16] – 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 138: | Ligne 154: | ||
<code bash> cat / | <code bash> cat / | ||
+ | {{ :: | ||
==== CLI graphique de gestion ==== | ==== CLI graphique de gestion ==== | ||
<code bash> pkg install | <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 184: | 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 621: | Ligne 724: | ||
# sudo pw groupmod dialer -m $USER</ | # sudo pw groupmod dialer -m $USER</ | ||
- | Donner l' | + | Donner l' |
# cat / | # cat / | ||
# | # | ||
Ligne 629: | Ligne 732: | ||
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 643: | Ligne 746: | ||
{{ :: | {{ :: | ||
+ | |||
+ | |||
+ | ===== 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]] | ||
+ | |||
+ | ===== 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) | ||
+ | </ | ||
Ligne 697: | Ligne 882: | ||
Rebooter et la nouvelle entrée est fonctionnelle dans le grub. | Rebooter et la nouvelle entrée est fonctionnelle dans le grub. | ||
- | ===== Bash ===== | + | ===== 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># chsh -s / | ||
+ | <code bash> | ||
- | <code bash>grep ragnarok /etc/passwd</ | + | => |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 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. | ||
- | <code bash>cat / | + | On reboote et ça devrait passer |
- | ## append the following to /etc/fstab file ## | + | |
- | fdesc / | + | |
- | <code bash>add the following to your ~/.bashrc or ~/ | + | ===== ZFS Configuration ===== |
- | [[ $PS1 && -f / | + | Si vous avez choisi cette option, vous devriez avoir cette sortie. |
- | . / | + | |
- | <code bash># pkg install bash-completion</ | + | <code bash> |
+ | [ragnarok@asgard-freeBSD:~] $ zfs list | ||
+ | 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/ | ||
+ | </ | ||
- | =====Sources===== | + | 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: | ||
+ | </ | ||
+ | |||
+ | ===== 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 728: | Ligne 1007: | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
- | + | *[[https:// | |
Et surtout | Et surtout | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[http:// |