Talk:Parted

From ArchWiki
Jump to: navigation, search

Resizepart command when resizing

I noticed there's a difference between the "Growing partitions" and "Shrinking partitions" sections. The latter ends with the following command, while the former doesn't:

 # resizepart device number size

So it seems one should notify the kernel about the new size of the partition only when shrinking it. But why one doesn't need it when growing a partition? It would be nice if someone could add an explaination (which I unfortunately don't know). Thanks.

Fturco (talk) 16:15, 28 August 2015 (UTC)

Auto alignment with using 0%.

https://wiki.archlinux.org/index.php?title=GNU_Parted&type=revision&diff=424616&oldid=412084 Auto alignment work if using 'mkpart primary ext4 0% 100%' but didnt with something like '(parted) mkpart primary ext4 0% 513mib'.

—This unsigned comment is by Althathwe (talk) 10:59, 23 May 2016‎. Please sign your posts with ~~~~!

Linked to 'parted' Manual doesn't list ext3 or ext4 for fs-type

Moved from Talk:Beginners' guide -- Alad (talk) 14:27, 5 July 2016 (UTC)

Hi guys. Recent Arch convert here. Loving it. No bloat! Noticed this during Beginners Guid install though:

In the section on using parted ( Beginners'_guide#Partition_schemes ), it links to the Gnu parted manual at http://www.gnu.org/software/parted/manual/parted.html#mkpart for fs-types, but the (rather dated?) manual doesn't list ext3 or ext4. At this point I 'guessed' ext2 was the right choice... Only to find that LATER in the 'Beginners Guide' page it recommended ext4. Damn! Wasn't sure if I had to go back and re-do. Seemed not. But anyway, confusing for 'Beginners'. Anyway, dare not edit the wiki being an Arch noob at this point. Keep up the good work! Cheers. -- Peterg4000 (talk) 00:53, 7 April 2015 (UTC)

Yes, this is a rather confusing concept: the file system type associated to a partition is a different thing from the file system that you later use to format that partition... It's explained in a bit clearer way in Wikipedia:Disk_partitioning#PC_partition_types, but we should probably explain it better here too.
In theory, using "ext2", "ext3" or "ext4" when you use (parted) mkpart shouldn't make any difference at all, as they all set the same partition type code. What does make a difference is the file system you choose when you actually format the partition in Beginners'_guide#Create_filesystems.
Of course it's wise to make sure the fs-type corresponds to the file system that is going to be used, but even though I've never tested it, I guess you could use e.g. "NTFS" for fs-type and still be able to format the partition with ext4 or whatever file system you want.
Kynikos (talk) 13:49, 7 April 2015 (UTC)
Oh, so for ext3/4 one should just set fs-type to ext2 in parted (etc). Lesson learnt. A one liner would be good saying something like "If you don't know any better, set fs-type to ext2 (Which is the correct option for ext2/3/4), and then format with ext4 below." -- Peterg4000 (talk) 23:32, 7 April 2015 (UTC)
We needed something more generic and educational, I've added [1], I hope it's clear enough, please re-open the discussion if it's not :) — Kynikos (talk) 07:17, 8 April 2015 (UTC)
Looks great. Loving the Arch way, community, Wiki etc. Cheers. -- Peterg4000 (talk) 08:49, 8 April 2015 (UTC)
Actually, parted 3.2 has an explicit label for ext4:
(parted) help mkpart                                                      
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
...
        FS-TYPE is one of: btrfs, nilfs2, ext4, ext3, ext2, fat32, fat16, hfsx, hfs+, hfs, jfs, swsusp, linux-swap(v1), linux-swap(v0),
        ntfs, reiserfs, 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)
...
If they are all mapped to the same partition code is another matter, so I'm fine with the current wording. Alternatively we could leave out FS-TYPE completely, after all it is optional (but this is not reflected in the BG).
-- Lahwaacz (talk) 14:41, 8 April 2015 (UTC)
Do we want to reopen and investigate this further? Thanks for reminding of the help command, however I can find many sources that seem to confirm that many Linux native file systems (but not all of the above!) map to 0x83: [2] [3] [4] [5] [6]. Unfortunately, as Wikipedia:Partition_type#Overview says, these codes are not standardized, so we won't be able to find an official reference. Last thing, quoting the manual, " fs-type is required for data partitions (i.e., non-extended partitions)", so I wouldn't leave it out as optional. — Kynikos (talk) 09:46, 9 April 2015 (UTC)
The clearest would either be mkpart primary linux or mkpartfs ext4 but I doubt either is supported... -- Alad (talk) 12:47, 9 April 2015 (UTC)
I doubt too, I've replaced the link to the manual with "help mkpart". — Kynikos (talk) 13:21, 10 April 2015 (UTC)
I wasn't sure where to put this as I'm also new and it's really minor, but also in the parted section when making partitions it says to put 'm' for MiB, this should probably be updated as in my install just 'm' set my sizes to MB not MiB. Suggest updating or preferably instructing the user to define units when entering parted: so set units MiB or GiB or whatever so that just numbers can be used afterwards in creating partitions.Jjex22 (talk) 05:04, 27 August 2015 (UTC)