LinuxQuestions.org
Visit Jeremy's Blog.
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 02-09-2006, 10:47 AM   #16
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55

Whoa Piete, thanks for the awesome post! I think I am starting to get a clue (but usually just about the time that happens...LOL). You make some excellent points about not having any investment to protect at the beginning. But I hate redoing things so I'm trying to plan ahead as much as possible given my utter lack of knowledge. I think I get the point the other guys have been making about /usr since you explained that /usr, as much as it may not be officially part of the "system" is unlikely to survive intact with new distros etc. Except for /usr/local which you point out, only because you are careful to make sure that anything that goes in there doesn't have dependencies.

I guess I am now back to what almost everybody said from the beginning:

/dev/hda2 256M swap
/dev/hda3 1G /home
/dev/hda4 12G /

Or now, since so many linux hot-rodders run whole systems in 5G, maybe now I can split /hda4 and run an extra distro in /hda5.

Thanks guys, I've taken up enough of your time. I'll come back when I break something.

In the meantime if anyone else posts I'll be checking every so often for updates.

Thanks again.
 
Old 02-09-2006, 11:04 AM   #17
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Quote:
Originally Posted by piete
Welcome to LQ, Randux!

In the first instance I would like to put forward the notion that "it doesn't matter!". My advice would be to partition it as / and /home and the mess around with it. Tinker a bit. Break it. Reinstall it. Try a different distro. Break that. Come back to Slack with the new knowledge you've gained and try again!
Great advice. We've all broken *way* more machines than we've fixed. Linux is about freedom. Do what you like; if it doesn't work, try another way
 
Old 03-01-2006, 01:48 PM   #18
mzansary
Member
 
Registered: Feb 2006
Posts: 30

Rep: Reputation: 15
Hi,

I was just going thru the forums and came accross this link

Iam new to linux

i want to know if we create the /usr and /var and /opt in seperate partitions and if we install another OS will it use these /var and /opt or we need to cr8 again for new OS

also is the same case for /boot parition, i read in one article on multiple OS u need to create /boot partiton for every OS

if u install OS on first partition on hardidisk and u make the partition bootable with fdisk u still need to create /boot on seperate partition

for eg when u install fedora 4 thru disk druid it will give u different mount points to create / and /boot partition but when u install slackware 10.1 it doesnt

I mean if u dont give boot partition and if install OS will it still create boot partiton automatically or u r suppose to create boot partiton from fdisk

really need to know the answers iam trying to setup multiple OS so i need to know before i proceed

also i guess i have to add entries in menu.lst from main partition to add entries for the boot menu for other Os

Iam not a advance use just a beginner





Quote:
Originally Posted by piete
Welcome to LQ, Randux!

In the first instance I would like to put forward the notion that "it doesn't matter!". My advice would be to partition it as / and /home and the mess around with it. Tinker a bit. Break it. Reinstall it. Try a different distro. Break that. Come back to Slack with the new knowledge you've gained and try again!

You currently have nothing to loose by ditching *everything* linux based on your laptop. In 6 months time when you've set it up *just so* and then try to do something and realise your partition setup isn't gonna work quite right ... you'll have a lot to loose.

Let me have a go at answering some of your questions more directly ...



