Subject: boot loader blues
To: None <current-users@NetBSD.ORG>
From: Waldi Ravens <waldi@moacs.indiv.nl.net>
List: port-atari
Date: 11/17/1995 11:52:20
Hi,

I'm trying to write a boot loader, currently testing it from
floppy disk. After a long strugle with the ROM-BIOS I finaly
got the primary boot loader going. Now I have some problems
with the secondary loader:

- The primary loader loads secondary loader and disk label,
  then jumps to the secondary loader.
- The secondary loader checks the disk label => OK. It
  reports offset 0 and size 1440 for partition a, fine.
- I enter the name of the kernel (/netbsd), the loader calls
  open(), which invokes ufs_open(). So far, so good.
- ufs_open() tries to read the superblock first and reads
  sectors 16..31 (the floppy is formated with 512 byte
  sectors). It decides that the superblock is valid, good.
- Next, ufs_open wants the root inode and reads sectors
  64..79, the fifth block in the filesystem. I'm not at
  all familiar with ffs, so the question is: is this OK?
  Is the root inode normally located on the 5th block?
-  Next, ufs_open checks the mode of the root inode, and
   finds that the IFDIR bit is not set. In fact di_mode
   is zero!?
   If the answer to my previous question is yes, then I
   haven't got a clue what's going on here. The ffs on
   the floppy is ok when mounted under NetBSD. Any
   suggestions you may have are welcome.


Waldi