Subject: Re: Problem with installer and mkfs.
To: None <port-mac68k@NetBSD.ORG>
From: Stephen C. Brown <sbrown@shellx.best.com>
List: port-mac68k
Date: 01/07/1997 02:35:09
>Hi,
>
>I'm trying to re-install NetBSD on to a Quantum Fireball 1080. I'm using
>The latest version of mkfs (1.2?) off of ftp.netbsd.org and Installer 1.1a.
>I can set the partition type in mkfs and build the file system without any
>problems. When I try to run the installer it gives an error about not
>finding a Root partition. The partition on an old drive I partitioned
>a while back says A/UX Root, my new partition says NetBSD
>Root & Usr. Does the installer not recognize the new name?
The partition name makes no difference to the installer. The partition
type should be "Apple_UNIX_SVR2". The way it figures out whether a
partition is a "Root", "Usr", or "Swap" partition is through a structure
called a "blockzeroblock" structure that was placed in the part of the part-
ition entry referred to (in MacOS land) as the "pmPad" field(In the installer
code it is referred to as "pmBootArgs"). The specific field that it
looks at in the "blockzeroblock" structure is the "bzbFlags" field.
I haven't looked at the MacOS "mkfs" code to see how it manipulates this
structure and probably won't have a chance to look at it until this
weekend.
Perhaps someone else(Bob Nestor??) will get a change to look at it before
then. I will append details to the end of this email.
For the moment, I am placing a test version of the installer on my ISP
account at the following location:
<ftp://ftp.best.com/pub.s/sbrown/NetBSD/installer/installer.test.hqx>
This is a hacked up version of the installer that just prints out the
disklabel style details of your disks as it discerns them, then exits.
Let me know what kind of results you get.
>
>BTW, I tried the the Installer from the 1.2 dist. and it crashed and nuked
>my entire hard drive twice before I caught on to what the problem was.
Hmmm. I can only guess this could have been the large disk bug. But then,
your disk is only a gigabyte to begin with. Curious.....
>Also, the first time I installed NetBSD, the partitions were the first ones
>on the disk, before my HFS partition.
>
>Thanks,
>
>--
>Steve Carlson
>stevec@accessone.com
I can't for sure say what your problem is right now. But, try the test
binary that I uploaded and let me know what the results are.
Steve Brown,
sbrown@best.com
p.s. The source code for the installer is typically available in the
same ftp sites where the installer itself is available.
p.p.s The basic logic is "if (bzbFlags & BZB_ROOTFS) partition == root"
Details of blockzeroblock structure, etc.(taken from the dpme.h file):
struct partmapentry{
unsigned short pmSig;
unsigned short pmSigPad;
unsigned long pmMapBlkCnt;
unsigned long pmPyPartStart;
unsigned long pmPartBlkCnt;
unsigned char pmPartName[32];
unsigned char pmPartType[32];
unsigned long pmLgDataStart;
unsigned long pmDataCnt;
unsigned long pmPartStatus;
unsigned long pmLgBootStart;
unsigned long pmBootSize;
unsigned long pmBootLoad;
unsigned long pmBootLoad2;
unsigned long pmBootEntry;
unsigned long pmBootEntry2;
unsigned long pmBootCksum;
char pmProcessor[16];
unsigned char pmBootArgs[128];
unsigned char blockpadding[248];
};
struct blockzeroblock{
unsigned long bzbMagic;
unsigned char bzbCluster;
unsigned char bzbType;
unsigned short bzbBadBlockInode;
unsigned short bzbFlags;
unsigned short bzbReserved;
unsigned long bzbCreationTime;
unsigned long bzbMountTime;
unsigned long bzbUMountTime;
struct altblkmap bzbABM;
};
#define BZB_MAGIC 0xABADBABE
#define BZB_TYPEFS 1
#define BZB_TYPESWAP 3
#define BZB_ROOTFS 0x8000
#define BZB_USRFS 0x4000
/* MF */
#define PART_UNIX_TYPE "APPLE_UNIX_SVR2"
#define PART_MAC_TYPE "APPLE_HFS"
#define PART_SCRATCH "APPLE_SCRATCH"
#define PART_DRIVER_TYPE "APPLE_DRIVER"
#define PART_PARTMAP_TYPE "APPLE_PARTITION_MAP"