Putting /home on a different partition and leaving that alone will mean you keep user-data. Think of /home as "Documents & Settings". Below it you'll find a list of users and in those directories (directory names are the usernames) will be the users data stuff and anything else they've put into it. By default (correct me if I'm wrong) the only place a user can store stuff is in their /home/<user> directory.

Many people advocate (me included) large home partitions because this is our data storage area. The OS goes in one place (I do this with doze PCs, too ... c: for programs, d: for data) and all the data goes in another ... when you reinstall the OS, the data doesn't get lost.

Unlike doze, however, all the user-config files are *also* kept in /home/<user> ... this is good and bad. Good because if you use the same/similar versions of programs over distros then you'll keep your setup. Bad because you may find different distros use different versions of programs that modify config files in different ways ... I'm sure Woodsman will tell you how much of a pain it is to constantly delete the .kde directory to fix a minor glitch!

The exception to this rule is root's home directory. It's at /root, not /home/root. Although because it's your system, feel free to move it if you like =D



This may be difficult ...much in the same way as it's not a good idea to have Program Files on a different partition, reinstall the OS, then expect all the things installed on the previous run to work. Granted, we don't have that curse of installation "The Registry", but the same sort of thing applies. Programs depend on libraries. If you install non-standard (that is to say: it's not on the CD) libraries and then install programs that are dependant on those libraries ... you can't necessarily expect the libraries to stay working (since they might depend on, and link against - hook themselves onto - system libraries at compile time) if you pull out those system libraries.

I know it must sound a bit odd, but think of it as building things on a table, and then trying to take the tablecloth out from under your construction. Some of it will stay standing, some of it will fall over. In theory you can work out what's going to work, but, in practice ... it's faster just to try it.

So how does \Program Files\ work in Linux, I hear you cry. Well, basically core programs (ls, cd, mv, rm, etc) go in /bin, distro-specific applications are built by Patrick into /usr/bin (kde ends up in /opt, and OpenOffice will probably prompt you to put it in /opt, too) and by default anything you configure from source will go into /usr/local/bin.

It doesn't mean that things in /usr/local are automatically self-sufficient ... it just means they're separated from things in /usr and /. A quick search found this link http://www.tuxfiles.org/linuxhelp/linuxdir.html which reads quite nicely and might help you decide how best to set things up.

I personally avoid putting anything in /usr/local that I am not absolutely sure is not self-sufficient, everything else gets compiled into /usr ... but this is talk for another day when you've got past partitioning

As I've already mentioned above, /home stores user config data. Anything that a user sets up for themselves will be stored in their /home/<user> directory. Likewise, any global settings are (usually) stored in /etc. You would be wise to take backups of the config files in /etc. Most specifically things like /etc/X11/xorg.conf (this runs your graphical environment), /etc/samba/smb.conf (this stores settings for running a Samba server on a doze network) and /etc/rc.d/rc.local (local startup commands that aren't covered by anything else go in here).

I'd like to say that because of the nature of /etc/, it is very unwise to make this a separate partition (although I can tell the desire to do so is high!) because each distro (typically) uses /etc slightly differently. And those differences will confuse the issue. In slack, for example, smb.conf is found in /etc/samba/ ... you probably won't find it there in RedHat.



At this stage of the game you have no constraints and nothing to loose by getting it wrong. I have a laptop with a 6GB harddrive partitioned as follows:

Code:
/      4gb
/home  2gb
Because i knew I wanted to install a lot of stuff, but it's not a storage server for my data - that comes from my other boxes ... just allow it to run a lot of things natively.

Finally, I have a few little scripts that might help you moving distro and resetting things when they break ... have a look on www.kaear.co.uk (specifically: http://www.kaear.co.uk/default.asp?pageID=33) for the System file backup.

Give me an email (kaear at kaear dot co dot uk) if you need any other scripts, I can't always guarentee the ones on the site are the latest i have (I'm just so lazy!).

Good luck with everything,
- Piete.

Last edited by mzansary; 03-01-2006 at 01:57 PM.
 
Old 03-02-2006, 08:17 AM   #19
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
Talking

Quote:
Originally Posted by mzansary
I was just going thru the forums and came accross this link
This is a very good place to find information. I am the guy who asked the question originally and I learned a lot since then by making some mistakes and also got lucky and got some things correct.

> i want to know if we create the /usr and /var and /opt in seperate partitions
> and if we install another OS will it use these /var and /opt or we need to cr8
> again for new OS

I got the advice from many people in this thread not to worry about separate partitions, except maybe for /home. I set up my system with two partitions, root and home, and I think this is best unless you have a lot of knowledge and/or are building a server for many users. For desktop machine, if you have a lot of disk space, maybe you could also have a separate /opt.

Now to answer your specific questions: in most cases, if you define separate partitions you can configure the new OS to use mountpoints for its files. Using your example, you could most likely config your new OS to share partitions you already defined. I think for /usr and /var it's a very bad idea to try to share, because different linux setups will not use these partitions in exactly the same way. Instead, you will create a huge mess for yourself. Even /opt is not such a great idea for sharing unless you are using the same distro more than once, because they may need different binaries. Now I feel deja vu like I typed all this before but maybe not......

The better reason to define separate partitions (in my newbie opinion) is so that your data can survive a reinstallation of linux. After playing around for a few weeks, I'm starting to realize that in the linux world you can pretty much do everything without ever "reinstalling" from scratch. I have blown up a lot of modules and screwed up libraries and I always got them back from the distro discs by starting another linux on the same hardware and updating the partitions I needed to fix. It's not like winbloze; you can't fix that from inside, you have to reinstall it if it doesn't work. But with linux you can fix it from another linux. I have a separate /home and so I can use it when I want to blast everything on my system except the user data. I recently lost my x-window environment (still not sure why) but when I reloaded all the X-stuff, everything was magically working again including all of the users' settings were preserved! I didn't have to recustomize anything.

> also is the same case for /boot parition, i read in one article on multiple OS
> u need to create /boot partiton for every OS

You can create a /boot for every OS, this is what I do, but I am no expert. You can also create one /boot and share it across all OSs. I think it will take you a little more work and is not worth it unless you have many OSs, very small HD, or are very big kernel experimenter. Let /boot be mounted as part of your root structure and it will be space-managed properly (that is, dynamically). I multi-boot 4 OSs on one PC and I have three /boots, one for each linux. There is a guy on here named Saikee who boots 100 OS on one PC!!! so you can ask him about /boot. That is a guy who can probably benefit from a separate /boot partition because it makes configuring the boot loader a little easier. If you have unique /boot by image then you have to have all the partitions mounted to config lilo, for example.

> if u install OS on first partition on hardidisk and u make the partition
> bootable with fdisk u still need to create /boot on seperate partition

These are two separate issues. First of all, linux doesn't care if the partition is marked bootable. None of my linux partitions are bootable, but lilo boots them all anyway. /boot is not for the boot loader, it is where you keep the kernels. You could save your kernels in /var and boot from there if you wanted to. It's just a standard directory where kernels and maps are kept.

> for eg when u install fedora 4 thru disk druid it will give u different mount
> points to create / and /boot partition but when u install slackware 10.1 it
> doesnt

I don't know about 10.1 but on 10.2 you definitely have the option to specify all the mount points you want.

> I mean if u dont give boot partition and if install OS will it still create
> boot partiton automatically or u r suppose to create boot partiton from fdisk

You are asking a question about the installer, not the OS, and the answer is "it depends." I can't answer you except to say in general, don't worry abou creating a separate boot partition.

> really need to know the answers iam trying to setup multiple OS so i need to
> know before i proceed

I was trying to find out all I could before I started, and I still typed one wrong letter and wiped my partition table. The best advice is to write down your partitioning table and plans and keep it nearby while you are installing. Look at it often and don't rush.

> also i guess i have to add entries in menu.lst from main partition to add
> entries for the boot menu for other Os

I don't know what this means.

> Iam not a advance use just a beginner

Even a beginner can accomplish a lot. If not, there would be no advanced users.
 
Old 03-03-2006, 06:04 PM   #20
mzansary
Member
 
Registered: Feb 2006
Posts: 30

Rep: Reputation: 15
Hi,

Thanks for your time and the explanation was really nice and simple
Iam really learning new things everyday on the forum
Gr8 place to start and brush up ur concepts

I really appreciate!!

Quote:
Originally Posted by Randux
This is a very good place to find information. I am the guy who asked the question originally and I learned a lot since then by making some mistakes and also got lucky and got some things correct.

> i want to know if we create the /usr and /var and /opt in seperate partitions
> and if we install another OS will it use these /var and /opt or we need to cr8
> again for new OS

I got the advice from many people in this thread not to worry about separate partitions, except maybe for /home. I set up my system with two partitions, root and home, and I think this is best unless you have a lot of knowledge and/or are building a server for many users. For desktop machine, if you have a lot of disk space, maybe you could also have a separate /opt.

Now to answer your specific questions: in most cases, if you define separate partitions you can configure the new OS to use mountpoints for its files. Using your example, you could most likely config your new OS to share partitions you already defined. I think for /usr and /var it's a very bad idea to try to share, because different linux setups will not use these partitions in exactly the same way. Instead, you will create a huge mess for yourself. Even /opt is not such a great idea for sharing unless you are using the same distro more than once, because they may need different binaries. Now I feel deja vu like I typed all this before but maybe not......

The better reason to define separate partitions (in my newbie opinion) is so that your data can survive a reinstallation of linux. After playing around for a few weeks, I'm starting to realize that in the linux world you can pretty much do everything without ever "reinstalling" from scratch. I have blown up a lot of modules and screwed up libraries and I always got them back from the distro discs by starting another linux on the same hardware and updating the partitions I needed to fix. It's not like winbloze; you can't fix that from inside, you have to reinstall it if it doesn't work. But with linux you can fix it from another linux. I have a separate /home and so I can use it when I want to blast everything on my system except the user data. I recently lost my x-window environment (still not sure why) but when I reloaded all the X-stuff, everything was magically working again including all of the users' settings were preserved! I didn't have to recustomize anything.

> also is the same case for /boot parition, i read in one article on multiple OS
> u need to create /boot partiton for every OS

You can create a /boot for every OS, this is what I do, but I am no expert. You can also create one /boot and share it across all OSs. I think it will take you a little more work and is not worth it unless you have many OSs, very small HD, or are very big kernel experimenter. Let /boot be mounted as part of your root structure and it will be space-managed properly (that is, dynamically). I multi-boot 4 OSs on one PC and I have three /boots, one for each linux. There is a guy on here named Saikee who boots 100 OS on one PC!!! so you can ask him about /boot. That is a guy who can probably benefit from a separate /boot partition because it makes configuring the boot loader a little easier. If you have unique /boot by image then you have to have all the partitions mounted to config lilo, for example.

> if u install OS on first partition on hardidisk and u make the partition
> bootable with fdisk u still need to create /boot on seperate partition

These are two separate issues. First of all, linux doesn't care if the partition is marked bootable. None of my linux partitions are bootable, but lilo boots them all anyway. /boot is not for the boot loader, it is where you keep the kernels. You could save your kernels in /var and boot from there if you wanted to. It's just a standard directory where kernels and maps are kept.

> for eg when u install fedora 4 thru disk druid it will give u different mount
> points to create / and /boot partition but when u install slackware 10.1 it
> doesnt

I don't know about 10.1 but on 10.2 you definitely have the option to specify all the mount points you want.

> I mean if u dont give boot partition and if install OS will it still create
> boot partiton automatically or u r suppose to create boot partiton from fdisk

You are asking a question about the installer, not the OS, and the answer is "it depends." I can't answer you except to say in general, don't worry abou creating a separate boot partition.

> really need to know the answers iam trying to setup multiple OS so i need to
> know before i proceed

I was trying to find out all I could before I started, and I still typed one wrong letter and wiped my partition table. The best advice is to write down your partitioning table and plans and keep it nearby while you are installing. Look at it often and don't rush.

> also i guess i have to add entries in menu.lst from main partition to add
> entries for the boot menu for other Os

I don't know what this means.

> Iam not a advance use just a beginner

Even a beginner can accomplish a lot. If not, there would be no advanced users.
 
  


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
Screen Re-sizing xorg.conf. Hekdiesel Linux - Newbie 4 06-04-2006 01:40 PM
Concurrent Users Sizing gerrard8 Linux - General 1 01-13-2006 08:51 AM
Why Is KDE not sizing menus right? Krimson714 Slackware 3 10-17-2005 07:57 PM
sizing a form in vb.net mrobertson Programming 3 07-13-2005 07:04 AM
Partition sizing dummy Linux - Newbie 4 11-04-2002 08:04 PM

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

All times are GMT -5. The time now is 02:40 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