From 73e154d0727d4051d20b91a215467ddba49ab4f0 Mon Sep 17 00:00:00 2001 From: Jair Gonzalez Date: Thu, 28 Mar 2019 19:45:16 -0600 Subject: [PATCH] Bootable USB (#436) * bootable-usb: Add extra caution about unmount Not unmounting an USB partition before an image is burned could cause file system checksum errors leading to other issues (including kernel panics) when trying to boot from the USB drive. This commit adds an extra caution note to warn the users about the possible issues they could find when this step is not followed correctly. Signed-off-by: Jair Gonzalez * bootable-usb: Add o_sync to the dd command Update the example 'dd' command to burn an image, by adding the 'oflag=sync' option. This allows to reduce the flashing time in conjunction with the recommended 'bs=4M', enables a more accurate progress indicator, and allows to remove the additional sync command, while preserving some cache optimizations. Signed-off-by: Jair Gonzalez --- .../clear-linux/get-started/bootable-usb/bootable-usb.rst | 8 ++++++-- source/substitutions.txt | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/clear-linux/get-started/bootable-usb/bootable-usb.rst b/source/clear-linux/get-started/bootable-usb/bootable-usb.rst index 3994b20f..e0ac2a2a 100644 --- a/source/clear-linux/get-started/bootable-usb/bootable-usb.rst +++ b/source/clear-linux/get-started/bootable-usb/bootable-usb.rst @@ -78,7 +78,7 @@ Burn the |CL| image onto a USB drive ├─sda8 8:8 0 30G 0 part / └─sda6 8:6 0 7.9G 0 part [SWAP] -#. You must unmount a USB drive before you can burn an image onto it. Note that +#. You must unmount a USB drive before burning an image onto it. Note that some Linux distros automatically mount a USB drive when it is plugged in. Unmount a USB drive with the :command:`umount` command followed by the device identifier/partition. For example: @@ -93,7 +93,11 @@ Burn the |CL| image onto a USB drive .. code-block:: bash - dd if=./clear-[version number]-[image type] of= bs=4M status=progress && sync + dd if=./clear-[version number]-[image type] of= oflag=sync bs=4M status=progress + +.. caution:: + + |CAUTION-UNMOUNT-USB-PARTITIONS| .. _bootable-usb-mac: diff --git a/source/substitutions.txt b/source/substitutions.txt index 6790a2c3..20c6b780 100644 --- a/source/substitutions.txt +++ b/source/substitutions.txt @@ -9,3 +9,8 @@ .. |CAUTION-BACKUP-USB| replace:: Burning an image formats the USB drive, and will destroy all pre-existing content. Back up your data before proceeding. + +.. |CAUTION-UNMOUNT-USB-PARTITIONS| replace:: + Not fully unmounting the USB drive before burning an image could cause + file system checksum errors in it. If this happens, burn the image again + ensuring all the USB drive partitions are unmounted first.