【Ubuntu】Ubuntu productionUbuntu Server system disk

To make an Ubuntu Server system disk, you can follow the steps below on your Ubuntu system:

  1. Download the Ubuntu Server ISO image file:

  2. Prepare the USB drive:

    • Get a blank USB drive, making sure it has enough storage space to hold the Ubuntu Server image file.
    • Back up any important data on the USB drive, as the production process will format the drive and delete all data on it.
  3. Write the image to a USB drive using the "dd" command:

    • Open the Terminal application.

    • Run the following command to write the Ubuntu Server ISO image file to a USB drive (please /path/to/ubuntu-server.isoreplace with the path of the ISO image file you actually downloaded, and /dev/sdXwith the device name of your USB drive):

    • sudo dd if=/path/to/ubuntu-server.iso of=/dev/sdX bs=4M status=progress && sync
    • Wait for the command to complete and it will write the ISO image file to the USB drive. This may take some time, please be patient.       

  4. After the production is complete, you now have an Ubuntu Server system disk. You can use this USB drive to install Ubuntu Server or for other operations, such as launching the Ubuntu Server installer or performing system maintenance.

Note, before making a system disk, carefully back up any important data on the drive, and make sure you choose the correct device name for the USB drive. Any errors in operation may result in loss or corruption of data, so please proceed with caution.

Remark:

sudo fdisk -l View USB drive location

sudo dd if=/path/to/ubuntu-server.iso of=/dev/sdX bs=4M status=progress && synccommand to write the Ubuntu Server ISO image file to a USB drive. The following are descriptions of the various parts of the command:

  • sudo: Execute the command with administrator privileges to have sufficient privileges to write to the USB drive.
  • dd: Command-line tool to copy and convert files.
  • if=/path/to/ubuntu-server.iso: ifIndicates the input file (input file), specifying the path of the Ubuntu Server ISO image file to be written to the USB drive. You need to /path/to/ubuntu-server.isoreplace with the actual ISO image file path.
  • of=/dev/sdX: ofIndicates the output file (output file), specifying the target device to be written. You need to /dev/sdXreplace with the device name of your USB drive. Make sure to specify the device name correctly, otherwise data loss may result.
  • bs=4M: bsIndicates the block size (block size), here is set to 4M, which means that the size of the data block written each time is 4MB. This helps to improve copy speed.
  • status=progress: Displays the copying progress, allowing you to view the progress in real time.
  • && sync: Performs a sync operation to ensure all data is written to the USB drive.

Remember, before executing this command, make sure to substitute paths and device names in the command and double check to avoid data loss or corruption due to unintentional actions.

Guess you like

Origin blog.csdn.net/Holenxr/article/details/131507518