зеркало из
https://github.com/iharh/notes.git
synced 2025-11-02 14:46:08 +02:00
68 строки
2.5 KiB
Plaintext
68 строки
2.5 KiB
Plaintext
https://www.gnu.org/software/parted/manual/
|
|
https://wiki.archlinux.org/title/parted
|
|
|
|
sudo parted <dev>
|
|
just enter the interactive mode without any other args
|
|
h[elp] [cmd]
|
|
help [by cmd]
|
|
p[rint] devices|free|list,all
|
|
sel[ect] <dev/...>
|
|
|
|
????
|
|
https://deploy.equinix.com/developers/docs/metal/storage/nvme-flash-drives/
|
|
-a optimal
|
|
2023
|
|
https://www.tecmint.com/parted-command-create-linux-partitions/
|
|
2020
|
|
https://unix.stackexchange.com/questions/200582/scripteable-gpt-partitions-using-parted
|
|
parted /dev/mmcblk0 --script mklabel gpt
|
|
parted /dev/mmcblk0 --script mkpart primary ext4 32MB 132MB
|
|
parted /dev/mmcblk0 --script mkpart primary ext4 233MB 433MB
|
|
parted /dev/mmcblk0 --script mkpart primary ext4 433MB 533MB
|
|
parted /dev/mmcblk0 --script mkpart primary ext4 533MB 593MB
|
|
parted /dev/mmcblk0 --script mkpart primary ext4 593MB 793MB
|
|
parted /dev/mmcblk0 --script mkpart primary ext4 793MB 3800MB
|
|
parted /dev/mmcblk0 --script align-check min 1
|
|
parted --script /device \
|
|
mklabel gpt \
|
|
mkpart primary 1MiB 100MiB \
|
|
mkpart primary 100MiB 200MiB \
|
|
sudo parted -s -a <min[imal]|opt[imal]> -- /dev/sdX \
|
|
...
|
|
https://unix.stackexchange.com/questions/248939/how-to-achieve-optimal-alignment-for-emmc-partition/625740#625740
|
|
...
|
|
sudo parted /dev/nvme0n1 align-check opt 1 align-check opt 2 align-check opt 3
|
|
sudo parted /dev/vda align-check opt 1 align-check opt 2 align-check opt 3
|
|
|
|
|
|
samples
|
|
https://linuxhint.com/linux-parted-command-line-examples/
|
|
$ parted /dev/sda – mkpart primary linux-swap -8GiB 100%
|
|
...
|
|
1-st - at least 1Gb
|
|
...
|
|
mkpart primary 512MiB -8GiB
|
|
starts the partition at 512MiB
|
|
and ends it at 8GiB before the end of the disk
|
|
... [512Mib..N-8GiB] ... for the disk of size N
|
|
mkpart primary linux-swap -8GiB 100%
|
|
swap at the end of disk
|
|
|
|
https://github.com/iharh/nixcfg/blob/main/sh/prepare-all.sh#L17
|
|
sudo parted -s -a opt $DEVICE mklabel gpt \
|
|
mkpart primary 512MB 100% \
|
|
mkpart ESP fat32 1MB 512MB \
|
|
set 2 esp on p
|
|
|
|
Number Start End Size File system Name Flags
|
|
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
|
|
2 538MB 1500GB 1499GB ext4
|
|
3 1500GB 2000GB 500GB
|
|
|
|
sudo parted -s -a opt $DEVICE mklabel gpt \
|
|
mkpart p 512MB 100% \
|
|
mkpart ESP fat32 1MB 512MB \
|
|
set 2 esp on p \
|
|
mkpart p ext4 512MB -500GB \
|
|
mkpart luks ext4 -500GB 100%
|