On Tue, 30 Oct 2012, in the Usenet newsgroup aus.computers.linux, in article
<k6mv7o$kuu$
1...@dont-email.me>, Jordan wrote:
Hmmm... no replies yet?
>I'm new (ish) to Linux, using Ubuntu.
>How compulsory is the default folder structure?
It's your system, you can do as you wish. But in reality, there is
a relative standard way of doing things - battle tested over 30+ years
of the UNIX operating systems. You might want to start with the
"Filesystem Hierarchy Standard" from
http://www.pathname.com/fhs/ and
an explanatory guide named "Linux Filesystem Hierarchy" available from
http://tldp.org/guides.html.
>I'm running out of space on my hard drive.
Do you know why (found a bunch of neat stuff to download, or didn't
plan ahead to be doing so) or is it another mystery?
>Anything wrong with placing my stuff on another one?
Nothing at all. More experienced users may intentionally divide
things up such that /home/ is located on a different partition of the
same drive, or on a separate drive entirely. The rational is that
the installer program used when you update/replace your current
version can do it's thing on the main Linux partition, and it won't
mess with other partitions/disks so you have all of "your" files and
stuff on the new one.
[fermi ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 33661668 3384696 28567052 11% /
/dev/sda2 150205500 1793556 140781876 2% /home
tmpfs 1993988 380 1993608 1% /dev/shm
[fermi ~]$ ls /
bin dev home lost+found mnt opt root selinux sys usr
boot etc lib media net proc sbin srv tmp var
[fermi ~]$ grep sda /etc/fstab
/dev/sda1 / ext3 defaults 1 1
/dev/sda2 /home ext3 defaults 1 1
/dev/sda3 swap swap defaults 0 0
[fermi ~]$
What I did here is to install on the first partition. There is an
EMPTY directory called /home on that partition. The second line in
/etc/fstab shown causes the second partition with all of my users and
user files and stuff to be mounted automatically at boot in that
empty point - and now when I look in /home/ibuprofin/ I find all of
my stuff. This is essentially the only changes needed. The entry in
the password file is "normal"
[fermi ~]$ grep ibuprofin /etc/passwd
ibuprofin:x:504:100:Moe Trin:/home/ibuprofin:/bin/bash
[fermi ~]$
so everything is transparent. The other (normal) users on the system
also have their directories on /dev/sda2 which has a directory
structure like
home/user1 ---> and all of that user's stuff
home/user2 ---> and so on
What I did to make the change was to
1. use mkfs.ext3 to create a filesystem on the new place (same
idea as "format d:")
2. mount the new partition TEMPORARILY in /mnt (command syntax is
"mount /dev/sda2 /mnt")
3. Move all the stuff from /home/* to /mnt/* keeping the same
directory structure - many ways to do that
4. UNmount the new partition ("umount /dev/sda2")
5. mount the new partition over the "old" /home ((command syntax is
"mount /dev/sda2 /home")
6. edit /etc/fstab and add the line telling the system to mount the
new partition as shown above.
>Am I making sense?
Yup - except we don't call them "folders" - that's a windoze term
stolen from the Macintosh operating system who in turn stole it from
Xerox in the early 1980s. They're called "directories". ;-)
Old guy