mount / , /home , /home/usr on different partitions
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"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:
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.
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
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.
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).
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?
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.
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 ??
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
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 ??
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.