Results 1 to 7 of 7

Thread: Linux command to create partitions

  1. #1
    Join Date
    Jan 2010
    Location
    New Jersey, USA
    Posts
    81

    Default Linux command to create partitions

    I'm looking for the correct command to create partitions aligned correctly.
    I normally do this using "diskpart" after booting a Windows 10 install disk and running command prompt.
    The Windows command would be simply create partition using diskpart for a 250gig primary partition.
    And then extended plus logical

    create partition primary align=1024 size =250000
    create partition extended align=1024
    create partition logical align=1024 size =(megabytes)

    What is the equivalent linux command please ?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,748
    Blog Entries
    3

    Default Re: Linux command to create partitions

    I normally use "fdisk" for this. You can also use "parted".
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    22,484
    Blog Entries
    1

    Default Re: Linux command to create partitions

    openSUSE Leap 15.2; KDE Plasma 5

  4. #4
    Join Date
    Sep 2012
    Posts
    6,148

    Default Re: Linux command to create partitions

    You already asked exactly the same question (and with better and more clear title) month ago:

    https://forums.opensuse.org/showthre...ned-partitions

    Any reason you needed to create another thread with completely identical question?

  5. #5
    Join Date
    Jan 2010
    Location
    New Jersey, USA
    Posts
    81

    Default Re: Linux command to create partitions

    Quote Originally Posted by arvidjaar View Post
    You already asked exactly the same question (and with better and more clear title) month ago:

    https://forums.opensuse.org/showthre...ned-partitions

    Any reason you needed to create another thread with completely identical question?
    I got a lot of mixed answers and just wanted to see if someone had a different take on this.
    Thanks for the feedback !

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,125
    Blog Entries
    2

    Default Re: Linux command to create partitions

    Quote Originally Posted by qawtbh View Post
    I got a lot of mixed answers and just wanted to see if someone had a different take on this.
    Thanks for the feedback !
    My take is that your question might have some academic value but probably has limited real world value.

    So, for instance skim through the ArchWiki on Parted...

    https://wiki.archlinux.org/index.php/Parted

    You'll find barely any mention specifying by command starting a partition on a particular megabyte. Yes, it's a maybe not terribly rare scenario but when you do this means that there can be problems of alignment.
    You'll find other recommended or commonly used parameters like how to automatically align with the beginning or end of free space and whether to automatically fill all free space. All these settings would ensure that you utilize all available free space and automatically make adjustments for the size of your sectors.

    And,
    For a lot of people the GUI tools like Parted and GParted are so easy to use and assure an optimum result, unless you do a lot of partitioning to keep up your skillset, you'll probably find it easier and better to use a graphical tool.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7

    Default Re: Linux command to create partitions

    KDE Partition Manager sometimes is more useful than GParted.

    Parted is a CLI utility.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •