From d6c865b469356f273a1cf4daa8b57445fc3bb7a8 Mon Sep 17 00:00:00 2001 From: Simon Campion Date: Wed, 28 Feb 2024 14:00:50 +0100 Subject: [PATCH] remove original ROOT label through Ignition --- kola/tests/misc/tang.go | 15 +++++---------- kola/tests/misc/tpm.go | 15 +++++---------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/kola/tests/misc/tang.go b/kola/tests/misc/tang.go index 3abd2f554..3fa86ba85 100644 --- a/kola/tests/misc/tang.go +++ b/kola/tests/misc/tang.go @@ -25,9 +25,6 @@ import ( ) const ( - // In the Ignition config below, we create a partition labeled ROOT on a second disk. - // As advised in the Flatcar documentation, we then remove the ROOT label from the existing - // root partition, which is vda9 in the QEMU disk image. IgnitionConfigRootTang = `{ "ignition": { "config": {}, @@ -63,19 +60,17 @@ const ( } ], "filesystems": [ + { + "device": "/dev/disk/by-partlabel/ROOT", + "format": "none", + "wipeFilesystem": true + }, { "device": "/dev/disk/by-id/dm-name-rootencrypted", "format": "ext4", "label": "ROOT" } ] - }, - "systemd": { - "units": [{ - "name": "remove-root-label.service", - "enabled": true, - "contents": "[Service]\nType=oneshot\nExecStart=wipefs -a /dev/vda9\n[Install]\nWantedBy=multi-user.target" - }] } }` diff --git a/kola/tests/misc/tpm.go b/kola/tests/misc/tpm.go index 32891fcba..5338ceedb 100644 --- a/kola/tests/misc/tpm.go +++ b/kola/tests/misc/tpm.go @@ -17,9 +17,6 @@ import ( ) const ( - // In the Ignition config below, we create a partition labeled ROOT on a second disk. - // As advised in the Flatcar documentation, we then remove the ROOT label from the existing - // root partition, which is vda9 in the QEMU disk image. IgnitionConfigRootTPM = `{ "ignition": { "config": {}, @@ -50,19 +47,17 @@ const ( } ], "filesystems": [ + { + "device": "/dev/disk/by-partlabel/ROOT", + "format": "none", + "wipeFilesystem": true + }, { "device": "/dev/disk/by-id/dm-name-rootencrypted", "format": "ext4", "label": "ROOT" } ] - }, - "systemd": { - "units": [{ - "name": "remove-root-label.service", - "enabled": true, - "contents": "[Service]\nType=oneshot\nExecStart=wipefs -a /dev/vda9\n[Install]\nWantedBy=multi-user.target" - }] } }`