How to move a partition to the beginning of the disk a bit? Parted wants a filesystem for some reason (I don't know why), I want just to shift all sectors left...
r@l:15:32:45:~# parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: HGST HTS 541010A9E680 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 32.2GB 32.2GB primary fat32
2 32.2GB 37.6GB 5360MB primary
3 37.6GB 1000GB 963GB primary
(parted) move 3
WARNING: you are attempting to use parted to operate on (move) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Error: Could not detect file system.
Answer
sfdisk
, which intents to be a scriptable fdisk, has since some version the --move-data
option. Example from their man page:
echo '+100M,' | sfdisk --move-data /dev/sdc -N 1
Comments
Post a Comment