the enclosed patch add the commands hide= and unhide=
diff -u -r grub-0.5.92/ChangeLog grub/ChangeLog --- grub-0.5.92/ChangeLog Mon Jul 26 18:57:52 1999 +++ grub/ChangeLog Mon Aug 16 01:50:27 1999 @@ -1,3 +1,12 @@ +1999-08-16 Edward Killips <[EMAIL PROTECTED]> + + * stage2/shared.h added define for HIDDEN added prototypes for + hide_partition and unhide_partiton + + * stage2/cmdline.c added commands hide and unhide + + * stage2/disk_io.c added hide_partition and unhide_partition + 1999-07-15 Gordon Matzigkeit <[EMAIL PROTECTED]> * docs/Makefile.am (grub.info): Use an ugly hack to downgrade diff -u -r grub-0.5.92/stage2/disk_io.c grub/stage2/disk_io.c --- grub-0.5.92/stage2/disk_io.c Fri Jun 25 06:24:46 1999 +++ grub/stage2/disk_io.c Mon Aug 16 02:04:31 1999 @@ -267,6 +267,63 @@ #endif } +#ifndef STAGE1_5 +int unhide_part(int part) +{ + if (saved_drive) + { + if (part > 3) + { + errnum = ERR_NO_PART; + return 0; + } + if (!rawread (saved_drive, 0, 0, SECTOR_SIZE, (char *) SCRATCHADDR)) + return 0; + + if ((PC_SLICE_TYPE (SCRATCHADDR, part) & HIDDEN) == HIDDEN) + { + PC_SLICE_TYPE (SCRATCHADDR, part) ^= HIDDEN; + buf_track=-1; + if (biosdisk(BIOSDISK_WRITE, saved_drive, &buf_geom, + 0, 1, SCRATCHSEG)) + { + errnum = ERR_WRITE; + return 0; + } + } + } + return 1; +} +#endif /* STAGE1_5 */ + + +#ifndef STAGE1_5 +int hide_part(int part) +{ + if (saved_drive) + { + if (part > 3) + { + errnum = ERR_NO_PART; + return 0; + } + if (!rawread (saved_drive, 0, 0, SECTOR_SIZE, (char *) SCRATCHADDR)) + return 0; + if ((PC_SLICE_TYPE (SCRATCHADDR, part) & HIDDEN) != HIDDEN) + { + PC_SLICE_TYPE (SCRATCHADDR, part) |= HIDDEN; + buf_track=-1; + if (biosdisk(BIOSDISK_WRITE, saved_drive, &buf_geom, + 0, 1, SCRATCHSEG)) + { + errnum = ERR_WRITE; + return 0; + } + } + } + return 1; +} +#endif /* STAGE1_5 */ #ifndef STAGE1_5 int @@ -289,7 +346,7 @@ { int i; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) PC_SLICE_FLAG (SCRATCHADDR, i) = 0; PC_SLICE_FLAG (SCRATCHADDR, part) = PC_SLICE_FLAG_BOOTABLE; diff -u -r grub-0.5.92/stage2/shared.h grub/stage2/shared.h --- grub-0.5.92/stage2/shared.h Tue Jul 13 11:46:28 1999 +++ grub/stage2/shared.h Mon Aug 16 01:52:15 1999 @@ -33,6 +33,8 @@ # define RAW_SEG(x) x #endif +#define HIDDEN 0x10 + /* * Integer sizes */ @@ -540,6 +542,12 @@ /* Sets device to the one represented by the SAVED_* parameters. */ int make_saved_active (void); + +/* Hide partition */ +int hide_part(int partition); + +/* Unhide partition. */ +int unhide_part(int partition); /* Open a file or directory on the active device, using GRUB's internal filesystem support. */