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 11:19] – [Installation de freeBSD 12] cyrille | installfreebsd [2019/03/27 12:23] – [Installation de freeBSD 12] 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 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 154: | 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>/ | ||
+ | |||
+ | |||
+ | |||
=====X11 / XFCE===== | =====X11 / XFCE===== | ||
Ligne 641: | Ligne 710: | ||
# sudo pw groupmod dialer -m $USER</ | # sudo pw groupmod dialer -m $USER</ | ||
- | Donner l' | + | Donner l' |
# cat / | # cat / | ||
# | # | ||
Ligne 649: | Ligne 718: | ||
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 665: | Ligne 734: | ||
+ | ===== 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> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <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 | ||
+ | </ | ||
+ | |||
+ | ===== 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) | ||
+ | </ | ||
=====DUAL BOOT freeBSD / Linux===== | =====DUAL BOOT freeBSD / Linux===== | ||
J' | J' | ||
Ligne 717: | Ligne 859: | ||
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 // | ||
- | ==== bash comme shell par défaut ==== | ||
+ | <code bash> | ||
- | Attention ne pas changer | + | => |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 440401960 | ||
+ | |||
+ | Dans un premier temps, régénérer | ||
+ | <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 | ||
- | <code bash># chsh -s / | + | The data for partition 2 is: |
+ | <UNUSED> | ||
+ | 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> | + | 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>cat /etc/fstab | + | <code bash>[ragnarok@asgard-freeBSD: |
- | ## append the following to /etc/fstab file ## | + | NAME PROPERTY |
- | fdesc /dev/fd fdescfs | + | zroot |
+ | zroot/ROOT canmount | ||
+ | zroot/ROOT/ | ||
+ | zroot/tmp | ||
+ | zroot/usr | ||
+ | zroot/ | ||
+ | zroot/usr/ports | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | zroot/ | ||
+ | </ | ||
+ | Si problème de montage au boot, vérifier que **/ | ||
+ | <code bash> | ||
- | ==== Autocomplétion ==== | + | ===== Sources ===== |
- | <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 | + | |
- | </ | + | |
- | + | ||
- | =====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 768: | Ligne 963: | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
- | + | *[[https:// | |
Et surtout | Et surtout | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
+ | *[[https:// |