![Parted:如何知道要輸入的起始編號?](https://rvso.com/image/1346167/Parted%EF%BC%9A%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E8%A6%81%E8%BC%B8%E5%85%A5%E7%9A%84%E8%B5%B7%E5%A7%8B%E7%B7%A8%E8%99%9F%EF%BC%9F.png)
我正在嘗試以最基本的方式使用parted:將外部USB硬碟格式化為ext2(最好是ext4,但似乎不是選項)。大小為 3TB,已卸載在 /dev/sdd
sudo parted /dev/sdd
mklabel
[type gpt]
[type yes to agree that everything on that hard drive will be lost]
mkpart
[type myDefaultPartitionName]
[type what for Start? prompt]
當我能夠克服這一點之後,我怎麼知道要輸入什麼來結束呢?
謝謝
答案1
特別感謝 Darael 幫助我發現 gdisk。以下是我成功對外部硬碟進行分割的步驟。將下面的 x 替換為您的磁碟機的名稱。
sudo apt-get install gdisk
sudo parted -l # inspect your drive's name and make sure it is the external one!
sudo umount /dev/sdx1 # ensure that drive is NOT mounted
sudo gdisk /dev/sdx1 # launch gdisk on the drive of interest
? # explore the features gdisk offers
n # create a [n]ew partition
[enter] # choose default first sector
[enter] # choose default last sector
a502 # choose FreeBSD
v # [v]erify
c # [c]hange the name of the partition, e.g. MY_1TB_BACKUP
p # [p]rint to ensure the renaming is to your liking
w # [w]rite the changes to disk
sudo mkfs -t ext4 /dev/sdx1 # create the filesystem as type ext4