Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 1999 16:33:00 -0800
From:      Mike Smith <mike@smith.net.au>
To:        rkw@dataplex.net
Cc:        hackers@freebsd.org
Subject:   Re: Booting from non-standard floppy 
Message-ID:  <199903260033.QAA01323@dingo.cdrom.com>
In-Reply-To: Your message of "Thu, 25 Mar 1999 14:40:13 CST." <Pine.BSF.4.05.9903251428270.949-100000@nomad.dataplex.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I needed to cram "a few more bytes" on a floppy.
> After doing the fdformat and writing everything, I tried to boot it.
> Unfortunately, it fails with "Not ufs".
> 
> Looking through the bootstraps, it appears that the new loader is using
> the bios to actually read the floppy. As long as I stay on track 0,
> everything is fine. However, even after we have loaded "boot2", we still
> use the bios's idea of the format rather than the disklabel which has
> the actual values. Unfortunately, the fs description extends beyond the
> first track.
>
> It's been a long time since I wrote bootstrap loaders. But, as I
> recall, the "bios" read the 0th sector (boot1) and jumped to it.
> That short piece of code got the disk format from the label and
> read in the next piece of the loader. After that, address->c.t.s
> was under the software control.
> 
> Is there some reason we no longer do this?

Several;

 - Disklabels on floppies can't be trusted.
 - All disks are treated as equal, and geometries in disklabels on many
   disks can't be trusted.  Often you can't get to the disklabel until
   after you've made assumptions about geometry anyway.

You can save space a couple of ways; if you haven't already, gzip 
everything except the loader.

If you don't need the loader for anything other than loading a kernel, 
throw the loader away; the bootblocks themselves know how to load ELF 
kernels.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903260033.QAA01323>