Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] What is difference betw. MSDOS and GPT Table data partitions?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

[Solved] What is difference betw. MSDOS and GPT Table data partitions?

#1 Post by bester69 »

Hi,

I'd like to install Windows in my system,but Ive found out I need a GPT table partition..


I didnt see there were any conversion in linux btrfs data between between a MSDOS and a GPT table partition..,
I meant..when I do a copy/paste partition (gparted) , a btrfs send/receive, or a fsarchive restore, didnt see any kind of data conversion,...

I also saw if i used sfdisk to backup/restore partition after changing Table partition type, data partition were backl available and recognozible under a different table partition type..

Am I missing something? :shock: , can you provide me some help cos I dont see where is the data conversion type among table partitions
Last edited by bester69 on 2021-09-03 03:13, edited 1 time in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

pcalvert
Posts: 1939
Joined: 2006-04-21 11:19
Location: Sol Sector
Has thanked: 1 time
Been thanked: 2 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#2 Post by pcalvert »

bester69 wrote: 2021-08-31 18:18 I'd like to install Windows in my system,but Ive found out I need a GPT table partition..
Is this a newer computer that uses UEFI instead of the older BIOS system?
Freespoke is a new search engine that respects user privacy and does not engage in censorship.

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#3 Post by Bloom »

GPT is required for UEFI and for every hard disk > 2 TB.
An MSDOS table is the oldest form and works only for storage systems of at most 2 TB. For an ssd of 500 GB, you can use either but remember you need GPT for a UEFI system.
With an MSDOS table, you only get four primary partitions. GPT has as many partitions as you would want and doesn't have primary and "secundary" (logical drives) partitions.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#4 Post by bester69 »

Bloom wrote: 2021-09-01 18:45 GPT is required for UEFI and for every hard disk > 2 TB.
An MSDOS table is the oldest form and works only for storage systems of at most 2 TB. For an ssd of 500 GB, you can use either but remember you need GPT for a UEFI system.
With an MSDOS table, you only get four primary partitions. GPT has as many partitions as you would want and doesn't have primary and "secundary" (logical drives) partitions.
Yes, thanks, but In what affect that to my installation..
I saw I can switch from MSDOS to GPT by just using the sfdik and keeping all the data..

Is it as easy as this to switch Table partition.:
- sfdisk -d /dev/sda > mytableMSDOS
- cp mytableMSDOS mytableMSDOS.ALtered
- create an empty Table partition GPT
. using editor copy paste, record start/end partition
- sfdisk -f /dev/sda < mytableMSDOS.ALtered (GPT)
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#5 Post by Bloom »

NO! Changing the table type deletes everything on the hard disk. So if you want to do that, make a backup of all the partitions first so you can restore them on the new partitions made after having created the GPT table.
They need to be file backups, not images like CloneZilla. Because the structure of the disk will be different, you can't restore partition images.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#6 Post by p.H »

bester69 wrote: 2021-08-31 18:18 I didnt see there were any conversion in linux btrfs data between between a MSDOS and a GPT table partition
Btrfs is a filesystem. Partition table is beyond the scope of the filesystem.
You can convert a partition table in-place with gdisk. You may also need to reinstall GRUB depending on how it was installed.
Bloom wrote: 2021-09-01 18:45 GPT is required for UEFI and for every hard disk > 2 TB.
Wrong and wrong.
UEFI boot supports both DOS and GPT partition schemes.
DOS partition scheme is limited to 2^32 sectors, i.e. 16 TiB with 4096-byte sectors (4Kn Advanced Format).
Also, a partition table is not required at all when the drive is used entirely e.g. as a single filesystem, swap area, RAID array member, LVM physical volume or encrypted volume.

All that being said, GPT is much better than DOS (partition UUID and labels, no need for extended partition, backup partition table).
Bloom wrote: 2021-09-02 05:27 Changing the table type deletes everything on the hard disk.
Wrong. There are several ways to change the partition table type without deleting anything.

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#7 Post by Bloom »

EFI supports both MSDOS and GPT, but UEFI (the Microsoft/Intel version) does not. For "secure boot", GPT is required.
Creating a new table destroys the old structure, so I don't know of any way to keep the old data safely and securely within the new structure. Partitioning software will warn you that all data will be lost if you select the function to create a new table.
So better be safe than sorry and make a backup first.

