Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!ukc!dcl-cs!aber-cs!rupert!pcg From: pcg@rupert.cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.sys.att Subject: Re: Format of 386 Unix boot diskette Message-ID: Date: 3 Feb 90 19:58:28 GMT References: <323@ohsuhcx.ohsu.edu> <7311@pdn.paradyne.com> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 176 In-reply-to: wolfe@cygnus.nm.paradyne.com's message of 31 Jan 90 20:38:20 GMT In article <7311@pdn.paradyne.com> wolfe@cygnus.nm.paradyne.com (Mike Wolfe) writes: How did you make the disk bootable. There is no entry in /etc/partitions for the floppy device and the only way I could see to make a disk bootable was with mkpart. I tried an image copy and what I ended up with was a diskette that was not bootable. Sys V will only read 79 tracks from the floppy drives I assume this is the problem. So I went to my SUN 3/80 and did the image copy and everything was fine. However I still don't know how to make a boot floppy from scratch. The usual answer is RTFM. A bootable floppy, be it any density, size, whatever, has the first track that contains the bootstrap (finding the file in /etc that contains the floppy bootstrap is left as an exercise to the reader), and the remaining tracks contain a filesystem, into which you can put what you want, but usually a miniscule root. The device files /dev/*dsk/f*t (i.e. those ending in 't') will give access to the entire floppy, first track inclusive, the other will only let you access from the second track onwards. If you want to duplicate a bootable floppy, just use the device file that ends in 't' (/dev/rdsk/f0t will work almost always). If you want to create a bootable floppy, just copy the boostrap file onto the device file that maps the entire floppy, and then mkfs and fill the rest. For example: cp /etc/flboot /dev/dsk/f0t mkfs /dev/rdsk/f0 : labelit/dev/rdsk/f0 install flop mount /dev/dsk/f0 /install find -depth -print | cpio -pdlmuav /install OK? OK? Enough. :-> A proposal: There should be a monthly posting with frequently asked questions. The ones that seem to surface every now and then are: What is the format of a package floppy? Read the f* manual. Installable drivers are complicated, think it over carefully. How do I create a bootable floppy for floppy type X? First track is boostrap, rest is filesystem. How do I get the cartridge tape to stream? Use pax or GNU tar and 'ddd' or 'team', (best is GNU tar with team, or may be pax 2 with team) or, if you don't have any, 'cpio' with the undocumented block factor options (-C xxxx). How do I get the -z option of ld to work? Don't even use -z; just a little ld script will do. Make your memory begin at 0x1000 (or at any other multiple of 0x1000, -z would have it begin at 0x20000), and make the text begin in the executable file at 0x1000 (not higher, otherwise you waste executable file space). Remember to define a few segments of memory, 4 meg long, at high addresses, for the shared libraries. Alternatively use -z and a shell script that makes your exeutable text relocate at 0x20000, and begin at 0x1000 boundary in the file. If you use gcc or g++, it is easy to modify the link phase spec to use the ld script if option -z is specified, or even better, by default. Where is alloca()? In -lPW. How do I get GNU to compile? Disable automatic optimizer inlining with -W2,-y0 after -O on all files that use alloca(). If you are using GCC, remember to run fixincludes or make it use the System V cpp, or manually copy and edit the files that do non-ANSI cpp things. How do I get GNU C++ to work? Check that NO_UNDERSCORES, USE_COLLECT, and COFF are defined, and that NO_DOLLAR_IN_LABEL is as well. cplus-parse.y has a name too long for RCS, like a few others. If you want to apply patches under RCS to such files, you should rename them. Me thinks that a prefix of 'c++-' instead of 'cplus-' is fine. You can compile G++ with the AT&T cc (but for two obvious fixes). It is much less hassle than installing GCC first. On the other hand, install GDB 3.4; it's easy, and is vastly less buggy than sdb, and understands G++ name mangling. If you use the CLED history line discipline, or similar tricks, you may want to excise the history and command line editing code from GDB. Clean patches to do this will be posted (soon :->). You may want to rework a little the rule for the 'collect' stage in gcc.c. Alternatively, lobby MDT to make the .ctor/.dtor section trick the default under System V, instead of collect. Don't use encapsulated a.out format unless you know what you are doing. Be sure you have the setvbuf patch for i386 in the cplus-lex.c file. You probably want the link phase spec to use -z, the shell script alluded above, and -lc_s by default. Making LIBG++ into a shared library is not easy, and not worth doing for most of it. Wait for SysV.4... For most programs you may wantto use the little streams library posted a while ago. Or wait for it to be reposted (soon). How do I get GNU Emacs to work? Easy enough... You can really figure that out yourself, and under ESIX you can even have (modulo a few fixes) process buffers with BSD ptys; or else use stream ptys (look at sysdep.c and imitate the IRIS pty handling). My high speed telecomm utility loses under VP/IX or DOSmerge! Inevitable. They are running on a semi-simulated device under a multitasking OS. Serial lines chew up CPU time and lose. If you only need a few, just get a dumb card and use 16550As with a driver that enables the FIFO (e.g. fas2). Won't install on a drive whose geometry is not in the BIOS! Write manually an /etc/partitions file instead of letting the disksetup program write it (interrupt the INSTALL script and continue manually). Then set the BIOS drive type to an entry that has the right number of heads, to make sure the hard disc will boot. How do I get fast IO? Get ESDI or RLL discs, at least two of them, possibly with two controllers, or get a fast SCSI controller, like the 1542, with at least two fast (e.g. Micropolis, Imprimis, Quantum, or Maxtor discs). Access times under 25 msec. If you are not running a fast file system of some sort, unfragment the partitions regularly (dump/restore), e.g. every few weeks (2-4) for an active filesystem. Put the swap on a disc/controller different from the root and user filesystems, and the /tmp and spool filesystems on one different from those where you keep user home dirs. Don't create many small filesystems. -- Piercarlo "Peter" Grandi | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcvax!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk