pkgsrc/sysutils/grub/patches/patch-ab
bad 9fd8390500 stage2/pc_slice.h: add the missing disklabel FS_TYPE #defines and RF_PROTECTED_SECTORS.
stage2/disk_io.c: adjust the partition start and size by RF_PROTECTED sectors for partitions of type FS_RAID.
stage2/fsys_ffs.c: accept partitions of type FS_RAID as candidates for FFS, too.
stage2/fsys_ufs2.c: accept partitions of type FS_RAID as candidates for FFSv2, too.

This allows grub to directly boot from NetBSD RAID1 partitions the same way
as with the native bootloader.

Bump PKGREVISION.
2006-10-17 21:55:33 +00:00

20 lines
611 B
Text

$NetBSD: patch-ab,v 1.3 2006/10/17 21:55:33 bad Exp $
--- stage2/disk_io.c.orig 2004-05-23 18:35:24.000000000 +0200
+++ stage2/disk_io.c 2006-09-18 01:12:19.000000000 +0200
@@ -632,6 +632,15 @@
bsd_evil_hack = 4;
#endif /* ! STAGE1_5 */
+ if (BSD_PART_TYPE(buf, i) == FS_RAID)
+ {
+ /* found a RAID partition, restart inside that */
+ /* *offset += RF_PROTECTED_SECTORS; */
+ *start += RF_PROTECTED_SECTORS;
+ *len -= RF_PROTECTED_SECTORS;
+ /* *partition = (*partition & 0xFF00FF) | (0xFF << 8); */
+ /* return next_bsd_partition(); */
+ }
return 1;
}
}