LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-26-2004, 12:28 PM   #1
alekoos
Member
 
Registered: Apr 2004
Distribution: SlackWare 9.
Posts: 32

Rep: Reputation: 15
mount / , /home , /home/usr on different partitions


How can i mount "/" , "/home/users" etc...(any mount point that i want) to different partitions ???

Does this help with security even i am running a desktop PC (which i do)??
 
Old 04-26-2004, 12:44 PM   #2
tmorton
Member
 
Registered: Jan 2003
Location: In front of my computer in Oregon, USA
Distribution: Slackware
Posts: 198

Rep: Reputation: 31
Hi,
You can edit your /etc/fstab file. Mine looks like:
Code:
bash-2.05b$ cat /etc/fstab
/dev/hda2        swap             swap        defaults         0   0
/dev/hda7        /                ext3        defaults         1   1
/dev/hda6        /home            ext3        defaults         1   2
/dev/hda5        /boot            ext3        defaults         1   2
/dev/hda1        /mnt/win         ntfs        defaults         1   2
/dev/hda10       /mnt/icewater    ext2        defaults,users   1   2
/dev/hdc         /mnt/cdrom       iso9660     noauto,users,ro  0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
Note /dev/hda7 and /dev/hda6.

As for security, not that I am aware of...
--Taj
 
Old 04-26-2004, 12:46 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"How can i mount "/" , "/home/users" etc...(any mount point that i want) to different partitions ???"

Yes. You can do it by copying the files to the other partition, deleting the files in the original directory and editing fstab to add the new mount point.
For example if you want to move /home /users to /dev/hdb1 then log in as root and (assuming that /dev/hdb1 was formatted as ext3) do this:

