美文网首页工具使用指南
MacOS中制作Ubuntu的U盘系统盘

MacOS中制作Ubuntu的U盘系统盘

作者: 生命不止运动不息 | 来源:发表于2023-10-29 09:05 被阅读0次

1、首先下载Ubuntu系统,直接去阿里云镜像

https://developer.aliyun.com/mirror/

2、准备好U盘,先给U盘格式化,使用命令

使用如下命令列出所有磁盘,找到U盘(我的是/dev/disk3)

diskutil list

cwk@helloale ~ % diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *28.0 GB    disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk2         27.7 GB    disk0s2

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                 Apple_APFS Container disk2         1000.0 GB  disk1s2

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +1.0 TB     disk2
                                 Physical Stores disk1s2, disk0s2
   1:                APFS Volume Macintosh HD - Data     364.1 GB   disk2s1
   2:                APFS Volume Preboot                 3.7 GB     disk2s2
   3:                APFS Volume Recovery                1.2 GB     disk2s3
   4:                APFS Volume VM                      4.1 GB     disk2s4
   5:                APFS Volume Macintosh HD            9.8 GB     disk2s5
   6:              APFS Snapshot com.apple.os.update-... 9.8 GB     disk2s5s1

/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *30.8 GB    disk3
   1:                 DOS_FAT_32 UNTITLED                30.8 GB    disk3s1

可以看到有三块磁盘,最后一块是我的U盘,输入下面命令格式化

diskutil partitionDisk /dev/disk3 MBR FAT32 UNTITLED 0b

cwk@helloale ~ % diskutil partitionDisk /dev/disk3 MBR FAT32 UNTITLED 0b                              
Started partitioning on disk3
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk3s1 as MS-DOS (FAT32) with name UNTITLED
512 bytes per physical sector
/dev/rdisk3s1: 60056896 sectors in 1876778 FAT32 clusters (16384 bytes/cluster)
bps=512 spc=32 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=2048 drv=0x80 bsec=60086272 bspf=14663 rdcl=2 infs=1 bkbs=6
Mounting disk
Finished partitioning on disk3
/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *30.8 GB    disk3
   1:                 DOS_FAT_32 UNTITLED                30.8 GB    disk3s1
cwk@helloale ~ % 

这样U盘就格式化成FAT32格式了

3、将下载的iso系统文件刻录到U盘

首先、使用如下命令卸载U盘

diskutil umountDisk /dev/disk3

cwk@helloale ~ % diskutil umountDisk /dev/disk3
Unmount of all volumes on disk3 was successful
cwk@helloale ~ % 

可以看到卸载成功了。

接下来就开始刻录、输入如下命令

sudo dd if=ISO文件路径 of=/dev/disk3 bs=10m

这里使用的命令:
sudo dd if=/Users/cwk/Desktop/ubuntu-18.04.6-live-server-amd64.iso of=/dev/disk3 bs=10m
输入密码后,耐心等待,需要一定的时间。

cwk@helloale ~ % sudo dd if=/Users/cwk/Desktop/ubuntu-18.04.6-live-server-amd64.iso of=/dev/disk3 bs=10m
96+1 records in
96+1 records out
1016070144 bytes transferred in 258.626095 secs (3928722 bytes/sec)
cwk@helloale ~ % 

如上,系统盘就制作完成了。

参考文章

http://www.voycn.com/index.php/article/macxiashiyongdiskutilgeiupangeshihua
https://wangmaolin.net/topic/Mac/8loynzzyz3

说点题外话,文言一心给我的都是错误答案!

相关文章

网友评论

    本文标题:MacOS中制作Ubuntu的U盘系统盘

    本文链接:https://www.haomeiwen.com/subject/shxvidtx.html