From e15c4f1bf3fe2231b32f8714c7a60436f3908f75 Mon Sep 17 00:00:00 2001 From: frankming Date: Tue, 27 Feb 2024 11:43:27 +0800 Subject: [PATCH] Modify ESP configuring script of redfish document doc/source/admin/drivers/redfish.rst has a ESP configuring script. However, it not works. In script, DEST is the destination esp image path that can not mkdir or cp on it. We need fix it and using mtools instead of sudo+mount. Story: 2011051 Task: 49615 Change-Id: Ibdd60bea2f742e8e698d9dbcfef7059a9a71242f Signed-off-by: frankming --- doc/source/admin/drivers/redfish.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/source/admin/drivers/redfish.rst b/doc/source/admin/drivers/redfish.rst index 0d1fefaefe..6582f587b8 100644 --- a/doc/source/admin/drivers/redfish.rst +++ b/doc/source/admin/drivers/redfish.rst @@ -288,16 +288,15 @@ Then the following script can be used to build an ESP image: DEST=/path/to/esp.img GRUB2=/path/to/grub.efi SHIM=/path/to/shim.efi - TEMP_MOUNT=$(mktemp -d) dd if=/dev/zero of=$DEST bs=4096 count=1024 - mkfs.fat -s 4 -r 512 -S 4096 $DEST + mkfs.msdos -F 12 -n ESP_IMAGE $DEST - sudo mount $DEST $TEMP_MOUNT - sudo mkdir -p $DEST/EFI/BOOT - sudo cp "$SHIM" $DEST/EFI/BOOT/BOOTX64.efi - sudo cp "$GRUB2" $DEST/EFI/BOOT/GRUBX64.efi - sudo umount $TEMP_MOUNT + # The following commands require mtools to be installed + mmd -i $DEST EFI EFI/BOOT + mcopy -i $DEST -v $SHIM ::EFI/BOOT/BOOTX64.efi + mcopy -i $DEST -v $GRUB2 ::EFI/BOOT/GRUBX64.efi + mdir -i $DEST ::EFI/BOOT .. note:: If you use an architecture other than x86-64, you'll need to adjust the