Subject: Re: How to use bootxx_msdos
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Luke Mewburn <lukem@NetBSD.org>
List: port-i386
Date: 12/29/2005 23:05:34
--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 27, 2005 at 11:55:30AM +0100, Julio M. Merino Vidal wrote:
  | Hi all,
  |=20
  | I'm trying to create a FAT boot floppy (in fact, an image).  This is
  | what I do:
  |=20
  | dd if=3D/dev/zero of=3Dtest.img bs=3D1k count=3D2880
  | mformat -i test.img -f 2880 ::
  | mcopy -i test.img /boot ::
  | mcopy -i test.img /tmp/netbsd.gz ::
  | installboot test.img /usr/mdec/bootxx_msdos
  |=20
  | But after running the installboot command, the image gets
  | corrupted.  I've also tried passing '-H 36' to mformat to "reserve"
  | some sectors at the beginning of the file system, but I get the
  | same results.
  |=20
  | Can't I use bootxx_msdos in this way?  If not, how is it supposed
  | to work?

installboot(8) contains instructions for creating
a bootable FAT hard disk image (e.g, on a CF card).
(I know that this differs from a bootable FAT floppy).

Summary:

    *	Reserve some sectors at the start of the FAT
	for the bootblock:
		newfs_msdos -r 16 /dev/rwd1a

    *	Install the msdos bootblock in "raw" mode:
		installboot -t raw /dev/rwd1a /usr/mdec/bootxx_msdos

Maybe a variation of that will work.


cheers,
Luke.

--5mCyUwZo2JvN/JJP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (NetBSD)

iD8DBQFDs9EOpBhtmn8zJHIRAr7rAJ4iKDV/3inEAKTfBGNTKiyKTdmrlQCfV+Bm
KvJ0vBmVfERl0lZFSa1u55E=
=d277
-----END PGP SIGNATURE-----

--5mCyUwZo2JvN/JJP--