LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-14-2013, 03:03 PM   #1
jheengut
Member
 
Registered: Sep 2006
Location: Providence, Moka Mauritius
Distribution: Slackware, OpenSuse, Debian, Fedora, Mageia, Ubuntu, RedHat, BSD, Gentoo, Puppy
Posts: 173
Blog Entries: 2

Rep: Reputation: 2
who to trust :: gpt .. ?


hi

this is the output from gdisk

Quote:
root:~/hd# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 3907027055 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): B279F19F-F4BE-4262-A6BC-E302C1C993F7
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907027021
Partitions will be aligned on 2048-sector boundaries
Total free space is 4062 sectors (2.0 MiB)

Number Start (sector) End (sector) Size Code Name
1 4096 2101247 1024.0 MiB 8300 boot
2 2101248 35655679 16.0 GiB 8200 swap
3 35655680 88084479 25.0 GiB 8300 sware14.0
4 88084480 3907027021 1.8 TiB 8300 Linux filesystem
and this one from parted

Quote:
root:~/hd# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA TOSHIBA DT01ACA2 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 2097kB 1076MB 1074MB ext2 boot
2 1076MB 18.3GB 17.2GB linux-swap(v1) swap
3 18.3GB 45.1GB 26.8GB ext4 sware14.0
4 45.1GB 2000GB 1955GB ext4 Linux filesystem
who to trust for gpt partitioning ?

parted or gdisk for Proper Alignment

they both report different sizes


ps : I do not remember which tool I used cgdisk or gdisk to partition
 
Old 11-14-2013, 06:21 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,167

Rep: Reputation: 505Reputation: 505Reputation: 505Reputation: 505Reputation: 505Reputation: 505
They are actually saying the same thing. gdisk is reporting sector number offsets (512-byte sectors) and using MiB, GiB, and TiB (exact powers of 2) units for size. parted is defaulting to power of 10 units (KB, MB, GB, TB) for both offsets and size.

You can use either one. For parted, you can use its "unit" command to change the default for display and input.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is GPT and LVM what I really need? tauro_kpo Linux - Newbie 6 11-14-2013 03:18 PM
GPT vs MBR asipper Linux - General 9 12-23-2011 08:29 PM
CentOS 5.5 and GPT fantasygoat Linux - Hardware 4 04-08-2011 11:40 AM
[SOLVED] Slackware 13.37 - gdisk choices, MBR, GPT or Blank GPT CFet Slackware - Installation 3 04-01-2011 04:46 PM
GPT to MBR mrwall-e Linux - Software 3 08-26-2010 09:00 PM


All times are GMT -5. The time now is 09:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration