LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-28-2005, 04:39 AM   #1
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
Can I mount, say, /usr/src , /apps , and /home on one hda1???


Can I mount, say, /usr/src , /apps , and /home on one hda1???
I just want to reduce my win partitions, but I know I will reinstall Linux many times. So I want to make 1 partition for system use (3-4 Gb) so that I'm able to reinstall (erase) it anytime I want with no necessary data loss. And another partition for data storing (>=15 Gb) so that I don't need to erase it when reinstalling system.
 
Old 01-28-2005, 04:45 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I'm not sure what you're asking - you mount hda1 to a mountpoint - such as / - not vice versa. So if the question is 'Can I have everything except my data (and swap) in one partition on one mount point, then sure. And 'Can I wipe that partition without screwing up my data partition?', then sure.
 
Old 01-28-2005, 07:07 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Look at my article about partitionning:
http://yves.gablin.club.fr/linux/ind...fig/partitions

Yves
 
Old 01-28-2005, 09:27 AM   #4
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
I know my q is not clear enough
I want to have /apps, /usr/src, /home on another partition than the system. i.e. I want '/' dir and all dirs it contains (except the above ones) to be one partition, and /apps, /usr/src, /home to be on another partition. Of course, I can mount /home on another partition, and make ~/apps, ~/src dirs there. But is it possible to place some system's dirs on main partition and some on another partition?
 
Old 01-28-2005, 09:47 AM   #5
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
With most distros, a re-install will force a reformating of the /usr directory/partition. It makes more sense to keep /, /usr, et al. on one partition, and /home on another. That way you only need to re-install the kernel and apps and not user settings or data. To preserve the other partitions (or directories), I would simply back them up to a spare HD or onto a DVD-RW disk.

In my experience, it always makes sense to have /home on its own partition.
 
Old 01-28-2005, 10:02 AM   #6
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
So u mean that even if it is possible, it is useless. But I like to "work" under root account. I guess, /root is to be erased too whenever I reinstall the system? Am I right? Or I can place /root on one partition and the rest on another, and don't worry about my datas in /root when reinstalling?
 
Old 01-28-2005, 10:37 AM   #7
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
WHY on EARTH would you EVER,... "WORK" as root!?!?!?!?

Do you realize how dangerous that is??? You can seriously nerf your system without trying...

You really should only su to root from a user account, or switch users from within the GUI in extreme situations, unless you can't help it.

But you can create seperate mount points for everything... the default, if you don't make it seperate, is for it to mount under /.

For instance:

hda1 = / (which could include /usr, /opt, /etc,... etc)
hda2 = /root
hda3 = swap
hda4 = /home

That's just an example. I'd suggest that /root, if you do it, should be very small,... like a few hundred megs. I'd suggest that its better to leave it on / , and simply back it up regularly to another device... like a USB key drive or another HD...
 
Old 01-28-2005, 05:45 PM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally posted by kornerr
I know my q is not clear enough
I want to have /apps, /usr/src, /home on another partition than the system. i.e. I want '/' dir and all dirs it contains (except the above ones) to be one partition, and /apps, /usr/src, /home to be on another partition. Of course, I can mount /home on another partition, and make ~/apps, ~/src dirs there. But is it possible to place some system's dirs on main partition and some on another partition?
Well, there are two places an installer should never touch - /home and /usr/local. /apps isn't even a standard directory - there's also /opt on most systems if you want. And /usr/local/src is standard and I suppose there could be an /opt/src. And any distro worth a flip will listen to you if you don't do an automatic install. So let's say you had a bunch of stuff in /opt and the distro would normally format that partition. It's easy enough to just not mention that partition during the install, let it create another /opt in the root partition, and then delete that directory after the install, modify /etc/fstab, and mount your real /opt.

For instance.

And, yeah, running as root is a bad idea and /root is designed to be part of the root partition. I believe you *can* mount anything anywhere but it's asking for trouble. Then again, so's running as root. Then again again, a home user cares a hell of a lot less about an easily reinstallable system than about his personal data.

