您的当前位置:首页>全部文章>文章详情

mac中将iso镜像制作成启动盘

发表于:2021-03-26 10:53:38浏览:59次TAG: #ubuntu

将iso文件转换成img文件

$ hdiutil convert -format UDRW -o ubuntu18.img ubuntu-18.04.2-desktop-amd64.iso
正在读取Driver Descriptor Map(DDM:0)…
正在读取Ubuntu 18.04.2 LTS amd64        (Apple_ISO:1)…
正在读取Apple(Apple_partition_map:2)…
正在读取Ubuntu 18.04.2 LTS amd64        (Apple_ISO:3)…
...............................................................
正在读取EFI(Apple_HFS:4)…
...............................................................
正在读取Ubuntu 18.04.2 LTS amd64        (Apple_ISO:5)…
...............................................................
已耗时: 2m  6.476s
速度:15.1M 字节/秒
节省:0.0%

将.img文件写入TF卡中(USB中的CD card)

# 查看TF卡信息
$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            250.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (external, physical):                 # 注意这里才是我们的U盘
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.5 GB    disk1
   1:             Windows_FAT_32 NO NAME                 15.5 GB    disk1s1

# diskn中的n为上条命令的TF卡名
$ diskutil unmountDisk /dev/disk1
Unmount of all volumes on disk1 was successful

# 将文件写入卡中
$ sudo time dd bs=4m if=ubuntu18.img.dmg of=/dev/rdisk1
Password:
476+0 records in
476+0 records out
1996488704 bytes transferred in 243.393551 secs (8202718 bytes/sec)
      243.76 real         0.00 user         0.82 sys
栏目分类全部>
腾讯云采购季云服务器一折促销