*BSD News Article 8340


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!mcsun!sunic!aun.uninett.no!nuug!nntp.uio.no!bootes.sds.no!toreh
From: toreh@bootes.sds.no (Tore Haraldsen)
Subject: Re: 386BSD: /bin -> /usr/bin reorganization
Message-ID: <1992Nov20.030832.7666@ulrik.uio.no>
Sender: news@ulrik.uio.no (Mr News)
Nntp-Posting-Host: 192.68.77.217
Organization: Statens Datasentral A/S, SDS, Norway
References: <1992Nov18.064604.2992@pool.info.sunyit.edu> <CGD.92Nov18155017@eden.CS.Berkeley.EDU> <DERAADT.92Nov19133341@newt.newt.cuc.ab.ca>
Date: Fri, 20 Nov 1992 03:08:32 GMT
Lines: 92

In article <DERAADT.92Nov19133341@newt.newt.cuc.ab.ca> deraadt@newt.cuc.ab.ca (Theo de Raadt) writes:
>In article <CGD.92Nov18155017@eden.CS.Berkeley.EDU> cgd@eden.CS.Berkeley.EDU (Chris G. Demetriou) writes:
>   In article <DERAADT.92Nov17041728@newt.newt.cuc.ab.ca> deraadt@newt.cuc.ab.ca (Theo de Raadt) writes:
>   >Among a large number of other Sunifications I have made to my 386BSD
>   >system, I've made this one:
>   >
>   >lrwxr-xr-x    1 root            8 Oct 24 21:05 bin@ -> /usr/bin
>   >
>
>   there are problems with this: notably, straight bsd systems
>   aren't "meant" to mount /usr when they're brought up into single user
>   mode.
>
>   i assume you're running with / and /usr physically residing in the same
>   partition.  otherwise, i don't see how this could work -- sh is in
>   /bin, so you couldn't even run /etc/rc, if / and /usr were in different
>   partitions.
>Did you not finish reading my posting?? I mentioned that 'init' needed to
>be fixed, and even gave the output from 'df'
>
>   I think any Sun admin who saw you running with / and /usr in the same
>   partition would die laughing.
>It's exactly because the default setup has / and /usr in the same partition
>that I nearly THREW UP and I sat down and fixed that IMMEDIATELY.
>
>   there are many more changes which are necessary to move stuff
>   from /bin into /usr/bin, and make it 'stick' properly.
>
>I believe I made it quite clear in my previous posting that / and /usr
>are in seperate postings. I copied all the binaries that I absolutely
>needed into /sbin. That is essentially what Sun did as well.
>
>I know what is going on. A sun machine needs / and /usr both to run single
>user. It does mount /usr as read-only, but it needs some of the binaries
>there. They place only about 6 programs in /sbin (hostname, ifconfig, init,
>mount, sh, and one called intr). I found that I needed a bunch more in
>/sbin -- every program that /etc/rc ever needs.
>
>And, I had to modify init.c so that init would know to look for sh and
>fsck in /sbin instead of /bin.
>
>Really, it is working, and you can tell because my root partition is
>using LESS than 15M of disk while my /usr is enormous.
>
>Filesystem      512-blks    used   avail capacity  Mounted on
>/dev/wd0a          62462   11490   44724    20%    /
>/dev/wd0g         187742  153470   15496    91%    /usr
>
>It *DOES* work.
> <tdr.
>--
>
>This space not left unintentionally unblank.		deraadt@newt.cuc.ab.ca

I split out /usr in its own partition two months ago WITHOUT moving any
programs around. It works fine, as far as I can see.

I have two 300Mb SCSI disks in my home machine,

sd0 contains
	MS-DOS, 386bsd / & swap, SCO ODT 2.0 / partitions.

sd1 contains
	MS-DOS, 386bsd /usr, SCO ODT 2.0 /u partitions.

What is so strange or wonderful about that? The only pain in the ass
was setting it up initially. I did the following (courtesy the
limitations in 386bsd install & disklabel programs):

1) Install 386bsd in minimum partition on sd0.
2) Swap SCSI numbers.
3) Install 386bsd in reasonably-sized partition on sd1(sd0).
4) Swap SCSI numbers back.
5) Boot from fixit.fs.
6) Remove all files from sd1a.
7) Move all of sd0a/usr to sd1a/ with cpio -p.
8) Remove sd0a/usr.
9) Save remaining files from sd0a/ on sd1a/ with cpio -o.
10)Redesign label of sd0 with disklabel, keep 16Mb for root, leave the
   rest for swapping.
11)Re-create sd0a/
12)Move contents back to sd0a from saved stuff on sd1a.
13)Modify sd0a/etc/fstab to reflect partitioning.
14)Reboot - that's it!!

You do the same with two WD-type drives with no sweat.

-- tore
-- 
------------------------------------------------------------------------
Tore Haraldsen, Statens Datasentral A/S - SDS, Norway
email: toreh@bootes.sds.no