如何从命令行制作可启动的 USB?

Abd*_*red 1 usb dd bootable linux-mint

这个问题很常见,但我无法用我在这里找到的解释来解决它。

情况:

  • 4GB U 盘
  • Manjaro 操作系统
  • linux mint的iso镜像文件

首先,我做了:

lsblk # and got /dev/sdb for my usb stick
      # I left it unmounted
dd if=/dev/zero of=/dev/sdb # filled it up with zeros
fdisk # Here, I created a DOS partition table and 1 partition 
      # containing the boot flag
mkfs.vfat /dev/sdb # made the fat filesystem on the usb stick

dd if=linuxmint-18-xfce-64bit.iso.part of=/dev/sdb bs=4M 
# Now, I copied the ismoimage onto the usb stick
echo $? # I checked, if dd finished without error, the exit status was 0
mount /dev/sdb /mnt  #I mounted the usb stick and listed its content
# the content surprised me, it was not the isoimage-file but this:
Run Code Online (Sandbox Code Playgroud)

boot casper diss EFI isolinux MD5SUMS 池预置 README.diskdefines

然后,我首先将 uefi 中的引导顺序设置为 USB 记忆棒,但它没有用,我只看到了我的 GRUB 加载程序窗口并像往常一样开始进入 Manjaro。

GAD*_*D3R 5

您应该验证.iso映像:验证 ISO 映像的步骤

可用的 linux 映像带有.iso扩展名而不是.iso.part

在拔出 USB 之前,建议运行 sync

有一个例子:

dd if=linuxmint-18-xfce-64bit.iso of=/dev/sdb bs=4M status=progress oflag=sync
Run Code Online (Sandbox Code Playgroud)

编辑

sync是为了确保在命令返回之前刷新所有写入。

if是输入文件(或设备),of是输出文件(或设备)

bs=4M告诉dd以 4 兆字节的块读取/写入以获得更好的性能;默认为 512 字节,这会慢很多

progress :显示定期传输统计信息。

联机帮助页: dd

  • 同步在做什么? (2认同)