And using a hard disk in its entirety without a partition table can be done safely for RAID and LVM, but I wouldn't advise if for regular filesystems.

Marie SWE
Posts: 241
Joined: 2021-04-06 22:14
Location: Sweden / Linköping
Has thanked: 7 times
Been thanked: 9 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#8 Post by Marie SWE »

bester69 wrote: 2021-08-31 18:18 Hi,

I'd like to install Windows in my system,but Ive found out I need a GPT table partition..
Is it windows 10 or 11 you intend to install?
If it is win11.. GPT is a must
If it is win10 it is possible to install 10 on MBR, but you has to boot installation media in BIOS/Legasy/CSM mode.. So you has to make sure you have Legacy/csm compatibility mode enabled in your bios settings
To force installation media to always boot in legacy mode.. on your windows install usb stick Rename the folder EFI to EFI-old and the media can't boot in to efi mode
That trick also works on every linux distro :)
Why make things complicated in life, if you can make it easier for yourself... Do it. ;o)
You only have one life, so make the most of it and enjoy it while you can.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#9 Post by bester69 »

Marie SWE wrote: 2021-09-02 13:07
bester69 wrote: 2021-08-31 18:18 Hi,

I'd like to install Windows in my system,but Ive found out I need a GPT table partition..
Is it windows 10 or 11 you intend to install?
If it is win11.. GPT is a must
If it is win10 it is possible to install 10 on MBR, but you has to boot installation media in BIOS/Legasy/CSM mode.. So you has to make sure you have Legacy/csm compatibility mode enabled in your bios settings
To force installation media to always boot in legacy mode.. on your windows install usb stick Rename the folder EFI to EFI-old and the media can't boot in to efi mode
That trick also works on every linux distro :)
Thanks mate, My system is a new bios HP, i dont see many options there..its like they were disabled or hidden,, anywau Im not intererted in follow that path to altered the bios to legacy mode.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#10 Post by bester69 »

p.H wrote: 2021-09-02 07:50 Btrfs is a filesystem. Partition table is beyond the scope of the filesystem.
You can convert a partition table in-place with gdisk. You may also need to reinstall GRUB depending on how it was installed.
I used sfdisk and didnt need anty convertion to keep the old data partition, but I didnt reboot, perhaps after rebooting under new table partition old data partition is vanished
Bloom wrote: 2021-09-02 05:27 NO! Changing the table type deletes everything on the hard disk. So if you want to do that, make a backup of all the partitions first so you can restore them on the new partitions made after having created the GPT table.
They need to be file backups, not images like CloneZilla. Because the structure of the disk will be different, you can't restore partition images.
I used sfdisk to convert andkeep the old data partition and didnt got any deletetion data, but I didnt reboot, perhaps after rebooting under new table partition old data partition is vanished.. didnt tested it...

That why im asking , I feel you cant just edit label table partition and keep old mode data even thought they're still there.. cos creating a new Table partition doesn delete any data.. I suspect you cant do what Im doing of recreating partition sectors under a different table partition mode. :?

I was able to do the trick of using sfdisk in oder to temporarily get away with MSDOS table partition and install windows 8.1 under GPT, then I restored MsDOS table, and was able to boot in windows 8 installation.. but windows system stacked for long starting up with timer whell running, I aborted, but perhaps I sould have waited longer, perhaps windows was internally converting filesystem to MSDOS :?:
Last edited by bester69 on 2021-09-02 22:17, edited 6 times in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#11 Post by p.H »

