1 (edited by anystupidname 2008-10-24 22:05:26)

Topic: Enhancement suggestion (extended<>primary)

The ability to convert an extended partition to primary (and vice versa?)

First and foremost, I would like to be clear that I think Gparted is awesome and you guys are doing an excellent job. Thank you!

I suspect this just isn't something that has to be done very often or was just omitted for another reason? I recently had to do something I'd never had to do before because of something really strange that happened with an XP/NTFS partition. I suspect it had something to do with a USB thumb drive partitioning utility but I'm not sure. Somehow the the system partition got transformed into an extended volume but XP still thought it should be the boot volume even though it is incapable of booting from that. The second partition on the drive at the time was stupidly designated the system volume by XP. I sort of "jumpstart" booted the system from a floppy for a while which got annoying quick. Anything I tried with recovery console, manually editing boot.ini and setting partition active didn't work. So I was disappointed to be forced to use a copy of Partition Tragic 8.05 which will let you convert extended<>primary... I didn't see a way to do this with the Gparted LiveCD which has never failed me before.

2 (edited by cmdr 2008-11-07 02:19:49)

Re: Enhancement suggestion (extended<>primary)

Hi,
converting an extended partition to a primary is very easy, . . . if there are no logical volumes inside ( = only unallocated space) or one logical volume (all available space) at maximum : you only have to set the partitionID in its partition table at MBR from 0x0F (for "extended") to 0x07 ( for NTFS) or 0x0C (for FAT32). If there was more than one logical volume in the extended partition, you loose them all. This procedure works also vice-versa, which might have happened accidentally in your case. With Linux program "fdisk" you can hassle-free set the partition ID to whatever you want.  "fdisk" always demands to delete the partition before, but if you write down its boundaries before and reset them afterwards, you don't loose its content (one volume only !). To change the partitionID ( not to "extended" ) is an usual way to hide partitions from Windows during complex multiboot installations.

Note: If the extended partition was regularly created, the first block contains an extended drive record, which only has two entries similar to the MBR partition tables. The first one indicates the location, where the Volume Boot Record of the first logical drive resides (always 63 blocks ahead), the second one contains the place, where the next drive record is located, thus forming a chain. So if you want to convert a single extended logical drive to a primary, you have to add 63 blocks to the end of the precedent primary, to have the correct starting point for the new primary partition. Moreover the block counting for each Volume Boot Record starts with 63(0x3F), so that the indicated drive parameters in Volume Boot Record have to be corrected, too. Maybe if you use "checkdisk /f" under Windows or GParted's check option, the latter correction is done automatically (I didn't test it yet).

3

Re: Enhancement suggestion (extended<>primary)

Hello,
I have the same problem.
Due to reallocation of one hard drive, I changed its usage to be whole MS drive. But the problem lies now in the posibility to boot from logical partition at extended part of drive without any primary partition. It would be nice to have this thing in the GUI.

MBR is not operated by GParted for now?

I will try cmdr solution by direct access.

4

Re: Enhancement suggestion (extended<>primary)

@CowStyle

Booting from a logical drive on an extended partition is not possible under Windows. BIOS is only looking for primary partitions. If there is no bootflag available, your machine will NOT start. It is also not possible to have an extended partition alone, because such a drive would NEVER boot.

Having a working Windows system on an extended drive, however, is possible under certain circumstances. For W2K / XP / Vista you must have NTLDR/BOOTMGR on a bootable primary partition or use e.g "GRUB" as bootmanager. Since the drive letter of the Windows drive is not changeable after complete installation, you HAVE TO install it on its choosen location. This is not directly possible on an extended drive ! But if you stop installation on a primary partition, before it reboots for the second last time ( indicated by a countdown ), copy the whole content of this "auxillary" location to the wanted extended drive, copy NTLDR/BOOTMGR to the bootable primary drive, adapt BOOT.INI, resp. recover BOOTMGR by its repair console, reboot and let it finish its installation ...  the work is done !

5

Re: Enhancement suggestion (extended<>primary)

Thanks for share solution....

.....