LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 06-26-2008, 07:25 PM   #1
amenditman
Member
 
Registered: Apr 2008
Location: Valley of Gold
Distribution: Arch / Mepis
Posts: 58

Rep: Reputation: 16
New Hard Drive Partitioning


I just got a used laptop which I am going to use as my "tweak it until it breaks" platform.

The hard drive is kinda funky, so I am going to install a brand new, never used Hitachi 160 GB drive I have in it.

My plan is to have several distros available to boot.

Any recommendations on partitioning for booting several or even many different distros on a single hard drive.

Thanks,
Amenditman
 
Old 06-26-2008, 07:44 PM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
A hard disk is allowed 16 devices names in Linux.

Thus excluding the whole disk say it is /dev/sda you have /dev/sda1 to /dev/sda15. However as you need one primary partition, for conversion to an extended partition, to get the logical partitions from sda5 to sda15 you only have 14 partitions usable for storage. Since one of the partitions has to be a swap you only get a maximum of 13 Linux distros in the first hard disk.

Say 1Gb for swap you should you should have about 15Gb per distro. That is a good size as most Linux can be installed into a 5Gb partition, 10Gb is roomy and 15Gb is generous.

Multiple partitions for one Linux is a waste of time for a laptop which is not expected to function as a server.

You can install every of the 13 Linux with their own boot loader in each partition and select any one to take over the MBR and boot the rest 12.

You won't be able to get a Linux to break the laptop. The correct tool is a a hammer.
 
Old 06-26-2008, 08:04 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Provided you use a unique home directory name for each distro, you can use the same /home/ partition for all the distro's. This will allow you to have a larger home partition. Also, if you configure the distro's to delete all of the files in /tmp when shutting down, that is another partition that can be shared. Having around 10GB for /tmp can be handy if you want to burn dvd's. Of course as already mentioned you can share the swap partition. The other distro's will notice it and may even use it during the install process.

Look at your current /etc/passwd file. The home directory of the user is given there. So you can use the same user name but have different home directories such as /home/username-fc9, /home/username-suse, etc. Keep in mind that access is determined by the UID number of the user and not the user name. So in Fedora Core, the first user will be 500 while in SuSE the first user will be 1000. A user with a UID of 500 in other distro's will be able to access the FC's users directory with a uid of 500. You can edit the regular UID & GID's range of numbers by editing /etc/login.defs.
Code:
# Min/max values for automatic uid selection in useradd
#
# SYSTEM_UID_MIN to SYSTEM_UID_MAX inclusive is the range for
# UIDs for dynamically allocated administrative and system accounts.
# UID_MIN to UID_MAX inclusive is the range of UIDs of dynamically
# allocated user accounts.
#
SYSTEM_UID_MIN  100
SYSTEM_UID_MAX  499
UID_MIN 1000
UID_MAX 60000

#
# Min/max values for automatic gid selection in groupadd
#
# SYSTEM_GID_MIN to SYSTEM_GID_MAX inclusive is the range for
# GIDs for dynamically allocated administrative and system groups.
# GID_MIN to GID_MAX inclusive is the range of GIDs of dynamically
# allocated groups.
#
SYSTEM_GID_MIN  100
SYSTEM_GID_MAX  499
GID_MIN 1000
GID_MAX 60000
This will effect new users created.

You might consider creating symbolic links for your Documents & downloads directory. This will allow you to access the same Documents easily which ever distro you try.

One thing to consider is that some distro's use LVM and others don't by default. If you are going to use LVM, you may want to start with a distro like Fedora Core that uses it by default. This will create a /boot partition. From then on you can use the FC's grub boot loader to chainload the other distro's.

You will want to have one main boot loader on the disk's MBR. From there you can either cut & paste from the other distro's menu.lst file to boot using a single /boot partition, or have chainloading entries to boot the other distro's using there Partition saved MBR's. You don't want to get in a situation where you have dueling distro's updating the same MBR.

Last edited by jschiwal; 06-26-2008 at 08:17 PM.
 
Old 06-26-2008, 08:20 PM   #4
amenditman
Member
 
Registered: Apr 2008
Location: Valley of Gold
Distribution: Arch / Mepis
Posts: 58

Original Poster
Rep: Reputation: 16
Thanks

Wow!

That's a mouthful and then some.

I am going to go RTFM and see if I can figure out those two very detailed answers.

Thanks for responding.

Amenditman
 
Old 06-26-2008, 09:18 PM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
If you are going to use any number above three distros I recommend each distro share one swap and put the rest in a 12 Gig partitions and chainload the partitions with grub in its own separate partition of 300 meg. I do not believe in sharing home because if you upgrade or change distros it becomes a pain. What I do is set up a separate partition for data in a fat 32 and this way anything can mount, read and write to it and you can change, upgrade or add programs without bothering the other distros. The only problem with this method is if you get to changing distros and do not update you menu.lst it becomes a guessing game figuring out which distro will boot.
 
Old 06-26-2008, 09:38 PM   #6
amenditman
Member
 
Registered: Apr 2008
Location: Valley of Gold
Distribution: Arch / Mepis
Posts: 58

