Repartition a new USB drive

I want to use my new USB drive exclusively with Linux, so I decided to wipe the factory default partitions and create a new ext4 filesystem on the drive. The drive uses 4096 byte physical sectors and we have to make sure that the new partition is correctly aligned. For some background information on partition alignment, see this link.

Check that we are wiping the correct drive

sudo parted /dev/sdb unit s print free

Note the details in case you want to restore the original partitioning scheme. Information on the factory default can also be found here.

Make a backup of any Seagate supplied software and wipe the drive

sudo mount /dev/sdb2 /mnt/tmp/
mkdir Seagate
rsync -av --progress /mnt/tmp/ ./Seagate/
sudo umount /mnt/tmp/
sudo parted /dev/sdb unit s rm 2
sudo parted /dev/sdb unit s rm 1

Create new partitions

sudo parted -a none /dev/sdb mkpart p fat32 34s 131071s
sudo parted -a none /dev/sdb mkpart p ext4 131072s 100%
sudo mkfs.vfat -F 32 -n WIN /dev/sdb1
sudo mkfs.ext4 -L 6TB_EXT4 /dev/sdb2

Copy back all the files that came with the drive

sudo mount /dev/sdb1 /mnt/tmp/
rsync -av --progress Seagate /mnt/tmp/
sudo umount /mnt/tmp/

Check what the result

sudo parted /dev/sdb unit s print free
Model: Seagate Expansion Desk (scsi) Disk /dev/sdb: 11721045167s Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 34s 131071s 131038s fat32 p msftdata 2 131072s 11721045133s 11720914062s ext4 p

All done.

Leave a Reply

Your email address will not be published. Required fields are marked *