Date: Thu, 31 Oct 2002 18:33:13 +0100 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Craig Rodrigues <rodrigc@attbi.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Cannot find my Linux partition Message-ID: <56630.1036085593@critter.freebsd.dk> In-Reply-To: Your message of "Thu, 31 Oct 2002 12:06:15 EST." <20021031120615.A541@attbi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56630.1036085593>