On Fri, May 04, 2007 at 09:15:47AM +0200, Alan McKinnon wrote
> On Friday 04 May 2007, [EMAIL PROTECTED] wrote:
> > I accomplish this by moving /tmp /usr and /var to the /home
> > partition.
> 
> Surely you meant "move the /tmp, /usr and /var to the / partition"?

  Let me rephrase myself...
  - *PHYSICALLY* moving /tmp /usr and /var to the /home partition.
  - bind mount (or symlink) these directories to the / partition

> It won't work moving them to /home unless you put symlinks in and
> that would just be ... odd

  It may be "odd", but it gets the job done.  The files end up
*PHYSICALLY* residing in the /home partition, but *LOGICALLY* on /tmp,
/usr and /var.  Here's how I implement it.  I set up /tmp /usr and /var
in /home/bindmounts/ (note the permissions on /home/bindmounts/tmp).

[m450][root][~] ll /home/bindmounts/
total 20
drwxr-xr-x  5 root root 4096 Apr 29 13:36 .
drwxr-xr-x  7 root root 4096 May  1 00:08 ..
drwxrwxrwt 10 root root 4096 May  4 22:00 tmp
drwxr-xr-x 15 root root 4096 Apr 29 03:53 usr
drwxr-xr-x 14 root root 4096 Apr 28 20:36 var


I create *EMPTY* directories named /tmp /usr and /var on /.  And then I
bind mount the directories.  Here's a snippet from /etc/fstab

/home/bindmounts/var    /var            auto            bind 0 0
/home/bindmounts/usr    /usr            auto            bind 0 0
/home/bindmounts/tmp    /tmp            auto            bind 0 0

  Symlinks would normally work, too.  However, if for some reason, the
/home partition is unavailable at bootup, the system would complain
about symlinks.  With empty directories, you at least get a basic system
booting up with fewer complaints.

  Let me repeat the reason for the "oddness".  The stripped-down /
partition is going to be pretty constant, so I don't have to allow lots
of empty space as a safety margin.  The wildcards, in terms of filespace
are...
  - /var (logs and other stuff)
  - /usr (/usr/bin for all my apps, and /usr (share, portage, libs))
  - /tmp (this is where big temporary files go)

-- 
Walter Dnes <[EMAIL PROTECTED]> In linux /sbin/init is Job #1
Q. Mr. Ghandi, what do you think of Microsoft security?
A. I think it would be a good idea.
-- 
[EMAIL PROTECTED] mailing list

Reply via email to