zoukankan      html  css  js  c++  java
  • How to write an iso file to usb driver

    The command we are going to issue to dd is as follows:

    sudo dd bs=4M if=Downloads/ubuntu-19.04-desktop-amd64.iso of=/dev/sdb conv=fdatasync
    

    the dd command in a terminal window

    Let’s break that down.

    • sudo: You need to be a superuser to issue dd commands. You will be prompted for your password.
    • dd: The name of the command we’re using.
    • bs=4M: The -bs (blocksize) option defines the size of each chunk that is read from the input file and wrote to the output device. 4 MB is a good choice because it gives decent throughput and it is an exact multiple of 4 KB, which is the blocksize of the ext4 filesystem. This gives an efficient read and write rate.
    • if=Downloads/ubuntu-19.04-desktop-amd64.iso: The -if (input file) option requires the path and name of the Linux ISO image you are using as the input file.
    • of=/dev/sdb: The -of (output file) is the critical parameter. This must be provided with the device that represents your USB drive. This is the value we identified by using the lsblk command previously. in our example it is sdb, so we are using /dev/sdb. Your USB drive might have a different identifier. Make sure you provide the correct identifier.
    • conv=fdatasync: The conv parameter dictates how dd converts the input file as it is written to the output device. dd uses kernel disk caching when it writes to the USB drive. The fdatasync modifier ensure the write buffers are flushed correctly and completely before the creation process is flagged as having finished.

    There is no visual feedback from dd at all as the creation progress takes place. It goes to work and doesn’t report anything until it has finished.

    Update: In recent versions, dd now has a status=progress option that provides updates on the process once per second.  For example, you could run this command instead to see the status:

    sudo dd bs=4M if=Downloads/ubuntu-19.04-desktop-amd64.iso of=/dev/sdb conv=fdatasync status=progerss

    When the bootable USB drive has been created dd reports the amount of data that was written to the USB drive, the elapsed time in seconds and the average data transfer rate.

    creation summary message

    You can check the bootable USB drive works by rebooting your computer and booting from the USB drive, or you can try booting from it in another computer.

    You now have a portable working copy of Ubuntu or another Linux distribution of your choice. It will be pristine every time you boot it, and you can boot it on practically any PC you like.

  • 相关阅读:
    linux下如何解压和压缩文件
    windows如何查看jdk的安装目录
    java.sql.SQLException: Data truncated for column 'seat_number' at row 1
    Error:(23, 0) Could not find method implementation() for arguments [directory 'libs'] on object of t
    grandle Project sync failed.please fix your project and try again
    java如何实现批量删除pdf指定的页数
    Java实现批量将word文档转换成PDF
    Linux下查看目录文件数和文件大小
    IDEA启动Springboot时,解决报错java.lang.NoClassDefFoundError: javax/servlet/Filter
    如何SpringBoot项目改为外置Tomcat启动
  • 原文地址:https://www.cnblogs.com/mouseleo/p/13942792.html
Copyright © 2011-2022 走看看