Original Poster
Rep: Reputation: 16
OK Larry Webb, thanks for that info.

If I might ask a few questions for clarification, please. I am a great carpenter, but an average new 'user' of the Linux OS.

The FAT32 partition should be called /data? How do I get the OS to write my data there without calling it /home?

Partition table to look like what? With the three distro example?

Is there an easy tutorial you know about for this?

Saikee sure knows how to do this, but it is way beyond my current knowledge to understand.

Thanks for your help!

Amenditman
 
Old 06-27-2008, 02:41 AM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Larry's recommendation is to have a data-only partition, The name is immaterial because it can be anything name.

Say it is the last partition sda15. In each distro you can call it /my_data. You then edit the /etc/fstab to mount it. Everything you specify in fstab will be mounted so you gain an extra /my_data everyting time you use that Linux.

The data only partition can be in any filing system too and Ext2/3 is as good as Fat32 or even NTFS. The Fat32 is easiest whereas if you use Ext2/3 you need to load a freeware driver, like ext2ifs, in MS systems to read/write it. For ntfs every Linux can read it but to write on it some Linux requires you yo install ntfs-3g driver which is shipped in many Linux nowadaya. That is all.

jschiwal's idea of using a seaparate /boot (one partition devoted to booting) and LVM are optional and will not happen if you nominate only one partition in Linux because (1) /boot is inside it and (2) LVM cannot be read by a boot loader so in one-partition setup it cannot be used (that is why people use LVM must have a separate /boot). I am not against separate /boot partition or LVM but they do require more knowledge to use the features effectively. LVM for example is not supported or recognised by many Linux installers. If it is recognised each intsller has its own idea how to turn the disk into a LVM. Therefore it is harder to play with LVM in multi-distro environment. Mind you jschiwal's advice is spot on and I can't fault it all. I propose single partition per Linux mainly because the /boot and LVM are server-based features and it is rather unlikely that you want a laptop to run as a server and have the tip-top arrangement in security serving several users.

I tend to agree with Larry on avoiding /home being shared and jschiwal has already pointed out each distro can assign different UID name and group ID to it. The difficulty arises when each distro has its own idea on its desktop settings and you can pulled to pieces to make it work in everyone, especially if you have more than 4 distros. I had a go at it but thought the extra hassels didn't worth my effort/persistance but that is just me.

Linux is about choices. You can go in any directions to get to the same end. Some are quicker, other are more scenic or give you a chance to exercise yourself. I tend to do the laziest possible because I believe if God have gave us the computer then it would be alright to minimize our input and maximize what the PC has to do.
 
Old 06-27-2008, 09:55 PM   #8
amenditman
Member
 
Registered: Apr 2008
Location: Valley of Gold
Distribution: Arch / Mepis
Posts: 58

Original Poster
Rep: Reputation: 16
Thanks for all that.

I think I'm starting to get a clue, do you have any cool abbrev. for that yet, like 'GAC'?

Something like this is what I think you are recommending.

/sda1 primary swap 1048MB
/sda2 primary ext3 25600MB /my_data
/sda3 extended ext3
/sda4 logical ext3 15360MB
/sda5 logical ext3 15360MB
/sda6 logical ext3 15360MB
balance unallocated for future uses.

This would give me possibility to multi-boot 3 distros and keep data separate. Any corrections/recommendations?

I plan to use my Parted Magic 2.2 Live CD to run gParted and make the partition table. In gParted there is a screen which comes up right away after selecting create new partition on the unallocated drive, it wants to "Create Partition Table" and the default is "msdos" when I click Advanced it lists a bunch of others. Should I let it use msdos or select a different type? I RTFM from beginning to end and it never mentions anything about this choice.

Thanks so much for your patience!

Amenditman
 
Old 06-28-2008, 12:39 AM   #9
lwasserm
Member
 
Registered: Mar 2008
Location: Baltimore Md
Distribution: ubuntu
Posts: 184

Rep: Reputation: 41
Here's a good web site for configuring grub to boot multiple OS:
http://users.bigpond.net.au/hermanzone/p15.htm
Check out the home page of this site too. Put swap and /data in the extended partition, no point in using up a primary for them.

The advice of Larry Webb is excellent concerning a separate partion for grub and chainloading to separate grub loaders (or lilo for that matter) in each OS partition. Note that this is not a /boot partition with kernels and initrd images, they will all be in their respective partitions. A great advantage of this setup is when a distro has a kernel update, it will only modify the grub menu.lst in in its own partition.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Hard Drive Partitioning for Large Hard Drives Matir Linux - General 2 12-26-2006 05:55 AM
partitioning my hard drive bluemandrin Linux - Newbie 2 12-09-2005 04:18 PM
Partitioning a hard drive phoenix_wolf Linux - Newbie 5 12-04-2004 01:50 AM
Second Hard drive partitioning boyzie Linux - Hardware 10 04-26-2004 02:57 PM
Partitioning Second Hard Drive snutz411 Linux - Newbie 1 03-23-2004 11:20 PM

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

All times are GMT -5. The time now is 10:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration