From owner-freebsd-current Thu Oct 31 9:33:22 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDC6F37B401 for ; Thu, 31 Oct 2002 09:33:19 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2A5F43E6E for ; Thu, 31 Oct 2002 09:33:18 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g9VHXD9d056631; Thu, 31 Oct 2002 18:33:13 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Craig Rodrigues Cc: freebsd-current@FreeBSD.ORG Subject: Re: Cannot find my Linux partition In-Reply-To: Your message of "Thu, 31 Oct 2002 12:06:15 EST." <20021031120615.A541@attbi.com> Date: Thu, 31 Oct 2002 18:33:13 +0100 Message-ID: <56630.1036085593@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20021031120615.A541@attbi.com>, Craig Rodrigues writes: > >--qDbXVdCdHGoSgWSk >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline > >On Thu, Oct 31, 2002 at 04:56:49PM +0100, Poul-Henning Kamp wrote: >> Can you please email me: >> >> boot -v console output (use serial console if you can) >> sysctl -n kern.geom.confxml > >OK, I edited /boot/default/loader.conf, and added set boot_verbose="YES" >and rebooted. (I'm still not at the machine physically :). I think it did. I wasn't aware that extended partitions could have a "boot me!" flag (0x80). Please try this patch: Index: geom_mbr.c =================================================================== RCS file: /home/ncvs/src/sys/geom/geom_mbr.c,v retrieving revision 1.22 diff -u -r1.22 geom_mbr.c --- geom_mbr.c 28 Oct 2002 07:50:47 -0000 1.22 +++ geom_mbr.c 31 Oct 2002 17:30:44 -0000 @@ -159,7 +159,7 @@ }; static void -g_mbr_print(int i __unused, struct dos_partition *dp __unused) +g_mbr_print(int i, struct dos_partition *dp) { g_hexdump(dp, sizeof(dp[0])); @@ -247,7 +247,7 @@ if (dp[i].dp_size == 0) continue; if (bootverbose) { - printf("Slice %d:\n", i + 1); + printf("Slice %d on %s:\n", i + 1, gp->name); g_mbr_print(i, dp + i); } npart++; @@ -324,16 +324,6 @@ } } -static void -g_mbrext_print(int i, struct dos_partition *dp) -{ - g_hexdump(dp, sizeof(dp[0])); - printf("[%d] f:%02x typ:%d", i, dp->dp_flag, dp->dp_typ); - printf(" s(CHS):%d/%d/%d", dp->dp_scyl, dp->dp_shd, dp->dp_ssect); - printf(" e(CHS):%d/%d/%d", dp->dp_ecyl, dp->dp_ehd, dp->dp_esect); - printf(" s:%d l:%d\n", dp->dp_start, dp->dp_size); -} - static struct g_geom * g_mbrext_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) { @@ -379,12 +369,13 @@ break; for (i = 0; i < NDOSPART; i++) g_dec_dos_partition( - buf + DOSPARTOFF + i * sizeof(struct dos_partition), - dp + i); + buf + DOSPARTOFF + + i * sizeof(struct dos_partition), dp + i); g_free(buf); - g_mbrext_print(0, dp); - g_mbrext_print(1, dp + 1); - if (dp[0].dp_flag == 0 && dp[0].dp_size != 0) { + printf("Slice %d on %s:\n", slice + 5, gp->name); + g_mbr_print(0, dp); + g_mbr_print(1, dp + 1); + if ((dp[0].dp_flag & 0x7f) == 0 && dp[0].dp_size != 0) { g_topology_lock(); pp2 = g_slice_addslice(gp, slice, (((off_t)dp[0].dp_start) << 9ULL) + off, -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message