[Techtalk] Partitioning issues.
Staci
scorcora at wisc.edu
Fri Jul 25 11:43:44 EST 2003
On Fri, 25 Jul 2003, Jacinta Richardson wrote:
>
> G'day Staci,
> I'm sorry to hear that you took the bad advice and you've got these
> problems. This is my advice (well and my fiance's advice too). I
> personally have never ever ever been in this situation, but I have some
> ideas on what you want to do now.
>
> a) back up what you've got now. 100%. Do a disk copy of your current
> hard drive (the unhappyily partitioned one) onto other media. dd might be
> your friend here or you might have some other tool. copying to tape is
> good, or to another hard drive if you have one spare with enough room.
>
> The idea is to ensure you have a backup of your data in case something in
> the recovery step goes disasterously wrong.
Ummm...I dunno how I'd back up info that can't be seen.
Also, I have no room to back up 17gb of stuff.
Also, it's sacrificable if absolutely necessary.
It's 17gb of music.
> b) test the above backup. Make sure the data on both mediums is now
> identical.
See above.
> c) write down all the things you've done so far.
> you used fdisk, that's not the end of the world.
>
> Have you changed your data at all? What does gpart do?
>
> If all you've done is messed around with the partition table, if you
> haven't run mke2fs or fsck you might be in luck.
>
> If you haven't trashed your data, you may be able to rebuild the partition
> table to what it was. (You took a backup of the partition table? If yes
> dd may be your friend, if no.....)
No backup, but I haven't trashed the data. :)
> When you rebuild the partition table (using the same tool as you first
> changed it with, fdisk in this case?) you MUST make sure that the
> cylinders for the start of your partition are the same as what they were
> before. This is the hard bit.
Yes and no. I didn't change the bits at the BEGINNING of the drive, I didn't touch hda1-2-3, just 4.
So obviously, there's only so much space left, and 4 was all of it. So basically remaking it from same points
should be automatic, since the beginning is where 3 leaves off, and the end is the end.
Right? (I've never opened a HD to look at how they're made, I really oughta)
> It may be possible to walk over your disk in a read only manner to detect
> the edges of your previous partitions and work out the cylinders from
> that. Let me know if you need more help in this area.
> You said that you had one big partition. If this is it then this should
> be easy enough to put back, starts at start of disk, ends at end. :)
Er, yeah one big one and three little ones. :/
> Once you've repartitioned, make sure that the kernal gets the new
> partition table (which may require a reboot) and then try mounting it in
> read only mode. Make sure that this partition is NOT in /etc/fstab
> because running fsck over it could corrupt your data in this fragile
> state.
> If it all looks good, you can probably run a manual fsck over it (it'll
> ask before making changes) or if it looks good try to recover your data
> from it directly.
I think what I really need is for someone to tell me how to rewrite the partition table.
If there's a tool that'll look at what's there and rewrite the table based on that.
I get the feeling that's what gpart is supposed to do, and there might be a way to do it with parted too, but I
don't understand how. :(
Is there a way to do it without tools?
sl
More information about the Techtalk
mailing list