# Installation Rasp

## Installation Centos8 Stream

1. Graver l'image de disque ([Lien de l'image](https://people.centos.org/pgreco/CentOS-Userland-8-stream-aarch64-RaspberryPI-Minimal-4/))
   ```sh
   dd if=CentOS-Userland-8-stream-aarch64-RaspberryPI-Minimal-4-sda.raw of=/dev/mmcblk0 bs=64k status=progress
   ```
 2. Démarrer la rasp (par défault en dhcp) sur le réseau admin et trouver l'ip en regardant sur [http://10.21.0.1/cgi-bin/luci/admin/status/overview](http://10.21.0.1/cgi-bin/luci/admin/status/overview)
 3. SSH avec les identifiants root / centos
 4. Redimensionner la partition root
    ```sh
    dnf install cloud-utils-growpart e2fsprogs
    growpart /dev/mmcblk0 3
    resize2fs /dev/mmcblk0p3
    ```
 5. Configurer le réseau
    ```sh
    dnf install vim
    vim /etc/sysconfig/network-scripts/ifcfg-eth0
    ```
    ```
    DEVICE=eth0
    BOOTPROTO=none
    ONBOOT=yes
    PREFIX=24
    IPADDR=10.21.10.101
    GATEWAY=10.21.10.1
    DNS1=10.21.10.53 # todo
    ```
6. Redémarrer la rasp sur le réseau des servers
7. Migrer à Centos Stream
   ```sh
   rpm -i  https://vault.centos.org/centos/8/extras/aarch64/os/Packages/centos-release-stream-8.1-1.1911.0.7.el8.aarch64.rpm
   dnf --allowerasing --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
   dnf distro-sync
   ```
8. Redémarrer la rasp

Sources :
* [https://sigs.centos.org/automotive/building/centos_stream_pi4/](https://sigs.centos.org/automotive/building/centos_stream_pi4/)
* [http://reallyappreciate.com/raspberry-pi-4-8gb-model-with-centos-8/](http://reallyappreciate.com/raspberry-pi-4-8gb-model-with-centos-8/)