View previous topic :: View next topic |
Author |
Message |
Novack n00b
Joined: 12 Apr 2003 Posts: 11 Location: Finland
|
Posted: Fri Aug 20, 2004 6:46 pm Post subject: Partition table a bit messed up |
|
|
Hello all,
I've been using Gentoo for about 1,5 years now (on a home server) and sometime ago I switched over to a bigger hard disk. I did an image with Norton Ghost and wrote it over to the new HD and booted up with it. Everything worked fine, except that I had foolishly used the Ghost's resizing ability, which of course does not work with non-Windows filesystems.
Now I have a situation where sfdisk shows a full sized partition (hda3) but when I check empty space with df it shows a smaller partition. The partition is only partly formatted, because Ghost succeeded in changing the partition table but could not format the extra space.
Now can I somehow change the partition table to correspond to the real situation without losing data? Then I could proceed by resizing the partition with tools better suited for it
Here's the sfdisk -l output
Code: |
Disk /dev/hda: 2055 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 13 14- 112423+ 83 Linux
/dev/hda2 14 76 63 506047+ 82 Linux swap
/dev/hda3 77 2046 1970 15824025 83 Linux
end: (c,h,s) expected (1023,254,63) found (1022,254,63)
/dev/hda4 0 - 0 0 0 Empty
|
And the df output:
Code: |
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 5735024 5163608 571416 91% /
|
Any help would be appriciated. Otherwise its going to be backup -> wipe -> reinstall. I hope could avoid the two latter steps with some help. |
|
Back to top |
|
|
aetius Tux's lil' helper
Joined: 09 Jul 2004 Posts: 118
|
Posted: Fri Aug 20, 2004 8:04 pm Post subject: |
|
|
The simplest answer to your question is: re-ghost, but don't let it change the size this time. Then proceed on with what you want to do. Ghost 7.5+ supports ext2/ext3 resizing (it does it by re-creating the filesystem) but it appears to have failed or you were using a non-ext filesystem. |
|
Back to top |
|
|
Novack n00b
Joined: 12 Apr 2003 Posts: 11 Location: Finland
|
Posted: Sun Aug 22, 2004 12:13 pm Post subject: |
|
|
Problem is that I don't have the original Ghost image anymore. It took some time before I noticed that it didn't resize the partition properly. (In retrospect I should have realized it beforehand, but it's too late now.) |
|
Back to top |
|
|
aetius Tux's lil' helper
Joined: 09 Jul 2004 Posts: 118
|
Posted: Wed Aug 25, 2004 4:12 pm Post subject: |
|
|
Hrmm. After some digging, I *think* the parted "resize" command may do what you need. I'd investigate that. I've never used it before, but it will resize the partition and the filesystem if necessary, and thus should be able to correct the problems Ghost introduced. This is an unusual situation though, and there's no telling how parted will react to a setup like that. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|