[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: partition table incorrect/ fdisk messed up?



In linux.debian.user, you wrote:
>    Device Boot    Start       End    Blocks   Id  System
> /dev/hda1             1       373   2996091   83  Linux
> /dev/hda2           374       871   4000185   83  Linux
> /dev/hda3           872      1120   2000092+  83  Linux
> /dev/hda4          1121      5116  32097870    5  Extended
> /dev/hda5          1121      1493   2996091   83  Linux
> /dev/hda6          1494      1991   4000153+  83  Linux
> /dev/hda7          1992      2489   4000153+  83  Linux
> /dev/hda8          2490      2684   1566306   82  Linux swap
> /dev/hda9          2685      3900   9767488+  83  Linux
> /dev/hda10         3901      5116   9767488+  83  Linux
> 
> and here's the output of df -h
> 
> matt@anarres:~$ df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hda1             2.8G  1.7G  1.0G  63% /
> /dev/hda2             3.8G  2.4G  1.2G  67% /usr
> /dev/hda3             1.9G  804M 1021M  45% /usr/local
> /dev/hda5             2.8G  1.2G  1.4G  44% /var
> /dev/hda6             3.8G   74M  3.4G   3% /tehanu
> /dev/hda7             3.8G   82M  3.4G   3% /tehanu/usr
> /dev/hda9              19G  6.5G   11G  37% /moreaudio
> /dev/hda10            9.2G  5.8G  2.9G  67% /home
> 

You already got the answer on why.  

You have the exact cylinders for these partitions.  I don't see any reason
why you can't delete /dev/hda5 through /dev/hda10 and then delete /dev/hda4. 
Then make /dev/hda4 again only make it the total size of the rest of the
drive.  Then remake /dev/hda5 through /dev/hda10 with exactly the same
cylinders as they had before.  Reboot and everything should be in the same
place.

I have remade a partition table before from a printout after losing it.  The
data was still there.

Another way to deal with it would be to move /usr/local to /dev/hda2 by
umount and remount /dev/hda3 as /mnt.  Then mv everything from /mnt over to
/usr/local.  Edit fstab to remove the line for /usr/local.  Then delete
/dev/hda3 and remake it.  The number might change - /dev/hda3 might become
your extended partition.  I would reboot after removing it and then see what
the numbers are.  Now you can make another primary partition of some size to
hold all that stuff you have in the extended. I would say to use the
cylinders at the end - looks like you need about 15 Gb to store everything.
Then go back and delete the extended and remake it to be from where it
begins now to where that 15Gb partition begins.  Then make the logicals
again and move the stuff back.  And that leaves you with a bigger extended
and a 15Gb primary partition.  Well, you could leave the music on that one,
come to think of it.

Anita



Reply to: