Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Aug 2014 16:53:41 -0700
From:      Dieter BSD <dieterbsd@gmail.com>
To:        freebsd-drivers@freebsd.org
Subject:   Re: sil3124 sata controller panics kernel
Message-ID:  <CAA3ZYrAGUogbyFxMWDcjRDRO9EAR3oVCOZBynL0gx-fSALu_2A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
> After that, it's an adventure to get it on the controller.  I keep
> a DOS hard drive image for netbooting for that sort of thing.

There really needs to be Unix utility to do this.

The Silicon Image clowns assume that everyone has a wintel peecee.
Wrong.

Archive:  /tmp/wget/UpdFlash_v336.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   39936  Defl:N     7563  81% 10-25-2007 12:46 a561390f  ReadMe.doc
   79504  Defl:N    38218  52% 10-24-2007 17:44 62039151  UPDFLASH.EXE

A "doc" file?  Seriously?  Do these idiots own stock in microshit, or what?

The FreeDOS clowns assume that all computers have cd drives and floppy
drives.  Floppy drives?  Did I fall into a wormhole and end up back in 1982?

So I attempt to build a hard drive that will boot this freedos thingy.
Put a NetBSD bootselect MBR on the disk, with a nice menu item "freedos".
Run FreeBSD's newfs_msdos to create an obese filesystem.  Give it
-B and the metaboot.bot file so it installs the partition boot sector.
Well, the nbr refuses to execute the partition boot sector and
reports error 3, which the man page says means: The bootsector was loaded
successfully, but it was not valid (i.e., the magic number check failed,
or it contained no code).  Turns out that FreeBSD's newfs_msdos
changed some stuff in that sector, although the 55AA thing is still there,
so I don't know what the mbr's problem is.

1,6c1,6
< 00000000  52 0e 1f 0e 07 fc b9 00  01 be 00 7c bf 00 6c f3  |R..........|..l.|
< 00000010  a5 b8 16 6c ff e0 b8 e0  1f 8e d8 be 00 7c bf 00  |...l.........|..|
< 00000020  7c b9 00 01 f3 a5 0e 1f  81 3e fe 7d 55 aa 75 26  ||........>.}U.u&|
< 00000030  b8 4d 45 bf a2 6c 89 05  bd 00 7c e8 28 00 75 16  |.ME..l....|.(.u.|
< 00000040  89 f7 be c0 6c b9 0b 00  f3 a4 be ad 6c e8 34 00  |....l.......l.4.|
< 00000050  5a ea 00 7c 00 00 be e8  6c e8 28 00 31 c0 cd 16  |Z..|....l.(.1...|
---
> 00000000  52 0e 1f 0e 07 fc b9 00  01 be 00 00 02 40 20 00  |R............@ .|
> 00000010  02 00 00 00 00 f0 00 00  3f 00 10 00 00 00 00 00  |........?.......|
> 00000020  fc 08 3d 00 e9 01 00 00  00 00 00 00 02 00 00 00  |..=.............|
> 00000030  01 00 02 00 a2 6c 89 05  bd 00 7c e8 28 00 75 16  |.....l....|.(.u.|
> 00000040  89 f7 29 17 14 74 63 4e  4f 5f 4e 41 4d 45 20 20  |..)..tcNO_NAME  |
> 00000050  20 20 46 41 54 33 32 20  20 20 28 00 31 c0 cd 16  |  FAT32   (.1...|

Okay...  so then I copy a fresh metaboot.bot into sector 0 (the mbr sector).
This time it runs, but complains:

"No FreeDOS boot sector in RAM at 0x1fe00x7c00 giving up press a key to reboot"

Searching a bit with google gives me the idea that whoever wrote this
freedos boot stuff did some rather wacky things.  No useful info of
course.

What, exactly, is supposed to go in sector 0?  A normal MBR that works
great with multiple OSes is not the answer.  What, exactly, goes into
the 1st sector of the partition?  metaboot.bot?  With or without the
changes from newfs_msdos?

Anything else I need to do?  Sacrifice a goat?

If and when I ever get this freedos thingy running, I should probably
update the 3132 firmware as well.



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