Commandes Linux : parted

PARTED

Installé avec le paquet parted
Voir aussi : fdisk, cfdisk, gdisk et gparted

 
La commande GNU parted prend en charge les systèmes de fichiers zfs, btrfs, nilfs2, ext4, ext3, ext2, fat32, fat16, hfsx, hfs+, hfs, jfs, swsusp, linux-swap(v1), linux-swap(v0), ntfs, reiserfs, freebsd-ufs, hp-ufs, sun-ufs,
xfs, apfs2, apfs1, asfs, amufs5, amufs4, amufs3, amufs2, amufs1, amufs0, amufs, affs7, affs6, affs5, affs4, affs3, affs2, affs1, affs0, linux-swap, linux-swap(new), linux-swap(old)
.

Commandes interactives : GNU parted
  align-check TYPE N                        check partition N for TYPE(min|opt) alignment
  help [COMMAND]                           print general help, or help on COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a particular partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START and END
  resizepart NUMBER END                    resize partition NUMBER
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  disk_set FLAG STATE                      change the FLAG on selected device
  disk_toggle [FLAG]                       toggle the state of FLAG on selected device
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and copyright information of GNU Parted

 

 

Afficher la version de la commande GNU parted

parted --version --

ou

apt-cache policy parted

 

Afficher la liste des partitions de tous les devices

parted -l

ex :

# parted -l
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 53,7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  51,5GB  51,5GB  primary   ext4            boot
 2      51,5GB  53,7GB  2145MB  extended
 5      51,5GB  53,7GB  2145MB  logical   linux-swap(v1)

 

Créer, réorganiser et supprimer les partitions des devices

parted [device]

Si device n’est pas précisé, c’est /dev/sda qui sera pris en compte.
Attention, les modifications apportées (contrairement à fdisk) sont effectuées en temps réel.
ex :

# parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 53,7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  51,5GB  51,5GB  primary   ext4            boot
 2      51,5GB  53,7GB  2145MB  extended
 5      51,5GB  53,7GB  2145MB  logical   linux-swap(v1)
Fermer le menu
%d blogueurs aiment cette page :