From a0945b95bbb0a87b40ec1cb7157ad6102c79b1c2 Mon Sep 17 00:00:00 2001
From: Pierre Kunzli <pierre.kuenzli@unige.ch>
Date: Wed, 14 Aug 2024 09:57:43 +0000
Subject: [PATCH] rename sda to nvme and put new vmlinuz with correct key
 mapping

---
 deployer/bootiful-common               | 4 ++--
 deployer/bootiful-save-image           | 6 +++---
 dhcp/dhcpd.conf                        | 8 ++++----
 tftp/tftpboot/boot/deployer/initrd.img | 4 ++--
 tftp/tftpboot/boot/deployer/vmlinuz    | 4 ++--
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/deployer/bootiful-common b/deployer/bootiful-common
index 1e29fc7..1e0bf9f 100644
--- a/deployer/bootiful-common
+++ b/deployer/bootiful-common
@@ -365,7 +365,7 @@ ensure_mac_address() {
 }
 
 readonly mounting_point_remote="/bootiful/shared"
-readonly deployment_disk="/dev/sda"
+readonly deployment_disk="/dev/nvme0n1"
 
 # Ensures the kernel is informed of the latest partition table changes
 refresh_partition_table() {
@@ -645,4 +645,4 @@ create_hidden_partition() {
     echo "File system in hidden partition created."
 
     refresh_partition_table
-}
\ No newline at end of file
+}
diff --git a/deployer/bootiful-save-image b/deployer/bootiful-save-image
index 44264f0..191cb04 100755
--- a/deployer/bootiful-save-image
+++ b/deployer/bootiful-save-image
@@ -9,7 +9,7 @@ Usage:
   $SCRIPT_DIR [-h | --help]
 
 Description:
-  Saves a raw dd image of the /dev/sda device to the remote server shared images
+  Saves a raw dd image of the /dev/nvme0n1 device to the remote server shared images
   folder.
 
 Parameters:
@@ -73,7 +73,7 @@ if ! mkdir "$image_folder"; then
 fi
 
 readonly image_file="$image_folder/$image_name.img.gz"
-if ! pv --size "$image_size" --stop-at-size /dev/sda |
+if ! pv --size "$image_size" --stop-at-size /dev/nvme0n1 |
         pigz -c > "$image_file"
 then
     echo "Cannot create image file '$image_file'"
@@ -88,7 +88,7 @@ if ! cat /proc/sys/kernel/random/uuid > "$md5_file"; then
 fi
 
 readonly partition_file="$image_folder/$image_name.partition"
-if ! fdisk -l /dev/sda > "$partition_file"; then
+if ! fdisk -l /dev/nvme0n1 > "$partition_file"; then
     echo "Cannot create partition file $partition_file"
     exit 1
 fi
diff --git a/dhcp/dhcpd.conf b/dhcp/dhcpd.conf
index 6e8a8fa..c70512b 100755
--- a/dhcp/dhcpd.conf
+++ b/dhcp/dhcpd.conf
@@ -1,7 +1,7 @@
 allow bootp;
 
-subnet 192.168.56.0 netmask 255.255.255.0 {
-    range 192.168.56.10 192.168.56.80;
+subnet 10.0.0.0 netmask 255.255.255.0 {
+    range 10.0.0.11 10.0.0.80;
     default-lease-time 600;
     max-lease-time 7200;
 
@@ -10,8 +10,8 @@ subnet 192.168.56.0 netmask 255.255.255.0 {
 
     class "pxeclient" {
         match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
-        next-server 192.168.56.100;
-        option tftp-server-name "192.168.56.100";
+        next-server 10.0.0.1;
+        option tftp-server-name "10.0.0.1";
 
         if substring (option vendor-class-identifier, 15, 5) = "00000" {
             option bootfile-name   "/boot/grub/i386-pc/core.0";
diff --git a/tftp/tftpboot/boot/deployer/initrd.img b/tftp/tftpboot/boot/deployer/initrd.img
index 6489fde..21cd9e8 100644
--- a/tftp/tftpboot/boot/deployer/initrd.img
+++ b/tftp/tftpboot/boot/deployer/initrd.img
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:4971beb5f0c7fa393f0f648af71a316ef05ce71b45894e93d2b1bf1c4f37eee4
-size 19104947
+oid sha256:d1d69dbe85d52a0511865f3ed05e94ebc5d1781a89e1b2443109c1b23151796b
+size 110171845
diff --git a/tftp/tftpboot/boot/deployer/vmlinuz b/tftp/tftpboot/boot/deployer/vmlinuz
index a6211dd..93987ec 100644
--- a/tftp/tftpboot/boot/deployer/vmlinuz
+++ b/tftp/tftpboot/boot/deployer/vmlinuz
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:89a6243962b6e0bad5676c5c29908e7c7eca2d4fcd7070171e484901bf0db490
-size 5622288
+oid sha256:0f7871bc11e08322cc796d2802eb8420e42c3aa379467456d83ea6f6e446fd74
+size 11701352
-- 
GitLab