Como eu crio uma partição swap usando o parted?

0

Como eu crio uma partição swap usando a linha de comando gparted ? (parted)

Consegui criar uma partição, mas não consigo definir a partição como Linux swap / Solaris . Eu tentei

mkpart extended linux-swap -512MB -1s
// -> Error: Invalid number.
&

mkpart extended linux-swap(v1) -512MB -1s
// -> Error: Invalid number.
&

mkpart
type:   extended
Start:  -512MB
End:    -1s
// this works, but I can't set the FS-TYPE

// página de ajuda

(parted) help mkpart                                                      
  mkpart PART-TYPE [FS-TYPE] START END     make a partition

    PART-TYPE is one of: primary, logical, extended
        FS-TYPE is one of: 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)
        START and END are disk locations, such as 4GB or 10%.  Negative values count from the end of the disk.  For example, -1s specifies exactly the
        last sector.

        'mkpart' makes a partition without creating a new file system on the partition.  FS-TYPE may be specified to set an appropriate partition ID.
    
por denden 19.10.2017 / 15:55

1 resposta

0

Se você já tem a partição criada, eu acho que você pode usar "mkswap" em vez de "mkpart".

    
por John Anderson 19.10.2017 / 16:03