[comp.unix.sysv386] root and boot floppy on ISC

woods@eci386.uucp (Greg A. Woods) (04/04/91)

In article <59@talgras.UUCP> david@talgras.UUCP (David Hoopes) writes:
>     Is it possable to create a bootable root floppy for Interactive Unix? If
> it is possable how do you do it?  I do this for my SCO Unix/Xenix systems and
> I would like to do it for my Interactive system but I havn't been able to
> figure out how.

Of course it's possible.  In fact you do it in much the same way as
you build a boot disk for any UNIX system:

	Format the floppy
	mkfs it
	mount it somewhere
	copy the files you wish to the new floppy
	copy /etc/boot to track 0 (for 386/ix 1.0.6 anyway)
	unmount it
	boot it

An easier way is to duplicate (using dd, or cp) the original boot
floppy and then modify the original filesystem to your satisfaction.
-- 
							Greg A. Woods
woods@{eci386,gate,robohack,ontmoh,tmsoft}.UUCP		ECI and UniForum Canada
+1-416-443-1734 [h]  +1-416-595-5425 [w]  VE3TCP	Toronto, Ontario CANADA
Political speech and writing are largely the defense of the indefensible-ORWELL

marc@jahangir.UUCP (Marc Rossner) (04/09/91)

In article <1991Apr3.203354.18641@eci386.uucp>, woods@eci386.uucp (Greg A. Woods) writes:
> In article <59@talgras.UUCP> david@talgras.UUCP (David Hoopes) writes:
> >     Is it possable to create a bootable root floppy for Interactive Unix? If
> > it is possable how do you do it?  I do this for my SCO Unix/Xenix systems and
> Of course it's possible.  In fact you do it in much the same way as
> you build a boot disk for any UNIX system:
> .
> .   (stuff deleted) 
> 	copy /etc/boot to track 0 (for 386/ix 1.0.6 anyway)
   ^^^^^^^^^^^^^^^^^^^^^^^^^

This is the part I can't figure out how to do.  Any hints?






Marc Rossner
jahangir!marc@uunet.uu.net

gary@sci34hub.sci.com (Gary Heston) (04/12/91)

In article <538@jahangir.UUCP> marc@jahangir.UUCP (Marc Rossner) writes:
=In article <1991Apr3.203354.18641@eci386.uucp>, woods@eci386.uucp (Greg A. Woods) writes:
=> In article <59@talgras.UUCP> david@talgras.UUCP (David Hoopes) writes:
=> >     Is it possable to create a bootable root floppy for Interactive Unix? 
=> 	copy /etc/boot to track 0 (for 386/ix 1.0.6 anyway)
=   ^^^^^^^^^^^^^^^^^^^^^^^^^
=This is the part I can't figure out how to do.  Any hints?