Bloom wrote: 2021-09-02 09:14 EFI supports both MSDOS and GPT, but UEFI (the Microsoft/Intel version) does not.
I know it does because I have used this setup.
Bloom wrote: 2021-09-02 09:14 Creating a new table destroys the old structure, so I don't know of any way to keep the old data safely and securely within the new structure
The partition table structure contains only meta-data, not the data. The data is still present. I already told you how to convert from DOS to GPT while keeping the data : gdisk.
Bloom wrote: 2021-09-02 09:14 using a hard disk in its entirety without a partition table can be done safely for RAID and LVM, but I wouldn't advise if for regular filesystems.
Partitionless drives are equally safe for filesystems, RAID and LVM. However I would not advise it for RAID or LVM either. Partitions make it easier to check a drive contents type in a glance.
bester69 wrote: 2021-09-02 22:09 I used sfdisk and didnt need anty convertion to keep the old data partition, but I didnt reboot, perhaps after rebooting under new table partition old data partition is vanished
It depends how you used sfdisk. It you created new partitions at the exact same places as the existing ones with the proper types, it should be fine. But you maby need to reinstall GRUB, and I am not sure it can be done without rebooting first (which may be a problem if GRUB does not work properly, so keep a boot repair media at hand).
bester69 wrote: 2021-09-02 22:09 then I restored MsDOS table
Why on earth did you do that ?

Marie SWE
Posts: 241
Joined: 2021-04-06 22:14
Location: Sweden / Linköping
Has thanked: 7 times
Been thanked: 9 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#12 Post by Marie SWE »

bester69 wrote: 2021-09-02 22:01
Marie SWE wrote: 2021-09-02 13:07
bester69 wrote: 2021-08-31 18:18 Hi,

I'd like to install Windows in my system,but Ive found out I need a GPT table partition..
Is it windows 10 or 11 you intend to install?
If it is win11.. GPT is a must
If it is win10 it is possible to install 10 on MBR, but you has to boot installation media in BIOS/Legasy/CSM mode.. So you has to make sure you have Legacy/csm compatibility mode enabled in your bios settings
To force installation media to always boot in legacy mode.. on your windows install usb stick Rename the folder EFI to EFI-old and the media can't boot in to efi mode
That trick also works on every linux distro :)
Thanks mate, My system is a new bios HP, i dont see many options there..its like they were disabled or hidden,, anywau Im not intererted in follow that path to altered the bios to legacy mode.
It sounds like a smart choice :mrgreen:
But do not try to convert the disk from MBR to GPT with data on the disk without having a backup. :wink:
I have had to recover data from a lot of disks from people who messed up when they have experimented with disk partitions.. or tried to "clean their filesystems" in windows.
So just be careful if you value your disks information. :D
I do not know of any good Linux programs that can convert without emptying the disk. And windows can not handle btrfs partitions.
Why make things complicated in life, if you can make it easier for yourself... Do it. ;o)
You only have one life, so make the most of it and enjoy it while you can.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#13 Post by bester69 »

p.H wrote: 2021-09-02 22:11 The partition table structure contains only meta-data, not the data. The data is still present. I already told you how to convert from DOS to GPT while keeping the data : gdisk.
Yes, I knew about gdisk thought I didnt know what It was about it.. know I understand..
>> thats what Im asking.. using sfdisk dont see any metadata convertion at all anywhere.. I think to remember filesystem data keeps a track in some record in table partition.. I dont know what happend when you creates a new table partition and bright back the partitions (sfdisk) without regenerating that record track (gdisk).. Im missing something :?
p.H wrote: 2021-09-02 22:11
bester69 wrote: 2021-09-02 22:09 then I restored MsDOS table
Why on earth did you do that ?
Cos I had my linux installation under Msdos, and didnt wanna take the risk of losing as well linux installation.. so just messing with windows 8 in MsDos direction, but youre right now that I think of it

p.H wrote: 2021-09-02 22:11 It depends how you used sfdisk. It you created new partitions at the exact same places as the existing ones with the proper types, it should be fine. But you maby need to reinstall GRUB, and I am not sure it can be done without rebooting first (which may be a problem if GRUB does not work properly, so keep a boot repair media at hand).
Yes, I did exactlly that trick.. reinstalling the GRUB and regenerating the EFI partition is not big deal.. Ive been practising a lot :mrgreen: with the damn EFI partition..

Thanks
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#14 Post by p.H »

