Bug#80325: Installer misreports partition numbers
Adam Di Carlo wrote:
>
> Glenn McGrath <bug1@optushome.com.au> writes:
>
> > I am unsure about the priority with solaris partitions so i just put
> > them at the end, i guess i really should have checked the linux kernel
> > source, as i dont have any other info on them handy.
> >
> > Adam, I can commit this patch if it looks ok to you.
> >
> > Still kernels should have BSD disklable support as well i think
>
> I would be more comfortable if you checked it against the kernel (or
> fdisk, I guess) sources.
>
Luck you did, from checking the linux code, i found that msdos style
extended partition will always follow primary partitions, following this
will be BSD or solaris on a first come first serve basis.
The previous patch i did always put BSD before SOLARIS which is wrong
This patch should be right i hope
Glenn
diff -r -U 3 ./boot-floppies.orig/utilities/libfdisk/partbl_msdos.c boot-floppies/utilities/libfdisk/partbl_msdos.c
--- ./boot-floppies.orig/utilities/libfdisk/partbl_msdos.c Sat May 6 01:44:26 2000
+++ boot-floppies/utilities/libfdisk/partbl_msdos.c Thu Jan 11 10:19:11 2001
@@ -322,21 +322,26 @@
if (is_extended_partition(p)) {
extended_partition(device, fd, START_SECT(p), NR_SECTS(p));
}
+ }
+#if HAVE_BSD_DISKLABEL | HAVE_SOLARIS_X86_PARTITION
+ p = (struct partition *) (0x1be + data);
+ for (i=1 ; i<=4 ; minor++,i++,p++) {
#if HAVE_BSD_DISKLABEL
if (SYS_IND(p) == BSD_PARTITION) {
bsd_disklabel_partition(device, fd, START_SECT(p));
}
#endif
#if HAVE_SOLARIS_X86_PARTITION
- /* james@bpgc.com: Solaris has a nasty indicator: 0x82
- * which also means linux swap. For that reason, all
- * of the prints are done inside the
- * solaris_x86_partition routine */
+ /* james@bpgc.com: Solaris has a nasty indicator: 0x82
+ * which also means linux swap. For that reason, all
+ * of the prints are done inside the
+ * solaris_x86_partition routine */
if (SYS_IND(p) == SOLARIS_X86_PARTITION) {
solaris_x86_partition(device, fd, START_SECT(p));
}
#endif
}
+#endif
/*
* Check for old-style Disk Manager partition table
*/
Only in boot-floppies/utilities/libfdisk: testing
Reply to: