Subject: Re: booting the second disk via a floppy
To: None <netbsd-users@netbsd.org>
From: Wolfgang Rupprecht <wolfgang+gnus20011024T204321@wsrcc.com>
List: netbsd-users
Date: 10/24/2001 21:36:26
smb@research.att.com (Steve Bellovin) writes:
> Because my BIOS doesn't seem to like the NetBSD disk (wd1 on an old
> 486), I need to boot via a floppy. If I use the install floppy and
> interrupt the boot process, I can say
>
> boot wd1a:netbsd
>
> and all is cool. But I'd rather the machine be able to boot unassisted.
I've had a problem where some bioses will boot an fdisk partition that
starts at block 63, but others refuse to start on anything but a track
boundary (eg. block 1008 on all the ide drives I have). This caused
me no end to head scratching when I tried to upgrade a motherboard and
a formerly good disk stopped booting with "no os" or some such rot.
One 486 bios (toshiba 4800) would only boot from a small disk. When
the old disk got replaced with a 6gig it refused to boot netbsd which
was located at the 3 gig point. My solution to that was to make a
boot floppy but hack the bootstrap code to hardwire "wd0a" as the boot
disk. The same "trampoline" floppy has been in use for a few years
and still hasn't worn out.
I *think* this is the hack I had before a disk crash wiped it out:
Index: main.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/stand/biosboot/main.c,v
retrieving revision 1.28
diff -u -r1.28 main.c
--- main.c 2001/07/05 00:58:45 1.28
+++ main.c 2001/10/25 04:32:35
@@ -250,7 +250,13 @@
print_banner();
/* try to set default device to what BIOS tells us */
+#ifdef TRAMPOLINE /* force default boot from wd0a */
+#error this is from memory so please check!!! -wsr
+ default_devname = "wd";
+ default_unit = 0;
+#else
bios2dev(boot_biosdev, &default_devname, &default_unit);
+#endif
default_partition = 0;
/* if the user types "boot" without filename */
---- cut ----
I then used what was effectively your first 3 lines to put only the
bootstrap onto the floppy.
disklabel -r -w /dev/fd0a floppy3
newfs /dev/fd0a
/usr/mdec/installboot -v -f /usr/mdec/biosboot.sym /dev/rfd0a
-wolfgang
--
Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
http://www.wsrcc.com/wolfgang/
Coming soon: GPS mapping tools for Open Systems. http://www.gnomad-mapping.com/