lenny@icus.islp.ny.us (Lenny Tropiano) (05/03/89)
In article <629@cbnewsc.ATT.COM> psfales@cbnewsc.ATT.COM (Peter Fales) writes: |>In article <695@icus.islp.ny.us>, lenny@icus.islp.ny.us (Lenny Tropiano) writes: |>> I was able to put a floppy boot unix, floppy filesystem (all the necessary |>> patching utilities [fsck, fsdb, etc..]) and the diagnostic program all |>> on a 3.5" disk with a verbose loader. Ahh, no more switching disks to |>> boot a Floppy Unix! |>> ... |>Would you be willing to provide some more details on how to create a |>bootable floppy file system - either on two disks or on one. A couple of |>us here (hi Craig) have also put 720K drives on our systems, though I used |>a 5.25" rather than a 3.5. |> The procedure is quite simple, basically what I did was to format a 3.5" 720K disk (in your case 5.25") with the verbose loader: $ mdfmt10.vl (Here's what this looks like) mdfmt10.vl: iv -i /dev/rfp020 /usr/lib/iv/MD10vl mkfs /dev/fp021 dismount -f > /dev/null 2>&1 /usr/lib/iv/MD10vl: #sccs "@(#)iv/lib:MD10vl 1.1" # iv description file for 135 TPI Floppy file system disk. type FD name Floppy cylinders 80 heads 2 sectors 10 steprate 0 singledensity $ loader /usr/lib/iv/s4load.verbose $ $ 0 7 $ $ Basically it's the same information as the "fdfmt10.vl" but with the description file having 80 cylinders (ie. 720K instead of 360K). Now I have a bootable floppy with the verbose loader. The verbose loader allows you to enter the program to boot off (this will allow me to boot either /unix or /s4diag off the floppy) Now here's a basic list of the files you need to put on your floppy disk. All of this should fit in less than 800K (that's how much you get when formatting with 10 sec/trk) /UNIX3.51 linked to /unix <- copy this off the "Floppy Boot disk" do not use the one on the hard disk These can be taken from the hard disk: /bin /bin/cat /bin/chgrp /bin/chmod /bin/chown /bin/cp linked to /bin/ln /bin/cpio /bin/date /bin/df /bin/echo /bin/file /bin/find /bin/grep /bin/ls /bin/mkdir /bin/mv /bin/pwd /bin/rm /bin/sh /bin/stty /bin/sync /bin/tail /bin/wc Make the following nodes (mknod)... It's easiest to use cpio to create those files.... /dev /dev/console /dev/fp000 /dev/fp001 /dev/fp002 /dev/fp003 /dev/fp004 /dev/fp005 /dev/fp006 /dev/fp007 /dev/fp008 /dev/fp009 /dev/fp00a /dev/fp00b /dev/fp00c /dev/fp00d /dev/fp00e /dev/fp00f /dev/fp010 /dev/fp011 /dev/fp012 /dev/fp013 /dev/fp014 /dev/fp015 /dev/fp016 /dev/fp017 /dev/fp018 /dev/fp019 /dev/fp01a /dev/fp01b /dev/fp01c /dev/fp01d /dev/fp01e /dev/fp01f /dev/fp020 /dev/fp021 /dev/kmem /dev/mem /dev/null /dev/rfp000 /dev/rfp001 /dev/rfp002 /dev/rfp003 /dev/rfp004 /dev/rfp005 /dev/rfp006 /dev/rfp007 /dev/rfp008 /dev/rfp009 /dev/rfp00a /dev/rfp00b /dev/rfp00c /dev/rfp00d /dev/rfp00e /dev/rfp00f /dev/rfp010 /dev/rfp011 /dev/rfp012 /dev/rfp013 /dev/rfp014 /dev/rfp015 /dev/rfp016 /dev/rfp017 /dev/rfp018 /dev/rfp019 /dev/rfp01a /dev/rfp01b /dev/rfp01c /dev/rfp01d /dev/rfp01e /dev/rfp01f /dev/rfp020 /dev/rfp021 /dev/swap /dev/syscon linked to /dev/systty /dev/tty /etc /etc/chroot /etc/devnm /etc/fsck <- a must for any repairing /etc/fsdb <- only if your a fs-guru /etc/group /etc/ldrcpy /etc/magic /etc/mkfs /etc/mknod /etc/mnttab /etc/mount /etc/ncheck /etc/passwd /etc/reboot /etc/umount /etc/utmp /lib /lib/shlib <- take this from the "Floppy Filesystem Disk" /mnt /s4diag <- copy off your favorite diagnostic disk ... /tmp --- Now create a file in the /etc directory of your floppy called: /etc/profile: > /etc/mnttab PATH=:/mnt/bin:/bin:/etc; export PATH HISTFILE=/.kshistory;export HISTFILE HISTSIZE=128;export HISTSIZE stty erase '^h' kill '^u' intr '^c' echoe echo "Floppy UNIX Started" --- Now to test it all ... Shutdown your machine, reboot with the floppy inserted. When it boots and asks you to load from which device, select "2" for Floppy. Then it will ask you to enter the name of the program to load, you'll enter /unix (to boot unix) and /s4diag (for diagnostics). If all goes well (if you are booting /unix) you'll get the familiar prompt to insert the "Floppy Filesystem disk" and press any key. But in this case you already have it in there :-) So just press a key ... It should continue loading ... Finally it will say "Floppy UNIX Started" and give you a "#" prompt. You're up! Now you can do things like ... # fsck /dev/rfp002 # mount /dev/fp002 /mnt # ls /mnt/bin <- look at the /bin directory on the HD. # umount /dev/fp002 # sync; sync; sync; reboot This should help? :-) -Lenny -- Lenny Tropiano ICUS Software Systems [w] +1 (516) 582-5525 lenny@icus.islp.ny.us Telex; 154232428 ICUS [h] +1 (516) 968-8576 {talcott,decuac,boulder,hombre,pacbell,sbcs}!icus!lenny attmail!icus!lenny ICUS Software Systems -- PO Box 1; Islip Terrace, NY 11752
jon@jonlab.UUCP (Jon H. LaBadie) (05/05/89)
In article <698@icus.islp.ny.us>, lenny@icus.islp.ny.us (Lenny Tropiano) writes: A discussion of how to create a bootable diskette followed by this list of files to place on the diskette > > These can be taken from the hard disk: ... > /bin/cp linked to /bin/ln ... > /bin/mv rest of article deleted I would just like to point out that on most unix systems, mv is also simply a link to cp and ln. It could have been implemented this way on the UNIX-PC also, but the implementers chose to give us two identical programs in /bin. One is the linked cp and ln, the other is mv. They are byte for byte identical. The only difference is the permissions. Mv is set uid'ed. If space becomes a premium on the floppy, a few blocks could be saved by linking mv to cp and ln, then changing permissions on them to match /bin/mv on the HD (4755, root owner). -- Jon LaBadie {att, princeton, bcr}!jonlab!jon {att, attmail, bcr}!auxnj!jon
dold@mitisft.Convergent.COM (Clarence Dold) (05/06/89)
in article <777@jonlab.UUCP>, jon@jonlab.UUCP (Jon H. LaBadie) says: > I would just like to point out that on most unix systems, mv is also > simply a link to cp and ln. It could have been implemented this way > on the UNIX-PC also, but the implementers chose to give us two > identical programs in /bin. One is the linked cp and ln, the other > is mv. They are byte for byte identical. The only difference > is the permissions. Mv is set uid'ed. > > If space becomes a premium on the floppy, a few blocks could be saved > by linking mv to cp and ln, then changing permissions on them to > match /bin/mv on the HD (4755, root owner). I don't think I would want /bin/mv as setuid root on my system. Kind of eliminates permissions on a directory. -- --- Clarence A Dold - dold@tsmiti.Convergent.COM (408) 434-5293 ...pyramid!ctnews!tsmiti!dold P.O.Box 6685, San Jose, CA 95150-6685 MS#10-007
alex@wolf.umbc.edu (Alex Crain) (05/06/89)
In article <678@mitisft.Convergent.COM> dold@mitisft.Convergent.COM (Clarence Dold) writes: >I don't think I would want /bin/mv as setuid root on my system. >Kind of eliminates permissions on a directory. Actually, life gets a tad frustrating if /bin/mv is *not* suid, because only root can modify a directory entry, regardless of the owner. This is in order to prevent lowly users from doing things like ln /u/nerd /u/nerd/dufus which would be something akin to *very bad*. Fortunately, /bin/mv (and ln & cp) is aware of its awsome responsibility as a suid program, and takes all the appropriate precations to make sure that lowly users don't evade the permissions system. A friend of mine once swiped a set of zenix binaries for use on his PC/AT. The command he used was akin to "tar c /", and he neglected to get a list of suid programs. It took him two weeks to figure out why he couldn't do anything unless he was root :-) :alex Alex Crain Systems Programmer alex@umbc3.umbc.edu Univ Md Baltimore County umbc3.umbc.edu!nerwin!alex
jim@aob.aob.mn.org (Jim Anderson) (05/07/89)
In article <777@jonlab.UUCP> jon@jonlab.UUCP (Jon H. LaBadie) writes: >In article <698@icus.islp.ny.us>, lenny@icus.islp.ny.us (Lenny Tropiano) writes: >If space becomes a premium on the floppy, a few blocks could be saved >by linking mv to cp and ln, then changing permissions on them to >match /bin/mv on the HD (4755, root owner). At first, I thought this was a bad idea, as cp, ln may not be expecting suid root permissions, but for this case, since the user on the floppy disk should be root anyway, this should not be a problem (also, the programs do not need to be suid at that point). -- Jim Anderson (612) 636-2869 Anderson O'Brien, Inc New mail:jim@aob.mn.org 2575 N. Fairview Ave. Old mail:{rutgers,gatech,amdahl}!bungia!aob!jim St. Paul, MN 55113 "Fireball... Let me see... How did that go?"
gst@gnosys.UUCP (Gary S. Trujillo) (05/08/89)
In article <678@mitisft.Convergent.COM> dold@mitisft.Convergent.COM (Clarence Dold) writes: > I don't think I would want /bin/mv as setuid root on my system. > Kind of eliminates permissions on a directory. Not really. Merely having a program setuid does not imply that it is not subject to the ordinary permissions-checking. Depends on how it's written. Judging from its behavior, "mv" is well-behaved to the extent of not over- riding permissions checking on directories, even though it has the capability. -- Gary S. Trujillo {linus,bbn,m2c}!spdcc!gnosys!gst Somerville, Massachusetts {icus,ima,stech,wjh12}!gnosys!gst