LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-23-2023, 10:24 AM   #1
shirase
LQ Newbie
 
Registered: Nov 2023
Distribution: Linux for PlayStation 2
Posts: 8

Rep: Reputation: 0
Question Partitioning Tools & Disk Types


Does anyone know if gptfdisk checks for optimal alignment or if I would need to use parted after?
I found an option in gptfdisk to set alignment but it expects me to set the alignment as where parted just works.
Code:
parted --align 'optimal' "/dev/x" ;
sgdisk --set-alignment=x
Parted is ancient compared to gptfdisk. Can someone explain this?

I read this on the arch wiki but i'm still unclear on this:
Quote:
gdisk performs partition alignment automatically on a 2048 512-byte sector (1 MiB) block size base which should be compatible with all Advanced Format HDDs and the vast majority of SSDs if not all.
Does anyone know if gdisk will be able to align correctly for 512e disks as well as advanced format disks?
I have a couple old laptops with 512e disks and I feel like I might need to know this.

Last edited by shirase; 11-23-2023 at 02:01 PM.
 
Old 11-23-2023, 08:29 PM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
As far as I know gdisk is a drop in replacement (enhancement) to the legacy fdisk that has been around for ages. Its major change seems to be that it is more specialized for gpt partitioning and for the newer larger block size as noted above.
 
Old 11-24-2023, 11:05 AM   #3
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,150

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Personally, I've never used such commands — my Linux distros have always come with a GUI, so why not use it? If you use gparted, it has this advice partition alignment
 
Old 11-24-2023, 06:17 PM   #4
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by DavidMcCann View Post
Personally, I've never used such commands — my Linux distros have always come with a GUI, so why not use it? If you use gparted, it has this advice partition alignment
Each tool has its place. I use gparted, fdisk, and gdisk as appropriate. Gparted seems the best so far in the gui world.
 
Old 11-24-2023, 09:46 PM   #5
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 782
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
I like parted for automation of partitioning within a shell script.
 
Old 11-24-2023, 11:12 PM   #6
shirase
LQ Newbie
 
Registered: Nov 2023
Distribution: Linux for PlayStation 2
Posts: 8

Original Poster
Rep: Reputation: 0
It seems that everyone has a different preference or oppinion in this topic.
I read a few pages written by Rod Smith: www.rodsbooks.com/gdisk
Some parts helped explain his intentions in creating his program and how it works.
I believe that it assumes for 4k native sectors.

Quote:
Originally Posted by computersavvy View Post
gdisk is a drop in replacement (enhancement) to the legacy fdisk
I won't analyze gptfdisk but I believe that was the intention in it's creation.

Quote:
Originally Posted by DavidMcCann View Post
my Linux distros have always come with a GUI, so why not use it?
I'm trying to create a scripted installation of Arch, as I am a "Newbie" and I'm running EndeavourOS.
sgdisk seemed to be the best option until I had to try to understand how alignment and 512e disks are handled.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Conflicting type declarations between sys/types.h and linux/types.h Da Shi Cao Programming 3 09-13-2010 11:55 PM
sys/types.h & linux/types.h conflict while compiling johnnyhal Linux - Software 1 12-28-2008 06:39 PM
conflicting redeclaration of sys/types.h and linux/types.h schmil Programming 6 12-11-2008 02:02 PM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
Gotta love those ٱٱٱٱٱٱٱ&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration