• Installer OmniOSce sur un serveur OVH dédié : le "KS-STOR | Intel Xeon-D 1521"

    Je vous mets une copie de mon post sur unitedbsd (en anglais)

    I tried a dedicated server at OVH and tried to install several BSDs...
    It is entirely possible to install OmniOSce (r151046 LTS and the latest r151052) on this dedicated server "KS-STOR | Intel Xeon-D 1521" at OVH.

    The process is simple, whereas you can not use any installer version (.iso, dd-usb) nor OVH template with cloud.qcow2 image. You must use the cloud.raw image.

    Boot into rescue mode (debian-10), restart your server then log in via SSH

    ssh root@SERVER-IP

    List the storage devices connected to the server :

    lsblk

    Erase the disks (not mandatory.. your choice)

    nohup dd if=/dev/zero of=/dev/sda bs=1M &
    nohup dd if=/dev/zero of=/dev/sdb bs=1M &
    nohup dd if=/dev/zero of=/dev/sdc bs=1M &
    nohup dd if=/dev/zero of=/dev/sdd bs=1M &
    nohup dd if=/dev/zero of=/dev/nvme0n1 bs=1M &

    If you don't want to erase the NVMe entirely, you really should erase the beginning and the end to be sure that there isn't an old ZFS pool label (I had a previous zpool from my FreeBSD installation on it which made the server crash after 5min the first time - FAULTED rpool) :

    zpool labelclear -f /dev/nvme0n1
    dd if=/dev/zero of=/dev/nvme0n1 bs=1M count=100 dd if=/dev/zero of=/dev/nvme0n1 bs=1M seek=$(( $(blockdev --getsz /dev/nvme0n1) * 512 / 1024 / 1024 - 100 )) count=100
     

    Monitor when the erase operations are complete:

    ps -ef | grep 'dd if=' | grep -v grep

    Install parted, zstd et fwupd

    apt update
    apt install parted zstd fwupd -y

    Mettre à jour la liste des firmwares disponibles (si si, c'est important).

    fwupdmgr refresh
    fwupdmgr get-updates
    fwupdmgr update

    Create GPT tables on the disks (again, not mandatory, just to clean...)

    parted /dev/sda mklabel gpt
    parted /dev/sdb mklabel gpt
    parted /dev/sdc mklabel gpt
    parted /dev/sdd mklabel gpt
    parted /dev/nvme0n1 mklabel gpt

    Download the OmniOSce cloud.raw image and uncompress it

    wget https://downloads.omnios.org/media/stable/omnios-r151052.cloud.raw.zst
    zstd -d omnios-r151052.cloud.raw.zst

    Burn the image to one of the HDDs:

    dd if=omnios-r151052.cloud.raw of=/dev/nvme0n1 bs=1M status=progress
    sync

    Import the pool:

    zpool import
    zpool import -f rpool

    Mount it:

    mkdir -p /mnt/root
    mount -t zfs rpool/ROOT/omnios-r151052 /mnt/root

    Add your public SSH key:

    mkdir /mnt/root/root/.ssh
    echo "YOUR-PUBLIC-SSH-KEY-HERE" > /mnt/root/root/.ssh/authorized_keys 

    Export the pool

    zpool export rpool

     

    In your OVH interface, set the boot to disk this time (instead of rescue).
    Restart the server and use the IPMI/KVM console (via your web browser, for example... it works very well with Firefox contrary to what is said) to watch the server boot from the raw image.
    It will stop displaying after : "Loading /boot/defaults/loader.conf"...
    But goes on...

    Wait for 1-2 minutes more, erase your local known_hosts file then connect by SSH:

    ssh root@IP-SERVER

    Tadam !

     

    You should quick deactivate some services :

    svcadm disable svc:/network/routing-setup:default
    svcadm disable svc:/network/routing/route:default
    svcadm disable svc:/network/routing/ndp:default
    svcadm disable svc:/system/cloud-init:initlocal
    svcadm disable svc:/system/cloud-init:init
    svcadm disable svc:/system/cloud-init:modules
    svcadm disable svc:/system/cloud-init:final

    Also, create an ipadm backup script (I lost my static IP configuration and had to go back to the rescue mode.. don't know why. I had previously configured it from dhcp to static, but it did not remain after reboot):

    vi /etc/rc3.d/S99network-setup
    #!/bin/bash
    
    # Erase the IP configurations of the network cards :
    ipadm delete-ip ixgbe1 2>/dev/null
    ipadm delete-ip ixgbe0 2>/dev/null
    
    # Wait for them to be ready again
    sleep 5
    
    # Configure the first interface :
    ipadm create-ip ixgbe0
    ipadm create-addr -T static -a local=SERVER-IP/CIDR ixgbe0/v4
    
    # Wait again
    sleep 5
    
    # Add the default route :
    route -p add default GATEWAY-IP
    
    exit 0

    Give the permission to execute :

    chmod +x /etc/rc3.d/S99network-setup

     


    Tags Tags : , , , , , , ,
  • Commentaires

    Aucun commentaire pour le moment

    Suivre le flux RSS des commentaires


    Ajouter un commentaire

    Nom / Pseudo :

    E-mail (facultatif) :

    Site Web (facultatif) :

    Commentaire :