Oh, heck, people--just use dd to read the install floppy into a file,
and then back onto a formatted new disc. Mount it, and hack away.
This way, you copy the boot loader plus the existing file structure
(and most of the stuff in /dev, /bin, and /etc that you'll need anyway).

Works under 1.0.6 and 2.x. Also a good way to back up your install floppy--
if you have the space. 

-- 
Gary Heston   System Mismanager and technoflunky   uunet!sci34hub!gary or
My opinions, not theirs.    SCI Systems, Inc.       gary@sci34hub.sci.com
I support drug testing. I believe every public official should be given a
shot of sodium pentathol and ask "Which laws have you broken this week?".

marc@jahangir.UUCP (Marc Rossner) (04/12/91)

In article <1991Apr11.171616.14088@sci34hub.sci.com>, gary@sci34hub.sci.com (Gary Heston) writes:
> In article <538@jahangir.UUCP> marc@jahangir.UUCP (Marc Rossner) writes:
> =In article <1991Apr3.203354.18641@eci386.uucp>, woods@eci386.uucp (Greg A. Woods) writes:
> => In article <59@talgras.UUCP> david@talgras.UUCP (David Hoopes) writes:
> => 	copy /etc/boot to track 0 (for 386/ix 1.0.6 anyway)
> =   ^^^^^^^^^^^^^^^^^^^^^^^^^
> =This is the part I can't figure out how to do.  Any hints?


Thanks to Gary and all others who emailed me to direct me to dd.  After some
exploration I think I can summarize the special issues involved with this
for ISC 2.2.

The problem is that the ISC2.2 kernel expects that if you are booting from
a floppy then your root file system is on a SECOND floppy (i.e. the "install"
floppy) on the device that DOES include sector 0 -- (eg /dev/dsk/f0q15dt).

If your file system were on the same disk as the boot and /unix, then it
would have to be on the device that does NOT include sector 0
(eg /dev/dsk/f0q15d) -- but since the kernel is trying to mount off the
other device it will choke in this case (i.e. "srmount -- not a valid root").

So it seems the solution (especially space-wise) is to use the 2-floopy
boot / root fs method.  I.e.

1.  Copy ISC's boot diskette.

2.  Mount your new diskette from /dev/dsk/f0q15d

3.  Replace /unix with your souped-up /unix (eg. I especially needed mine
    to contain the tape driver and Specialix port drivers).

4.  Unmount your new boot diskette

5.  Copy ISC's install diskette.

6.  Mount your new diskette from /dev/dsk/f0q15dt

7.  Get rid of all the "UI" stuff (menus from install procedure) and
    other stuff that is obviously extraneous.

8.  Put lots of good stuff on like ls, vi, ksh, cpio 

9.  change the INSTALL file to just contain "exec ksh" or something.

10. unmount your new root fs floppy.

The only problem with this system is that you can't do "ps" because there
is no /unix in your filesystem.  Any suggestions of a way to get around this
or a way to modify the kernel so it could boot and mount the same floppy if
you had enough room anyway?


Marc Rossner
jahangir!marc@uunet.uu.net

jim@crom2.uucp (James P. H. Fuller) (04/13/91)

> > > 	copy /etc/boot to track 0 (for 386/ix 1.0.6 anyway)
> >     ^^^^^^^^^^^^^^^^^^^^^^^^^
> > This is the part I can't figure out how to do.  Any hints?
>
> Oh, heck, people--just use dd to read the install floppy into a file,
> and then back onto a formatted new disc. Mount it, and hack away.
> This way, you copy the boot loader plus the existing file structure
> (and most of the stuff in /dev, /bin, and /etc that you'll need anyway).

     This seems to work, and gives you a *pair* of "emergency boot floppies"
since what ISC gives you is a boot disk that brings up unix and then passes
control to an install disk with a small file system, utilities (like cpio),
and all the ISC installation scripts.  But I'm still curious -- first off, the
boot loader can't be on the install disk, can it?  I mean, that isn't the one
that boots!  And it seems that you ought to be able to make *a* boot floppy,
not a pair of 'em, since /unix can't take up anything like all of a 1.2 meg
floppy (my hard drive /unix is only 581206 bytes right now) and that leaves
plenty of room for all the utilities you would need for emergencies, (after
you wiped the install scripts.)

     But you *can't* hack a copy of the boot floppy itself (even though it's
cloneable by either dd or DOS diskcopy) because it isn't mountable, because
mount doesn't recognize it as containing any kind of valid filesystem.  It
isn't 1K, it isn't 2K, it isn't DOS, it isn't XENIX, and that's all the types
of filesystem that come with ISC.  fstyp(1M) can't make head or tail of the
boot floppy.  Has anyone got any idea what it is?

                                              James P. H. Fuller
                                              jim%crom2@nstar.rn.com

tmh@prosun.first.gmd.de (Thomas Hoberg) (04/13/91)

In article <1991Apr11.171616.14088@sci34hub.sci.com>, gary@sci34hub.sci.com (Gary Heston) writes:
|> In article <538@jahangir.UUCP> marc@jahangir.UUCP (Marc Rossner) writes:
|> =In article <1991Apr3.203354.18641@eci386.uucp>, woods@eci386.uucp (Greg A. Woods) writes:
|> => In article <59@talgras.UUCP> david@talgras.UUCP (David Hoopes) writes:
|> => >     Is it possable to create a bootable root floppy for Interactive Unix? 
|> => 	copy /etc/boot to track 0 (for 386/ix 1.0.6 anyway)
|> =   ^^^^^^^^^^^^^^^^^^^^^^^^^
|> =This is the part I can't figure out how to do.  Any hints?
|> 
What about 'cp /etc/fboot /dev/rdsk/f0t' ?

|> Oh, heck, people--just use dd to read the install floppy into a file,
|> and then back onto a formatted new disc. Mount it, and hack away.
|> This way, you copy the boot loader plus the existing file structure
|> (and most of the stuff in /dev, /bin, and /etc that you'll need anyway).
|> 
|> Works under 1.0.6 and 2.x. Also a good way to back up your install floppy--
|> if you have the space. 
|> 
That's bound to be much less work.
|> -- 
|> Gary Heston   System Mismanager and technoflunky   uunet!sci34hub!gary or
|> My opinions, not theirs.    SCI Systems, Inc.       gary@sci34hub.sci.com
|> I support drug testing. I believe every public official should be given a
|> shot of sodium pentathol and ask "Which laws have you broken this week?".

-- tom
----
Thomas M. Hoberg   | UUCP: tmh@bigfoot.first.gmd.de  or  tmh%gmdtub@tub.UUCP
c/o GMD Berlin     |       ...!unido!tub!gmdtub!tmh (Europe) or
D-1000 Berlin 12   |       ...!unido!tub!tmh
Hardenbergplatz 2  |       ...!pyramid!tub!tmh (World)
Germany            | BITNET: tmh%DB0TUI6.BITNET@DB0TUI11 or
+49-30-254 99 160  |         tmh@tub.BITNET

janm@dramba.neis.oz (Jan Mikkelsen) (04/15/91)

In article <1991Apr12.175337.3858@crom2.uucp> jim@crom2.uucp (James P. H. Fuller) writes:
[  text deleted ...]
>
>     But you *can't* hack a copy of the boot floppy itself (even though it's
>cloneable by either dd or DOS diskcopy) because it isn't mountable, because
>mount doesn't recognize it as containing any kind of valid filesystem.  It
>isn't 1K, it isn't 2K, it isn't DOS, it isn't XENIX, and that's all the types
>of filesystem that come with ISC.  fstyp(1M) can't make head or tail of the
>boot floppy.  Has anyone got any idea what it is?
>
>                                              James P. H. Fuller
>                                              jim%crom2@nstar.rn.com

The actual filesystem starts at track one, not track zero.  Track zero
contains the bootstrap, which is read by the ROM BIOS.  Try mounting
/dev/dsk/f0q15d instead of /dev/dsk/f0q15dt ...
-- 
Jan Mikkelsen
janm@dramba.neis.oz.AU or janm%dramba.neis.oz@metro.ucc.su.oz.au
"She really is."

brando@uicsl.csl.uiuc.edu (Brandon Brown) (04/15/91)

jim@crom2.uucp (James P. H. Fuller) writes:


>     But you *can't* hack a copy of the boot floppy itself (even though it's
>cloneable by either dd or DOS diskcopy) because it isn't mountable, because
>mount doesn't recognize it as containing any kind of valid filesystem.  It
>isn't 1K, it isn't 2K, it isn't DOS, it isn't XENIX, and that's all the types
>of filesystem that come with ISC.  fstyp(1M) can't make head or tail of the
>boot floppy.  Has anyone got any idea what it is?

I'm sure a billion people will correct me if I'm wrong, but isn't the kernel
actually on the first floppy? I think you are using the wrong device when
you are trying to mount it. You are probably using f0q15dt. The "t" on the
end tells it to look at the entire floppy. If you leave off the "t" for
f0q15d, you should be able to fsck, mount, etc. the filesystem on the root;
the one with /unix on it. Of course, for all "normal" operations like doing
dumps to floppies, you should use the "dt" device.

+-----------------------------------------------------------------------------+
|  Brandon Brown                     | Internet: brando@uicsl.csl.uiuc.edu    |
|  Coordinated Science Laboratory    | UUCP:	 uiucuxc!addamax!brando!brown |
|  University of Illinois            | CompuServe: 73040,447                  |
|  Urbana, IL  61801                 | GEnie:    macbrando                    |
+-----------------------------------------------------------------------------+