bester69 wrote: 2021-09-02 22:28 Yes, I knew about gdisk
I was replying to Bloom.
bester69 wrote: 2021-09-02 22:28 using sfdisk dont see any metadata convertion at all anywhere
How did you search ?
sfdisk, fdisk or whatever should show a GPT partition table. That means GPT metadata.
bester69 wrote: 2021-09-02 22:28 I think to remember filesystem data keeps a track in some record in table partition
No. Filesystems have nothing to do with the partition table. They only reside in partitions.
bester69 wrote: 2021-09-02 22:28 reinstalling the GRUB and regenerating the EFI partition is not big deal
You do not need to "regenerate" the EFI partition (whatever that means). Just put the right partition type so that the UEFI firmware can find it.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: What is difference betw. MSDOS and GPT Table data partitions?

#15 Post by bester69 »

TABLE PARTITION MSDOS before operation (with sfdisk!!) :o

Image

Table Partition MSDos exported with sfdisk
label: dos
label-id: 0xda8a0d8e
device: /dev/nvme0n1
unit: sectors
sector-size: 512

/dev/nvme0n1p1 : start= 2048, size= 1048576, type=c, bootable
/dev/nvme0n1p2 : start= 137033728, size= 133615616, type=83
/dev/nvme0n1p3 : start= 270649344, size= 229468160, type=5
/dev/nvme0n1p4 : start= 1097728, size= 135936000, type=7
/dev/nvme0n1p5 : start= 270651392, size= 5048320, type=82
/dev/nvme0n1p6 : start= 275701760, size= 131059712, type=83
/dev/nvme0n1p7 : start= 489287680, size= 10829824, type=7
/dev/nvme0n1p8 : start= 406763520, size= 82522112, type=83


TABLE PARTITION GPT after completed operation with success (with sfdisk!!) :o
** You can see the free spaces of getting away with extened partition in gpt

Image

Table Partition GPT exported and edited to match Msdos partitions (with sfdisk)
label: gpt
label-id: 44505117-04D9-4119-89A3-85FBA3E02ED3
device: /dev/nvme0n1
unit: sectors
first-lba: 34
last-lba: 500118158
sector-size: 512

/dev/nvme0n1p1 : start= 2048, size= 1048576, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=4FE3F2D4-B84A-4E28-ADFA-3071F6D02F4C
/dev/nvme0n1p2 : start= 137033728, size= 133615616, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=78FC04C9-DB08-463E-9F8D-FCB737369A25
/dev/nvme0n1p3 : start= 270651392, size= 5048320, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=27B786AF-400B-41C4-B1C2-07504A25A946
/dev/nvme0n1p4 : start= 1097728, size= 135936000, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=A2A06A08-BE12-40F2-84C2-627645F3FD10
/dev/nvme0n1p6 : start= 275701760, size= 131059712, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=BD71CCB1-D3BE-48CE-A309-47F6EC18AB72
/dev/nvme0n1p7 : start= 489287680, size= 10829824, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=9E48B179-4189-4B0E-A8AB-0D722527544B
/dev/nvme0n1p8 : start= 406763520, size= 82522112, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=14682D73-E8CD-4216-B480-0F5A61A30A9F
Steps I followed:
0- Used a Livecd to export/import table partition with sfdisk tool
1- Dropped the table partition MSDOS
1.1- Created a GPT table partition
1.2- Create several very small partitions to identify the code type partition under GPT (vfat, ntfs,swap, btrfs)
1.3- Mapped each type to match msdos partitions and deleted extened line partitions as GPT doent use them
1.4- Regenerate GPT with mapped records : sudo sfdisk /dev/sda < MyGPTedited.txt

2- Finally: I had to install back the linux boot loader; for them I used this:
https://askubuntu.com/questions/831216/ ... -partition

sudo apt install grub-efi
sudo grub-install --target=x86_64-efi /dev/sda --efi-directory=/media/efi --boot-directory=/media/root/boot

AMAZING!! (It was only needed sfdisk)!!,
it was a very cryticall and surgeon operation, but I had success!!!, Now I will be able to fix or reinstall Windows..
:D :D :D


Thanks to all
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

Marie SWE
Posts: 241
Joined: 2021-04-06 22:14
Location: Sweden / Linköping
Has thanked: 7 times
Been thanked: 9 times

Re: [Solved] What is difference betw. MSDOS and GPT Table data partitions?

#16 Post by Marie SWE »

Nice and congrats :)
Why make things complicated in life, if you can make it easier for yourself... Do it. ;o)
You only have one life, so make the most of it and enjoy it while you can.

Post Reply