From owner-freebsd-questions Sat Sep 29 16:50:37 2001 Delivered-To: freebsd-questions@freebsd.org Received: from aerre.pair.com (aerre.pair.com [209.68.2.30]) by hub.freebsd.org (Postfix) with SMTP id 3B56F37B40B for ; Sat, 29 Sep 2001 16:50:34 -0700 (PDT) Received: (qmail 79116 invoked by uid 3133); 29 Sep 2001 23:50:32 -0000 Message-ID: <20010929235032.79115.qmail@aerre.pair.com> Date: Sat, 29 Sep 2001 19:50:32 -0400 (EDT) From: walton@digger.net To: mwm@mired.org Cc: questions@freebsd.org Subject: Re: Partition table problem X-Mailer: X-URL: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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