Subject: Re: -current bootblock failure?
To: Wolfgang S. Rupprecht <wolfgang+gnus200610@dailyplanet.dontspam.wsrcc.com>
From: Greg Oster <oster@cs.usask.ca>
List: current-users
Date: 10/24/2006 09:39:53
This is a multipart MIME message.
--==_Exmh_1161704314_28260
Content-Type: text/plain; charset=us-ascii
"Wolfgang S. Rupprecht" writes:
>
> A -current/i386 from this afternoons sources fails early in booting.
> The BIOS does its probing and testing and then about the time it would
> pass control to the netbsd bootblocks I get the message (in all caps):
>
> HIT ANY KEY TO REBOOT
>
> I did install new bootblocks along with a new kernel and userland.
> (Booting from an ancient 1999 set of bootblocks on a floppy did get me
> up and running, so it really is only the on-disk boot code that is the
> problem.)
Here is an untested patch that will hopefully fix the (currently
busted) logic in the bootblocks...
Later...
Greg Oster
--==_Exmh_1161704314_28260
Content-Type: text/plain ; name="boot1.c.diff"; charset=us-ascii
Content-Description: boot1.c.diff
Index: boot1.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/stand/bootxx/boot1.c,v
retrieving revision 1.11
diff -c -r1.11 boot1.c
*** boot1.c 23 Oct 2006 21:36:47 -0000 1.11
--- boot1.c 24 Oct 2006 15:29:05 -0000
***************
*** 86,92 ****
*/
fd = ob();
if (fd != -1)
! goto out;
/*
* Maybe the filesystem is enclosed in a raid set.
* add in size of raidframe header and try again.
--- 86,92 ----
*/
fd = ob();
if (fd != -1)
! goto done;
/*
* Maybe the filesystem is enclosed in a raid set.
* add in size of raidframe header and try again.
***************
*** 96,102 ****
bios_sector += RF_PROTECTED_SECTORS;
fd = ob();
if (fd != -1)
! goto out;
/*
* Nothing at the start of the MBR partition, fallback on
* partition 'a' from the disklabel in this MBR partition.
--- 96,102 ----
bios_sector += RF_PROTECTED_SECTORS;
fd = ob();
if (fd != -1)
! goto done;
/*
* Nothing at the start of the MBR partition, fallback on
* partition 'a' from the disklabel in this MBR partition.
***************
*** 104,110 ****
if (ptn_disklabel.d_magic != DISKMAGIC ||
ptn_disklabel.d_magic2 != DISKMAGIC ||
ptn_disklabel.d_partitions[0].p_fstype == FS_UNUSED)
! goto out;
bios_sector = ptn_disklabel.d_partitions[0].p_offset;
*sector = bios_sector;
if (ptn_disklabel.d_partitions[0].p_fstype == FS_RAID)
--- 104,110 ----
if (ptn_disklabel.d_magic != DISKMAGIC ||
ptn_disklabel.d_magic2 != DISKMAGIC ||
ptn_disklabel.d_partitions[0].p_fstype == FS_UNUSED)
! goto done;
bios_sector = ptn_disklabel.d_partitions[0].p_offset;
*sector = bios_sector;
if (ptn_disklabel.d_partitions[0].p_fstype == FS_RAID)
***************
*** 114,119 ****
--- 114,120 ----
if (fd == -1)
goto out;
+ done:
if (fstat(fd, &sb) == -1) {
out:
return "Can't open /boot\r\n";
--==_Exmh_1161704314_28260--