[clue-tech] How to repair an overlapped partition

Collins Richey crichey at gmail.com
Fri Sep 8 22:14:32 MDT 2006


Here's an fdisk report of my hda drive. You will note that hda3
overlaps the last cylinder of hda1.


   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *         534        5755    41943040+   7  HPFS/NTFS
/dev/hda2               1         533     4281291    b  W95 FAT32
/dev/hda3            5755        5877      982639+   b  W95 FAT32
/dev/hda4            5878       24321   148151430    5  Extended
/dev/hda5            5878        9525    29302528+  83  Linux
/dev/hda6            9526       11958    19543041   83  Linux
/dev/hda7           11959       12202     1959898+  82  Linux swap / Solaris
/dev/hda8           12203       12568     2939863+  83  Linux
/dev/hda9           12569       24321    94405941   83  Linux

This device has the following history.

1. Started life as a new factory installed WinXP box with only hda1
and hda2. hda2 contains some sort of recovery utilities for the
Windows system, and hda1 originally had all remaining space on the
drive.

2. Used the Ubuntu installer to reduce the size of hda1, rebooted
Windows,and verified that all was ok after the NTFS filesystem check
completed.

3. Allocated the hda3 partition intending to use it as a transfer area
between Windows and Linux in case I ever get around to using Windows
on this box. (Also wanted to have all 4 primary/extended partitions
allocated, to prevent dumb installers from monkeying with the primary
vs. logical allocations. See note below.) hda3 was never formatted
which is quite fortunate since I didn't notice the overlap and even
more fortunate since the hda4 extended partition had a built-in buffer
to protect me from bad things happening at once!

4 Allocated hda4 and other logical partitions and continued to install
Linux distros.

5. Much later I discovered the overlap.

For now I'm avoiding any use of hda3 and Windows as well, but it would
be nice to be able to correct the problem. Is there a utility that
will safely perform this type of microsurgery, ie move the starting
cylinder boundary for hda3 forward by 1 cylinder without disturbing
any other partitions?


Side note. If you start an installation with hda1 primary hda2
primary, hda3 exctended and a few logical partitions, some distro
installers are too dumb to allow you to continue allocating only
logical volumes, and will try to allocate one of your partitions
(unpredicatable which one) as a primary partition since there is still
an available number.

-- 
Collins Richey
     If you fill your heart with regrets of yesterday and the worries
     of tomorrow, you have no today to be thankful for.



More information about the clue-tech mailing list