Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!uunet!cs.utexas.edu!swrinde!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!uw-beaver!cornell!cs.cornell.edu!cchase From: cchase@cs.cornell.edu (Craig Chase) Newsgroups: comp.unix.bsd Subject: 386BSD asboot problems (bug?) Keywords: DOS, BIOS, SCSI, disklabel Message-ID: <1992Sep3.135756.20840@cs.cornell.edu> Date: 3 Sep 92 13:57:56 GMT Sender: news@cs.cornell.edu (USENET news user) Followup-To: comp.unix.bsd Organization: Electrical Engineering, Cornell University, Ithaca NY Lines: 50 Nntp-Posting-Host: bullwinkle.cs.cornell.edu I encountered some trouble configuring my SCSI hard disk with the partitions I want. The disk geometry being simulated is 2048 sectors/cyl (1Meg per cyl) which is swell. Anyway, I labeled the disk: DOS blocks 0-40959 (cyls 0 - 19) root (as0a) 40960 - 421887 (cyls 20-205) swap (as0b) 380928 - 483327 (cyls 206-236) Anyway, this is all swell, 30 meg of swap, 20 meg of DOS 180 meg for files.... Problem is, the machine wouldn't boot multiuser anymore. After sticking printf statements in init and ruling out problems there, I started looking at boot.c A few more printf's (and a lot of disklabel .... ; shutdown -r now) later it appears that asboot is becoming confused about what the offset should be for the root partitions. Quoting from boot.c if (lp->d_type == DTYPE_SCSI) off = htonl(scsisn); However, htonl(scsisn) is 0, and the correct offset should be 40960. (Hmmm, it just occurs to me that I don't remember if I printed scsisn before the "host-to-network" byte swapping, (that must have been when dinner was ready....) I should have done that. Perhaps there's just a byte-swapping problem?) scsisn is an offset (established in srt0.c) which boot.c reads, but doesn't write. I don't know who writes this value, it would seem reasonable that it is part of the disklabel, but I'm already at the limits of my understanding. So, my questions are: 1) has anyone else had trouble succesfully labeling a SCSI disk with DOS as the first partitions (and 386BSD after)? 2) What is scsisn, and where might I find the header files that describe the DOS/BIOS partition tables? 3) Have I encountered a bug in disklabel, asboot, bootas, or none of the above? Craig -- ------------------------------------------------------------------------ | Craig Chase | This space for rent | | cchase@ee.cornell.edu | 555-8968 | ------------------------------------------------------------------------