[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cfdisk says hda is smaller than it really is!

>> How come? I simply created a partition that would hold the basic Debian
>> slink system on the "8.4 GB drive" that cfdisk detected in conjunction
>> with the 2.0.x kernel, when what in fact I had was a 10 GB drive.
>Certainly an option, but I was holding out for a more out-of-the-box

Not with the current state of potato. ;-)

>What exactly do you mean by "create the appropriate mount points" ?

Okay, here's the situation: You have created one partition (which
I will refer to as "P1") of, say, 500 MB, that you use for initially
installing the Debian slink system and which you intend to use as
"/usr/lib" later on.

After you have installed slink and upgraded the required packages from
unstable to be able to run kernel 2.2.x, everything is stored on this
500 MB partition (P1). After cfdisk recognizes your entire hard disk,
let's say you decide to create a 150 MB partition (P2) that you want
to use a your root partition ("/"), a 800 MB partition (P3) that shall
become "/usr", and another 2 GB partition for the home directories of
the users on your local network, which shall consequently become "/home"
(P4). (Let's assume you initially created two users "foo" and "bar", so
that /home/foo and /home/bar exist.)

This partition scheme might not exhaust your hard disk space (especially
if Linux is all you install on that drive), but you might want to leave some
space unpartitioned anyway. The great thing about the UNIX file system is
that you can decide to make a separate partition for any part of the file
tree later, move the stuff below a certain directory on that partition
and mount it, thereby reducing the load on the partition that initially
carried these dirs and files and which had become so clogged up. :-)

Now, you change (cd) to "/" on P1 and move everything except "/usr" and "/home"
to P2. (See the mv man page on how to do this in one go, I can't quite recall
from memory, I'm afraid). Then you cd to /home and move the contents
of this directory to P4. Then cd to /usr and move everything except /usr/lib
to P3. Then cd to /usr/lib and move everything to the root directoy of the
current partition (P1).

Remove /home and /usr (including subdirs) from P1.

If I haven't forgotten anything :-), you should now have:

- P1 containing all dirs and files that initially resided under /usr/lib.
- P2 containing all dirs and files except for the contents of /usr
  and /home.
- P3 containing all dirs and files that were located under /usr, except
  for /usr/lib.
- P4 containing /foo and /bar, the home directories of the users foo and bar.

Coming back to your question: You do lack mount points on P2 for the data
on P1, P3 and P4. So create (mkdir) /usr, /usr/lib and /home on P2, otherwise
you cannot mount the contents of these partitions at the appropriate level
in the directory hierarchy.

Don't forget to edit /etc/fstab to reflect your changes before you reboot!
See the existing /etc/fstab for examples. (If you use lilo, this applies to
the lilo configuration file as well. Rerun lilo after editing the latter.)

Hope this has helped to make my point a bit clearer. :-)


Reply to: