Partition Nightmare - Is there any way to fix this?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Partition Nightmare - Is there any way to fix this?
I recently installed Debian on my system with the hope of dual-booting with WinXP, and now my partition table is all screwed up.
Here's the output of fdisk /dev/hda/ -l:
Disk /dev/hda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 29551 30401 6835657+ 83 Linux
/dev/hda2 * 1 22366 179648248+ 7 HPFS/NTFS
/dev/hda3 23248 29550 50628847+ f W95 Ext'd (LBA)
/dev/hda5 23248 24129 7083688+ b W95 FAT32
/dev/hda6 24130 24359 1847443+ 82 Linux swap / Solaris
/dev/hda7 24360 29550 41696676 83 Linux
Partition table entries are not in disk order
So, as you can see, my last partition is listed first, and on a previous run of fdisk, it showed that the HPFS/NTFS partition actually ended in the middle of a cylinder. There's also an overlap between hda3 and hda5...and where's hda4?? What's with the big gap between hda2 and hda3? Am I totally sunk? I've got some data I'd like back on this disk, and reinstalling everything would be (as you all know) a real b!tch.
Anyone got a favorite linux partition manager that could help?
There's nothing wrong with your partitions, so don't do something stupid that will screw up your disk.
The numerical order of the partitions does not need to match the physical order of the partitions on the disk. If it really bothers you, then there is an advanced feature in fdisk that can make the primary partition numbering match the physical order on the disk, but it is a really bad idea to change the numbering, unless you understand how the changes will impact the installed operating systems.
hda3 is an extended partition, which is a specialized primary partition that can be subdivided into logical partitions. All partitions numbered greater than 4 are logical partitions and should fall within the cylinder range of hda3.
The reason that there is no hda4 is because one has not been created. If you really want an hda4, then use fdisk to create it using the unused cylinders you identified.
The fdisk “error” about a partition ending in the middle of a cylinder is not a fatal problem. It can be “fixed”, but you should just leave it alone. I see this “error” periodically when using PartitionMagic to format drives. A cylinder is just a conceptual way to visualize the organization of the drive. After all, do you really think that your drive has 255 heads? That's what fdisk is telling you.
Thanks for the advice, whatshisname, but this isn't just a cosmetic complaint - my system doesn't work.
I can't boot WinXP (from hda2) and none of the partition tools are able to read my partition table - other than fdisk. At this point, i can't boot anything; my system just tells me to insert bootable media because it doesn't properly recognize the hd. I also have a recovery partition on hda5 that I can't boot from or access.
I used Partition Magic to do this, and everything worked fine until I actually installed Debian and used their partitioner tool. So there is something that needs to be "fixed." I just don't know what it is or how to do it.
It sounds like you are having what could be a very minor problem with the MBR, but it is hard to make repair suggestions when you are not supplying information about what you have tried to do. It would be very helpful to have a look at the current partition structure on the disk using linux fdisk.
Did you try running PartitionMagic by booting with the PM CD or the emergency floppies? If you run PM in emergency mode, do NOT answer “yes” to any autorepair questions. Letting PM attempt to repair the problem will likely destroy the partition structure. Been there, done that, but even that is probably fixable using linux fdisk.
Another option is to try booting from the xp installation CD into repair mode/recovery console (at the “install/repair” question) and running the fixmbr utility. Normally, that will return you to windows-controlled booting and you can then straighten out the grub issues.