mkdir /silver
mount -t ext3 /dev/hdb1 /silver
cp -pR /home/users/* /silver
rm /home/users/* -R
umount /silver
rmdir /silver
edit /etc/fstab to add /home/users as a mount point
reboot

Here is a thread that describes the process further:

http://www.linuxquestions.org/questi...hreadid=163748

"Does this help with security even i am running a desktop PC (which i do)??"

No.

----------------------------
Steve Stites
 
Old 04-26-2004, 12:57 PM   #4
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Wow, that's interesting. Everyone seems to be saying that mounting on different partitions doesn't help with security. I had read that it does. Most importantly, /tmp & /var . I don't have a whole lot of details, but I am going to look this up this evening and post back. I'm almost certain that it does help security.
 
Old 04-26-2004, 01:10 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Under some circumstances mounting /var and /tmp on separate partitions will help stability, but not security.

----------------------
Steve Stites
 
Old 04-26-2004, 01:18 PM   #6
tmorton
Member
 
Registered: Jan 2003
Location: In front of my computer in Oregon, USA
Distribution: Slackware
Posts: 198

Rep: Reputation: 31
Quote:
Under some circumstances mounting /var and /tmp on separate partitions will help stability, but not security.
For example, if the logs in /var/logs get large, or temp files in /tmp get big, it won't slow the whole system down because they can't expand to the whole / partition and eat more space.
--Taj
 
Old 04-26-2004, 01:41 PM   #7
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
Quote:
Originally posted by jailbait
Under some circumstances mounting /var and /tmp on separate partitions will help stability, but not security.

----------------------
Steve Stites
It can help in the protection of your system from DoS attacks as it stops your main partition/filespace filling with a gigantic log if someone tries to DoS by creating lots of errors, such as HTTP 404 errors which are easy to generate.

This can combatted by log rotation or by putting logging such as /var on a separate partition.
 
Old 04-26-2004, 02:57 PM   #8
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Yes, all it will help with (on the security side) is DoS attacks.

However, unless you are running some service available to the internet, this isn't a concern, and moving those directories to different partitions will not have any real benefit to you (unless you need to move them because of space constraints).
 
Old 04-26-2004, 03:10 PM   #9
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Here is a thread which explains why you might want to put the base directories on separate partitions.

http://www.linuxquestions.org/questi...hreadid=163517

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeB....home.page.html

Steve Stites
 
Old 04-27-2004, 02:41 AM   #10
alekoos
Member
 
Registered: Apr 2004
Distribution: SlackWare 9.
Posts: 32

Original Poster
Rep: Reputation: 15
1)From what i read security&&stability is a mater only if i am running some service on the net(e.g. shell accounts,web server,ftp server...).

2)If only i connect on the internet with the linux PC there is no problem except if there is a bug at any of the processes that i am running..but then i guess the attacker will look for other dirs that /home/users or /.

3)But it is good to have /home and /root (and if i prefer /tmp+/var/log)to different partition to save any data i want if i need to format my PC,right?
 
Old 04-27-2004, 11:02 AM   #11
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
Yes, it can be good from a backup and data safety point view. If your normal partitions have a crash there is probably a higher chance that you might be able to recover the /home contents if it is on a separate partition, and even better if it is on a separate hard disk.
 
Old 05-03-2004, 08:56 AM   #12
alekoos
Member
 
Registered: Apr 2004
Distribution: SlackWare 9.
Posts: 32

Original Poster
Rep: Reputation: 15
another silly questions.Mounting on different partition means that:

if i have / on hda1
and /root on /hda2
if a user get an access to / he cannot see /usr ???
Errmm.... I mean that when i do "ls /" will the "/root" folder be displayed ??
if not how can i access it ??
 
Old 05-03-2004, 09:08 AM   #13
tmorton
Member
 
Registered: Jan 2003
Location: In front of my computer in Oregon, USA
Distribution: Slackware
Posts: 198

Rep: Reputation: 31
It will be displayed if you it is mounted. Why do you have a separate partition for /root? I, personally, would have one for /home instead, since my data is backed up on a different partition.

You can add an entry to /etc/fstab to have a partition automatically mount.
--Taj
 
Old 05-03-2004, 11:29 AM   #14
alekoos
Member
 
Registered: Apr 2004
Distribution: SlackWare 9.
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by tmorton
It will be displayed if you it is mounted. Why do you have a separate partition for /root? I, personally, would have one for /home instead, since my data is backed up on a different partition.

You can add an entry to /etc/fstab to have a partition automatically mount.
--Taj
i wrote a custo example that's why i wrote about /root, but /home is good also .So the dir that it is on another partition will be under / but just the data will be saved on another partition just not to lose the when you want to format your disk, right ??
 
Old 05-03-2004, 11:39 AM   #15
tmorton
Member
 
Registered: Jan 2003
Location: In front of my computer in Oregon, USA
Distribution: Slackware
Posts: 198

Rep: Reputation: 31
Yes, correct.
Here's what my HDD looks like (40GB):
Code:
/dev/hda1 (NTFS, 5GB) [Primary]
/dev/hda2 (Swap, 256MB) [Primary]
/dev/hda5 /boot (40MB) [Logical]
/dev/hda6 /home (5GB) [Logical]
/dev/hda7 / (15GB) [Logical]
/dev/hda8 /mnt/lfs (6GB) [Logical]
/dev/hda9 /mnt/arch (2GB) [Logical]
/dev/hda10 /mnt/icewater (3GB) [Logical]
Free Space 2GB
As you can see, I've got my hard drive split up into small little sections. This lets me run a few different distros, while keeping my /home data. Also, when/if I upgrade Slack, I can move important things to /home, or another partition so it won't be lost if I reformat.
As a piece of advice, make your /home partition *Really Big* (tm). 8-10GB should be enough. I'm running out of space on mine .
--Taj
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Seperate Partitions for /usr & /home? Jukas Debian 6 03-24-2005 10:50 AM
Can I mount, say, /usr/src , /apps , and /home on one hda1??? kornerr Linux - Newbie 13 02-01-2005 02:43 AM
mount points, /home partitions, /etc/fstab's and booting bigjohn Linux - Newbie 4 11-16-2004 10:14 AM
Advantages of partitions for /home and /usr Rudebr00d Linux - General 15 01-29-2004 08:19 PM
moving /home and /usr to new partitions? commuter Linux - General 12 01-05-2003 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration