From hommes@derioc1.organik.uni-erlangen.de Sun Apr 13 12:13:14 1997 Received: from faui45.informatik.uni-erlangen.de ([131.188.2.45]) by is.rice.edu (8.8.5/8.8.5) with ESMTP id MAA25896 for ; Sun, 13 Apr 1997 12:13:13 -0500 (CDT) Received: from derioc1.organik.uni-erlangen.de (derioc1.organik.uni-erlangen.de [131.188.128.1]) by uni-erlangen.de with SMTP id TAA10459 (8.7.6/7.5c-FAU); for ; Sun, 13 Apr 1997 19:13:09 +0200 (MET DST) Received: from [192.44.82.44] (bco121.dialin.rrze.uni-erlangen.de [192.44.82.44]) by organik.uni-erlangen.de with ESMTP id TAA26726 (8.6.12/7.4f-FAU); for ; Sun, 13 Apr 1997 19:12:56 +0200 Message-Id: In-Reply-To: <199704122139.QAA08989@is.rice.edu> References: from "Nico van Eikema Hommes" at Apr 12, 97 03:42:49 pm Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Date: Sun, 13 Apr 1997 19:12:48 +0200 To: Colin Wood From: Nico van Eikema Hommes Subject: Re: HOW-TO set up a ZIP using HDSC Setup Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by is.rice.edu id MAA25896 Status: OR Hi Colin, Here is the updated version of the HOW-TO for setting up a ZIP. I have checked the procedures with Installer-1.1d: /etc/fstab was indeed set up correctly, so I have removed the HexEdit part. Further, I added the need to be "root" for mounting the ZIP disk, with appropriate warnings. >The one problem I see with this part is that you use the /dev/sd2c >partition. This partition accesses the entire disk, including the driver >partition, so it might not be a good idea to perform the above commands on >it. Rather, you probably want to do a "disklabel" on the drive and see >what partition is allocated to NetBSD in it. (Well, I guess the newfs and >fsck are probably ok, it's the mount that might worry me a bit). >What does a disklabel on a disk prepared this way show? It is not there, and that worried me more than just a bit. Setting it up turned out to be difficult, so I decided to proceed differently. Mkfs_1.4 sets up the disklabel correctly, and by leaving an unused 1 k partition at the "bottom" of the drive, it recognizes the partition set up in HDSC Setup and formats it correctly. With partition type "Scratch", that gives a "g" partition and leaves the partition map and driver partition untouched. To save space (mkfs keeps 10 % free), I added a "tunefs". It would have become too easy otherwise :-> Might it be a good idea to add the URLs for the tools? Installer-1.1d and BSD/mac68k Booter are on ftp.mac68k.org, but mkfs_1.4 is on ftp.netbsd.org (not on ftp.mac68k.org), Best wishes, Nico =========================================================================== How to set up a ZIP disk for use with NetBSD/mac68k by Nico van Eikema Hommes, hommes@ccc.uni-erlangen.de April 12, 1997 Setting up a ZIP disk for use under NetBSD/mac68k is easy, once you have collected all the tools and found out how to do it. This "HOW-TO" describes what you need and what you must do. All steps have been tested while I was writing, to assure highest possible accuracy. Everything worked for me, and I hope that it will do for others as well. You can use a ZIP disk in two ways with NetBSD/mac68k: 1. use it as an additional filesystem; 2. use it to install NetBSD on. For both, you will need Apple's HD-SC Setup 7.3.5, patched to recognize every disk drive. You can download a patched version, or do it yourself using ResEdit. See the FAQ. For installing NetBSD/mac68k on the ZIP, you will further need the following MacBSD tools: mkfs_1.4, Installer 1.1d, and BSD/Mac68k Booter 1.9.6. Note: these version numbers were the ones available when this document was prepared. They may change as time passes. Of course, you can use another partitioning tool if you have one (e.g. the one that came with your non-Apple hard disk). However, HD SC Setup is free, and does the job well. The first step is to reinitialize the ZIP disk with HD SC Setup. Reboot your Mac with extensions off (keep the shift key pressed). Insert the ZIP into the drive. It will not mount. Start HD SC Setup, click on the button "Drive" until you found the ZIP (SCSI ID 5 or 6, depending on the drive setting), and click on "Initialize". Confirm that you want to initialize the disk and have a coffee/tea break while the formatting is running. After some time, you have to enter the name of the disk. Just click OK. Then quit HD SC Setup. Back in the Finder, drag the newly formatted drive to the trash. Confirm that you want to unmount the volume. Note that the disk is not ejected, since the driver treats it as a normal hard disk, not a removable. Start HD SC Setup again, select the ZIP drive,and click on "Partition". In the partition window, click on "Custom". You get an overview of the disk layout. The first part is called "Mac Driver" and should be left as it is. Most of the rest is the HFS filesystem generated during the initialization. Select it, click "Remove", confirm that you want to delete it. You now have 98256 k at your disposal. 1. Set up the ZIP as an additional filesystem. Drag from the top over the gray area to create a new partition. The partition type is not important, "Scratch" will do. Set the size to 98255 k (1 k less than the maximum given underneath, otherwise mkfs_1.4 will not recognize the partition), click "Done", and quit HD SC Setup. Start mkfs_1.4 and select your "IOMEGA ZIP 100" as the drive you want to work on (the "root SCSI ID"). The window with the list of partitions will show one partition: Scratch->Scratch Select this partition and click "Change". Select "NetBSD Usr" as the partition type and click "Do It!". Now the list will show: UNIX_SVR2->NetBSD Usr Select the partition again and click "Format". A dialog window appears, in which you can add various parameters. You have to enter two values: Sectors/Track should be set to 32 (instead of the suggested value of 40) Tracks/Cylinder should be 64 Click OK and confirm that you want to "Format". In the console window, you will see the following, or something very similar: optimization space nsectors 32, ntracks 96, cylspares 0 Warning: calculated sectors per cylinder (3072) disagrees with disk label (0) Disk parameters and geometry is reasonable enough to proceed formatting..... Warning: 98 sector(s) in last cylinder unallocated disk: 196510 sectors in 64 cylinders of 96 tracks, 32 sectors 100.6MB in 4 cyl groups (16 c/g, 25.17MB/g, 5760 i/g) super-block backups (for fsck -b #) at: 32, 49216, 98400, 147584, formatting complete Click "I read it" in the small alert window, click on "Done" in the main window, quit mkfs, and boot into NetBSD. When the system is running, log in as "root" (you need to be superuser to create the filesystems) and check at the end of /var/log/messages. The ZIP drive will show up like this: sd2 at scsibus0 targ 5 lun 0: SCSI2 0/direct removable sd2: 96MB, 96 cyl, 64 head, 32 sec, 512 bytes/sec The drive number may be different, depending on the number of drives you have and their SCSI IDs. Replace "sd2" in the following part by the drive number on your system. Now type the command: disklabel sd2 This will give you an overview of the drive parameters and the available partitions on the disk. The partition list will be as follows: 7 partitions: # size offset fstype [fsize bsize cpg] a: 32 64 unknown # (Cyl. 0*- 0*) b: 2 196606 unknown # (Cyl. 95*- 95*) c: 196608 0 unused 0 0 # (Cyl. 0 - 95) g: 196510 96 4.2BSD 0 0 0 # (Cyl. 0*- 95*) The partition you just generated with mkfs is then one named "g", of type "4.2BSD", with a size of 196510 blocks and starting at block 96. The first 64 blocks contain the partition map, the Mac driver lives in partition "a", 32 blocks (16k) in size. Further, "c" means the whole disk, and "d", "e", and "f" were not created. The ZIP disk is now almost ready for use. You will need to check the file system, create a "mount point" (the directory that will be used to access the drive) and mount it. In addition, you may want to change the amount of space that is reserved from 10 % (default) to a lower value, e.g 2 %. Enter the following commands (remember, you are superuser, any error may destroy valuable data!): fsck -f -y /dev/rsd2g tunefs -m 2 -o space /dev/sd2g mkdir /zip mount /dev/sd2g /zip If you now type df, you will see that partition /dev/sd2g on your ZIP disk is mounted as "/zip", with a size of 95294 k. 93373 k of that are available for your files. 2. Install NetBSD/mac68k on the ZIP. Decide how much swap space you want to have. Add 2 Mb for the necessary mini MacOS partition (useful to put the installer and the booter on). Subtract this from the available space. For example, if you choose to have 16 Mb swap space, you get: available on disk 98256 k reserved for swap 16384 k reserved for MacOS 2048 k - 18432 k size of root partition 79824 k Drag from the top over the gray area, select "A/UX Root&Usr slice 0" as partition type, and enter the size. Click OK. Again drag from the top over the gray area for the swap space. Select "A/UX Swap slice 1", enter the size, and click OK. Now create the third partition, select "Macintosh Volume" as type. The size will be set to 2048 k. Click OK, enter the name for the partition, click OK, click Done, and quit HD SC Setup. Your ZIP disk is now correctly partitioned for NetBSD. The next step is to prepare the filesystems on the partitions. Start mkfs_1.4 and select your "IOMEGA ZIP 100" as the drive you want to work on (the "root SCSI ID"). The window with the list of partitions will show the following information: UNIX_SVR2->A/UX Root UNIX_SVR2->A/UX Swap Select the first partition, click "Change", "NetBSD Root & Usr" will already be selected, click "Do It!". Select the second partition (swap), click change, "NetBSD Swap" is selected, click "Do It!". Now the list is as follows: UNIX_SVR2->NetBSD Root & Usr UNIX_SVR2->NetBSD Swap Select the first partition again and click "Format". A dialog window appears, in which you can add various parameters. You have to enter two values: Sectors/Track should be set to 32 (instead of the suggested value of 40) Tracks/Cylinder should be 64 Click OK and confirm that you want to "Format". In the console window, you will now see something like: optimization space nsectors 32, ntracks 64, cylspares 0 Warning: calculated sectors per cylinder (2048) disagrees with disk label (0) Disk parameters and geometry is reasonable enough to proceed formatting..... Warning: 96 sector(s) in last cylinder unallocated disk: 159648 sectors in 78 cylinders of 64 tracks, 32 sectors 81.7MB in 5 cyl groups (16 c/g, 16.78MB/g, 3840 i/g) super-block backups (for fsck -b #) at: 32, 32832, 65632, 98432, 131232, formatting complete The numbers may be different, depending on the size of you swap partition. Click "I read it" in the small alert window, click on "Done" in the main window, and quit mkfs. Your ZIP disk is ready for the NetBSD installation. Start Installer 1.1d. Select your ZIP drive as the root SCSI ID. For the ZIP, the console window will show something like: sd2a: Root 'NetBSD Root & Usr' at 96 size 159648 sd2b: Swap 'NetBSD Swap' at 159744 size 32768 sd2d: Other (APPLE_DRIVER43) 'Macintosh' at 64 size 32 sd2e: HFS 'MacOS' at 192512 size 4096 You may get another drive number, e.g. sd1, depending on how many drives, with which SCSI IDs, are connected to your system. Select "Build Devices" from the File menu. This will generate all the necessary device files on your ZIP disk. It will also create the file /etc/fstab, already set up for your ZIP disk: /dev/sd2a / ufs rw 1 1 /dev/sd2b none swap sw 0 0 kern /kern kernfs rw 0 0 proc /proc procfs rw 0 0 Note that older versions of the installer do not correctly set the drive numbers. Version 1.1d does. You can now install NetBSD/mac68k. See the installation instructions on what is necessary, how much space it needs, etc. When everything is installed, quit the installer, start the MacBSD Booter, set the parameters in the "Booting..." dialog (the drive number, sd2 in the example, and the SCSI ID must be entered here), and boot the system. ============================================================================= -- Dr. N.J.R. van Eikema Hommes Computer-Chemie-Centrum hommes@ccc.uni-erlangen.de Universitaet Erlangen-Nuernberg Phone: +49-(0)9131-856532 Naegelsbachstr. 25 FAX: +49-(0)9131-856566 D-91052 Erlangen, Germany