Subject: port-i386/6087: Installboot(8) fail to install boot block.
To: None <gnats-bugs@gnats.netbsd.org>
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
List: netbsd-bugs
Date: 09/02/1998 11:18:35
>Number:         6087
>Category:       port-i386
>Synopsis:       Installboot(8) fail to install boot block.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep  1 19:20:01 1998
>Last-Modified:
>Originator:     Takahiro Kambe
>Organization:
>Release:        NetBSD 1.3H,1998/9/1
>Environment:
	
System: NetBSD land.sky.yamashina.kyoto.jp 1.3H NetBSD 1.3H (LAND) #0: Wed Sep  2 01:19:44 JST 1998     taca@land.sky.yamashina.kyoto.jp:/a/leaf/netbsd/sys/arch/i386/compile/LAND i386


>Description:
	Installboot(8) fail to install boot block, it trys to write at
	BSD partition's offset zero.
>How-To-Repeat:
	Write boot block to root partition with installboot(8) under
	BSD partition is in FDISK partition after DOS's partition.
>Fix:
	This is a simple bugs.

*** sys/arch/i386/stand/installboot/installboot.c~	Mon Aug 31 23:52:25 1998
--- sys/arch/i386/stand/installboot/installboot.c	Wed Sep  2 09:03:22 1998
***************
*** 406,412 ****
  			warnx("invalid partition");
  			goto out;
  		}
! 		bsdoffs = dl.d_partitions[c - 'a'].p_offset;
  	}
  	if (verbose)
  		(void) fprintf(stderr, "BSD partition starts at sector %d\n",
--- 406,412 ----
  			warnx("invalid partition");
  			goto out;
  		}
! 		bsdoffs = dl.d_partitions[p - 'a'].p_offset;
  	}
  	if (verbose)
  		(void) fprintf(stderr, "BSD partition starts at sector %d\n",
>Audit-Trail:
>Unformatted: