Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Oct 2001 08:35:00 +0200 (CEST)
From:      Micke Josefsson <mj@isy.liu.se>
To:        walton@digger.net
Cc:        questions@FreeBSD.ORG, mwm@mired.org
Subject:   Re: Partition table problem
Message-ID:  <XFMail.20011001083500.mj@isy.liu.se>
In-Reply-To: <20010929235032.79115.qmail@aerre.pair.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Also look at :

 make search key=gpart
Port:   gpart-0.1h
Path:   /usr/ports/sysutils/gpart
Info:   Tries to recover lost partition tables and file systems
Maint:  andrew@ugh.net.au
Index:  sysutils
B-deps: gettext-0.10.35 gmake-3.79.1
R-deps:


Have not used it myself though. (Lucky me!)

/M

On 29-Sep-2001 walton@digger.net wrote:
> 
> You wrote:
> 
>> Just a note - FreeBSD terminology is slices, as the things that go
>> inside a FreeBSD slice are partitions. Fdisk doesn't follow that
>> usage, though.
> 
> Yeah, I know, but I figured I'd just stick with the terminology used
> in sysinstall, since that's what I was discussing.
> 
>> Sysinstall doesn't know that you didn't make any changes, and writes
>> the partition table out in any case. It shouldn't have touched the 4th
>> partition if you didn't change it, though.
> 
> Alas, it did.  :(  In fact, further research has revealed that it 
> zeroed out the entire 4th partition table entry, rather than just
> setting the type to unused.  That's making recovery a bit trickier.
> 
>> FreeBSD tools generally can't deal with logical partitions. They show
>> up as s5 and up, but you've got to use tools from other systems to
>> create them.  
> 
> I got a suggestion off-list to boot with a Linux repair disk and use
> their fdisk, since it is better suited for this sort of thing.
> 
>> If you're going to use FreeBSD tools, the best you can
>> do is use fdisk to tag the type of that 4th partition to extended, and
>> hope that the logical partition reappears.
> 
> That's the approach I'm leaning toward.  From my research, it sounds as
> though that'll work, so long as sysinstall ONLY wrote to the partition
> table and whatever tool I use does the same.  In that case, the logical
> partition data should still be intact.  Right now I am trying to see
> if gpart can find the logical partition.
> 
>> The extended partition type is either 5 or 15 for the LBA version.
> 
> Since the partition was created by Win98, I'm fairly certain it was 15.
> 
>> To use fdisk this one, invoke it as "fdisk -4 -u ad0" - assuming it's
>> disk ad0 that you need to fix. It will then print the partition 4
>> information, and ask you if you want to change it. Say "y". It will
>> then ask about the sysid - set that to either 5 or 15, whichever you
>> believe is correct. Just hit newline for the reast of the questions -
>> that will use the old values and not change things - until it prints
>> the new partition table and asks you if you want to write it. At that
>> point, tell it "y" to write it, nor "n" if you want to chicken out.
> 
> And fdisk will not touch ANYTHING on the disk aside from entry 4 in the
> partition table, correct?  The only flaw being that there are no old 
> values to default to.  I think I can get all the numbers I'll need from
> the partition editor in sysinstall, but there is still one question in
> my mind:
> 
> When a disk is partitioned, there is often a small amount of space left
> over after the last partition.  How do I know whether (and how much) to
> leave after this recreated partition?  Or does it even matter, as long
> as the extended partition is larger than the logical partition it
> contains?
> 
> Thanks,
> Dave
> 
> .
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

----------------------------------
Michael Josefsson, MSEE
mj@isy.liu.se

This message was sent by XFMail
running on FreeBSD 4.4-STABLE
----------------------------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20011001083500.mj>