Anyway - me, I usually have /, /tmp, /var, /home, and sometimes /usr/local and /boot as separate partitions. (I like the stuff that can fluctuate and my personal stuff, and the distro to each be separate.)
 
Old 01-29-2005, 09:50 AM   #9
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
U didn't induced me, guys, that I should use an avarage account I tried, I tried to 'reboot'. I cannot reboot as an avarage user. And su everytime... it really botheres me. But I've already repartitioned my HDD. I gave 17 GB to 2 windows (2k - for Delphi and AntiVirus, xp - for few games), and 20 GB for /, /home (17 GB) and a small swap. Yes, I decided to create apps, src, docs in /home and don't touch it when reinstalling. So thanks for telling me "crazy"
 
Old 01-31-2005, 02:19 AM   #10
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
I don't want to appear to insist, but my article is exactly what you want, with adaptations for your particular situation and folders! Or else I really don't understand your question.
To make it short, here's what you could do:
Code:
hda1: swap
hda2: /
hda3: /local

mv /home /local/
ln -s /local/home /home
mv /root /local/home/
ln -s /local/home/root /root
mkdir /local/.sys
mv /opt /local/.sys/
ln -s /local/.sys/opt /opt
...
Do I need to go on?
Some links can be avoided. For example, /home is useless, as long as your user configuration tool knows that users are inside /local/home. Same goes in theory for /opt, but I would keep this link because some strange RPM may want to install files there.
As for /root... I think /root should be kept inside / because in case of a problem, it is important to be able to boot with only /, and still have root's home dir available.

Yves.
 
Old 01-31-2005, 02:34 AM   #11
tormented_one
Member
 
Registered: Oct 2004
Location: Small Town USA
Distribution: slamd64 2.6.12 Slackware 2.4.32 Windows XP x64 pro
Posts: 383

Rep: Reputation: 30
I believe /opt is used by KDE, atleast on my slackboxes it is. So I'd leave it on / as well.
 
Old 01-31-2005, 03:20 AM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Quote:
Originally posted by kornerr
U didn't induced me, guys, that I should use an avarage account I tried, I tried to 'reboot'. I cannot reboot as an avarage user. And su everytime... it really botheres me. But I've already repartitioned my HDD. I gave 17 GB to 2 windows (2k - for Delphi and AntiVirus, xp - for few games), and 20 GB for /, /home (17 GB) and a small swap. Yes, I decided to create apps, src, docs in /home and don't touch it when reinstalling. So thanks for telling me "crazy"
To persist on the root issue:

"And su everytime, it really bothers me"

What do you have to su every time to do? Generally, this ought to be a good step that is necessary to take before performing a task requiring it. It makes you take that 2 second (and as it becomes easier, that 1/2 second) pause to think about it. For such things as shutting down the system, sudo exists. To make things easier, you can even create alias commands to make sudo seem non-existent (for things like shutting down the system).

One of the blankets of security linux provides is created by using your system correctly.

Cool
 
Old 01-31-2005, 10:00 AM   #13
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
theYinYeti, as I understood you suggest to link everything I need. That's one of the ways. May be I follow this when I'll be partitioning my HDD next time Thanks to all.
 
Old 02-01-2005, 02:43 AM   #14
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Basically, yes. Though as I said, the /home link can be avoided (much better to avoid it, IMO) and I explain how on my web site.
 
  


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
/usr/src SeattleSux Linux - Newbie 3 12-23-2004 10:29 PM
/usr/src/??? iain.ross Linux - Software 5 08-24-2004 02:18 PM
mount / , /home , /home/usr on different partitions alekoos Slackware 14 05-03-2004 11:39 AM
/usr/src ??? gibbylinks Red Hat 1 10-24-2003 03:05 AM
Creating /usr/src/linux-<xx> from kernel.<xx>.src.rpm jmourik Linux - Newbie 2 02-19-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:16 PM.

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