diff --git a/source/pages/baremetals.rst b/source/pages/baremetals.rst index 0a2a6c12464cd90f5074bb2aa3e0660b21733268..8c0921007e56a284d0f26f7c6857264160730993 100644 --- a/source/pages/baremetals.rst +++ b/source/pages/baremetals.rst @@ -23,7 +23,7 @@ O layout de discos é: │ │ │ Physical volume 240G │ │ │ - │ Disco␡1 Disco 2 │ + │ Disco 1 Disco 2 │ │ │ └──────▲────────────▲────┘ │ │ @@ -66,7 +66,7 @@ A tabela a segui demostra os tamanhos e tipo de cada partição: +------+------+---------+-----------------------------+ | BOOT | fd00 | 2G | boot | +------+------+---------+-----------------------------+ -| LVM | 8300 | - | lvm, todo restante do disco | +| LVM | 8e00 | - | lvm, todo restante do disco | +------+------+---------+-----------------------------+ Note que a raiz será formada por dois discos, a partição **BOOT** será a única @@ -138,7 +138,7 @@ de cada partição. O processo deve ser realizado nos dois discos. for disk in ${DISK1} ${DISK2}; do # id id type id label disco sgdisk -n 1:0:+1M -t 1:ef02 -c 1:BIOS ${disk} # partição da bios modo legado - sgdisk -n 2:0:+2G -t 2:fd00 -c 2:BOOT ${disk} # partição de boot + sgdisk -n 2:+1M:+2G -t 2:fd00 -c 2:BOOT ${disk} # partição de boot sgdisk -n 3:0:0 -t 3:8503 -c 3:LVM ${disk} # partição do lvm done; @@ -170,7 +170,7 @@ Execute o comando abaixo para criar o array: .. code:: shell - mdadm --create /dev/md/boot --level=1 --raid-devices=2 ${BOOT_PART1} ${BOOT_PART2} + mdadm --create /dev/md/boot --metadata=0.90 --level=1 --raid-devices=2 ${BOOT_PART1} ${BOOT_PART2} Passo 2: Formate o array ------------------------ @@ -230,7 +230,7 @@ As partições a serem criada são: +===========+=================+========================================+ | recover | 5 Gb | debian basico paara recover | +-----------+-----------------+----------------------------------------+ -| readonly | 10 Gb | Testes variados, debian basico | +| readonly | 20 Gb | Testes variados, debian basico | +-----------+-----------------+----------------------------------------+ | overlayfs | 50 Gb | camada de escrita da partição readonly | +-----------+-----------------+----------------------------------------+ @@ -240,10 +240,6 @@ As partições a serem criada são: .. code:: shell - lvcreate --name recover --size 5G rootlabsvg - lvcreate --name readonly --size 10G rootlabsvg - lvcreate --name overlayfs --size 50G rootlabsvg - lvcreate --type striped --name recover --size 5G rootlabsvg lvcreate --type striped --name readonly --size 20G rootlabsvg lvcreate --type striped --name overlayfs --size 50G rootlabsvg @@ -289,41 +285,41 @@ Os pacotes base são: .. hlist:: :columns: 4 - * systemd - * systemd-container - * systemd-timesyncd - * systemd-cron - * mdadm - * lvm2 - * grub2 - * linux-image-amd64 - * linux-headers-amd64 - * ssh - * rsync - * vim - * htop - * curl - * wget - * less - * lm-sensors - * iproute2 - * gdisk - * fdisk - * dnsutils - * iputils-ping - * zsh - * locales - * locales-all - * gcc - * make - * unzip - * tar - * man-db - * keyboard-configuration - * console-setup - * git - * python3 - * debootstrap + * systemd + * systemd-container + * systemd-timesyncd + * systemd-cron + * mdadm + * lvm2 + * grub2 + * linux-image-amd64 + * linux-headers-amd64 + * ssh + * rsync + * vim + * htop + * curl + * wget + * less + * lm-sensors + * iproute2 + * gdisk + * fdisk + * dnsutils + * iputils-ping + * zsh + * locales + * locales-all + * gcc + * make + * unzip + * tar + * man-db + * keyboard-configuration + * console-setup + * git + * python3 + * debootstrap Complementos: ------------- @@ -578,6 +574,23 @@ Defina a senha de root: systemd-nspawn -D ${recover_mountpoint} passwd +Configure o FSTAB +----------------- +Configure o ``${recover_mountpoint}/etc/fstab`` + +.. code:: shell + + + /dev/mapper/rootlabsvg-recover / ext4 rw,defaults 0 1 + UUID=f8e0f46a-e650-422e-a4ce-b286cd8010c9 /boot_alt ext4 defaults 0 0 + /boot_alt/recover /boot none defaults,bind 0 0 + + +.. note:: + O *UUID* do *boot_alt* pode ser obtido pelo comando ``lsblk -o NAME,SIZE,UUID``, é o uuid do mdadm + array. + + Grub ---- @@ -731,12 +744,8 @@ pegue o *MDUUID* do array boot: mduuid=580c789518a82e6edb8f4f6ef3e533b5 -Pegue o UUID do boot - -.. code:: cfg - - uuid: 47d567cb-4401-41b1-93ab-16e8096071ff - +.. tip:: + Para achar o UUID do do boot use ``lsblk -o NAME,SIZE,UUID`` Instale o grub: