How To: Partition your Hard Drive.

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
marcus0263
Level 4
Level 4
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby marcus0263 » Sat May 26, 2007 5:09 pm

Lolo Uila wrote:What about /tmp? I'm trying to learn about Linux partitioning and besides the /usr and /var partitions I've seen a few articles suggesting /tmp should be on it's own as well (since it gets written to alot).

And if you are going to experiment with different distros, how does that affect a system with /usr & /var on sepparate partitions? Do those also get shared between distros (like /home), or would you need a set of those for each distro?

Thanks. I'm getting ready to deploy Mint on one of my main computers and I'd like to do it "right" so I don't have to redo anything later.

Aloha, Tim

Howzit Brudda -


I wouldn't worry about /var/tmp unless it's a server, here's what I'd recommend for the minimum

/boot 64 Meg
/ 8-10 Gig
/home Everything else

What I myself run is

/boot 64 Meg
/ 8 Gig
/opt 2 Gig
/var 3 Gig
/home Everything else

Also I have another drive that I put my swap file on and slice it up for

/home/Video
/home/Music

It's good to have /var on it's own slice due to log's and tmp


You know da kind ;-)
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd

User avatar
Lolo Uila
Level 5
Level 5
Posts: 576
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby Lolo Uila » Sat May 26, 2007 10:14 pm

Okay, thanks for the info.

I'm still not clear on why it's recommended to put /boot in a separate partition. The rest makes sense, but it seems to me something that small that gets written to infrequently should not have much of a fragmentation risk (and wouldn't be much of a problem if it happened), so why is it bad to just let /boot be part of / ?

Again, thanks for all the help.

Aloha, Tim

PS: and Marcus, it's Da kine... :cool:

User avatar
marcus0263
Level 4
Level 4
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby marcus0263 » Sat May 26, 2007 10:22 pm

Lolo Uila wrote:Okay, thanks for the info.

I'm still not clear on why it's recommended to put /boot in a separate partition. The rest makes sense, but it seems to me something that small that gets written to infrequently should not have much of a fragmentation risk (and wouldn't be much of a problem if it happened), so why is it bad to just let /boot be part of / ?

Again, thanks for all the help.

Aloha, Tim

PS: and Marcus, it's Da kine... :cool:


Having a /boot partition is for two reasons, one for security and also that's where your kernel and boot info is stored. So you want to keep it safe from possible corruption, etc.

Yeah, been a few years since I lived over there. I lived in Kialua and Kanehoe, miss the hell out of it you know! I still get cravings for Boiled Peanuts and an Ahi or Teri Beef plate ;-(
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd

User avatar
Lolo Uila
Level 5
Level 5
Posts: 576
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby Lolo Uila » Sat May 26, 2007 10:40 pm

Okay, thanks.

I'm from Kailua originally. I live in Kapolei now. Couldn't afford a house in Kailua. Too expensive! My mortgage in Kapolei in less than I used to pay for rent in Kailua.

Aloha, Tim

User avatar
marcus0263
Level 4
Level 4
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby marcus0263 » Sat May 26, 2007 11:24 pm

Lolo Uila wrote:Okay, thanks.

I'm from Kailua originally. I live in Kapolei now. Couldn't afford a house in Kailua. Too expensive! My mortgage in Kapolei in less than I used to pay for rent in Kailua.

Aloha, Tim


One note, I do recommend setting /boot not to mount by default. You would only want to mount it when upgrading the kernel. Here's a copy of my fstab on my Bianca VMware image

Code: Select all

# /etc/fstab: static file system information.
#
# <file system>          <mount point>   <type>     <options>          <dump>  <pass>
proc                     /proc           proc        defaults           0 0
# /dev/sda3
UUID=2a71a794-f8c5-41bb-9b57-5d9370f24f27 /             reiserfs    noatime,notail    0 1
# /dev/sda1
UUID=8419bbab-b9a1-48b3-8eda-eeccda467e33 /boot     ext2        noauto                1 1
# /dev/sda4
UUID=68e72803-e617-4ba1-8762-b2c1080ec301 /home   reiserfs    noatime,notail   0 2
# /dev/sda2
UUID=29c2b2cd-8261-4485-9d60-6d9e6cac1b40 none      swap        sw                 0 0
/dev/hdc                 /media/cdrom0     udf,iso9660 user,noauto        0 0
/dev/                    /media/floppy0  auto        rw,user,noauto     0 0


So you're on the Ewa side eh? I hope you don't have to commute to the Windward side for work. But then again I left before the H3 was finished. Yeah when I was there the houses in Kialua were way to expensive even then, no way I could afford to buy.

MMMMM I still have dreams of Shave Ice though ;-)
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd

User avatar
Lolo Uila
Level 5
Level 5
Posts: 576
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby Lolo Uila » Sun May 27, 2007 8:11 pm

I'm putting Cassandra on a separate 80GB drive in the big tower system. Decided to go with the following partition scheme:

4GB /dev/sda1 ext3 / (primary partition)
6GB /dev/sda5 ext3 /usr (extended partition)
63G /dev/sda6 ext3 /home
3GB /dev/sda7 ext3 /var
2GB /dev/sda8 swap

I'll see how this works out. The tower is dual booting with Win2K and has a LOT more storage available (over 1.5TB currently). Hopefully I can get get most of what I need to do running under Linux, and then I will have to give it some more room.

Any comment, criticisms or suggestions on this partitioning scheme will be appreciated. I haven't installed a lot of stuff yet, so there is still time to change things if there is a compelling need.

Thanks! Tim

User avatar
marcus0263
Level 4
Level 4
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby marcus0263 » Sun May 27, 2007 9:51 pm

Lolo Uila wrote:I'm putting Cassandra on a separate 80GB drive in the big tower system. Decided to go with the following partition scheme:

4GB /dev/sda1 ext3 / (primary partition)
6GB /dev/sda5 ext3 /usr (extended partition)
63G /dev/sda6 ext3 /home
3GB /dev/sda7 ext3 /var
2GB /dev/sda8 swap

I'll see how this works out. The tower is dual booting with Win2K and has a LOT more storage available (over 1.5TB currently). Hopefully I can get get most of what I need to do running under Linux, and then I will have to give it some more room.

Any comment, criticisms or suggestions on this partitioning scheme will be appreciated. I haven't installed a lot of stuff yet, so there is still time to change things if there is a compelling need.

Thanks! Tim


You don't have a slice for /boot
put /home and swap on another physical drive if you can
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd

flyhippo
Level 1
Level 1
Posts: 4
Joined: Sat Jun 23, 2007 8:59 am

Postby flyhippo » Sat Jun 23, 2007 9:18 am

Hello... Totally newbie linux here :)

I decided to migrate from dark side to this light/good side heheh...

Anyway I got a question about this partition, thank you for all discussion from page 1-4 I learn a lot from your partition clear explanation, from some questions and answers and from other problems. So I now I understand a bit about linux partition.

Now I have a question regarding this partition, I read an article from: http://linuxgazette.net/102/piszcz.html (tested 2004) regarding Benchmarking Filesystems.

In conclusion they said that the best journaling file system to choose based upon these results would be: JFS, ReiserFS or XFS

Is this true? is the JFS reliable and good? I read that scorp123 recommend XFS or EXT3.

Do I have to really understand about this FileSystems? Or I just need to know that XFS is the best file systems. If I do need to learn about file systems and why they are important, could you point me to a site where I can learn more about file systems?

Also a bit out of topic: If I want to use windows running as well (since I need to run some windows softwares like filemaker, ms Project, etc) what is the best solution for me.
Therefore dual boot is not the option since I have to log out one OS then login to other OS.

Thank you :)

Dani

User avatar
scorp123
Level 8
Level 8
Posts: 2264
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby scorp123 » Sat Jun 23, 2007 1:03 pm

flyhippo wrote: I read that scorp123 recommend XFS or EXT3.
If in doubt use Ext3 ... It just works and is a good overall performer for every-day use. Those benchmarks are to be taken "cum grano salis" ... Unless you do some really special stuff (e.g. storage of tons and tons and tons of extremely large files ... for which XFS would be best) you won't even notice any significant speed difference in your every-day usage of your computer.

flyhippo wrote: Or I just need to know that XFS is the best file systems.
There is no such thing like a "best" filesystem. What is "best" or not highly depends on what you do with your system and how the filesystem can handle that. Generally people say that XFS is best when dealing with tons and tons of really huge files (e.g. 1000 DVD *.iso images, each beyond 4 GB in size ...) ... but if you don't have so many huge files, then XFS isn't necessarily the best choice for you.

As I said ... If you are in doubt: Use Ext3 ... it just works. 8)

flyhippo wrote: If I want to use windows running as well (since I need to run some windows softwares like filemaker, ms Project, etc) what is the best solution for me. Therefore dual boot is not the option since I have to log out one OS then login to other OS.
VMware Server ... it's available via Canonical's "commercial" repos and can easily be installed via apt-get install vmware-server ... or in GUI via Synaptic.

flyhippo
Level 1
Level 1
Posts: 4
Joined: Sat Jun 23, 2007 8:59 am

Postby flyhippo » Wed Jul 18, 2007 1:46 am

I decided to use dual boot windows and ubuntu.

But I am confused now with the partition.

I am using Dell 6400 with Media Direct and I did Install windows.

So this is my partition

Dell Utility 47 MB (Primary)
Windows 15 GB (Primary)
Empty For Linux 30 GB
Storage 27 GB (Logical)
MediaDirect 2 GB (Logical)

So I tried to install linux in 30 GB drive, but when I start to do partition it will only allow me to use 1 primary partition only then the rest have to be in Logical.

Is there any way to do this? What do I need to put in primary? /boot or / ?

Thank you.

User avatar
linuxviolin
Level 8
Level 8
Posts: 2071
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Postby linuxviolin » Thu Jul 26, 2007 6:32 pm

Personally I would say to you not to be bored, for a home user use simply 1 partition for / (about 10 GB should be enough) and 1 for /home, both in ext3.

For swap use 1 GB maximum and I recommend to you to lower the swappiness (that depends on your memory):

"The use of the swap memory by default on Kernel 2.6.xx is set to 60% that means that the system will use intensively the swap memory. This sounds good if we have a small amount of memory (around 512MB or less) and lot of load on our PC especially if it is working as server. But if we have plenty of RAM (at least 1GB), as I do which is 2GB, and we are using our PC as desktop machine for daily use, we can change the percentage of swap to be utilized. This setting will increase the performance of Linux experience." (Vichar Bhatt)

Run at the CLI, as root:

cat /proc/sys/vm/swappiness

You should see 60. Now change it to 10 (or even 0 as I did it, adapt according to your system, test):

sysctl -w vm.swappiness=10

Now is time to work for some minutes with some applications if you see that is better, you can make the changes permanent, adding this line at the end of /etc/sysctl.conf:

vm.swappiness=10
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)

msgnomer
Level 2
Level 2
Posts: 59
Joined: Sun Jul 15, 2007 3:22 pm
Location: NY, USA

Postby msgnomer » Fri Aug 03, 2007 1:18 am

I'm thinking of wiping my drives and starting fresh (with no Windows partition! All Mint). Does this setup seem okay?

HDA 160 GB
hda1 /home (rest of disk)
hda2 /swap 3 GB (1.75 GB RAM)

HDB 120 GB
hdb1 /boot 150 MB
hdb2 / 5 GB
hdb3 extended partition to end
hdb5 /usr 20 GB
hdb6 /var 5 GB
hdb7 /tmp 2 GB
hdb8 /VMs (rest of disk) <- virtual box machine space (not sure I can actually do this. They may have to go in /home?)

I also have a 160 GB external USB drive in 2 partitions (NTFS & FAT32 at the moment) for storage (photos, music, etc). I intend to switch those over to be a backup for /home and the VMs, maybe.

BIOS is already set to boot hdb first.

What say you?
Jess

User avatar
scorp123
Level 8
Level 8
Posts: 2264
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby scorp123 » Fri Aug 03, 2007 4:07 am

msgnomer wrote: HDB 120 GB
hdb1 /boot 150 MB
hdb2 / 5 GB
hdb3 extended partition to end
hdb5 /usr 20 GB
hdb6 /var 5 GB
hdb7 /tmp 2 GB
hdb8 /VMs (rest of disk) <- virtual box machine space (not sure I can actually do this. They may have to go in /home?)
/usr appears a little bit too large in my opinion, 10 GB would most likely suffice too and you'd still have plenty of space. /var is a bit large too with 5 GB ... but depending on what you intend to do with this machine (maybe you'll get plenty of log files?) it's maybe not a bad idea to make it this large. As for your /VMs ... you can do it if you do it right. E.g. you could create sub-directories underneath /VMs and then give those sub-directories to each user on your system. Example:

Code: Select all

sudo mkdir /VMs/user1
sudo mkdir /VMs/user2
...
sudo chown -R user1:user1sgroup /VMs/user1
sudo chown -R user2:user2sgroup /VMs/user2
Then, inside each user's /home directory the normal users could create a symbolic link to their sub-directory underneath /VMs, e.g. for "user1":

Code: Select all

cd /home/user1
ln -s /VMs/user1 ./my-virtual-machines
So the directory /VMs/user1 appears as /home/user1/my-virtual-machines in user1's home directory; so "user1" would not have to search on the disks, e.g. "OH man ... where the hell did I put that VMware image yesterday?? And where did my VirtualBox images go?" ==> now it would be easily accessible underneath your home directory, despite in fact being on a different disk partition (which is good BTW: Avoids fragmentation and helps the disk performance; and in case something goes terribly wrong it hopefully won't affect /home directly!).

Hope this was useful ....

msgnomer wrote: BIOS is already set to boot hdb first.
OK then. Otherwise I'd suggest to swap the Master/Slave setup but changing the boot order should work too.

msgnomer
Level 2
Level 2
Posts: 59
Joined: Sun Jul 15, 2007 3:22 pm
Location: NY, USA

Postby msgnomer » Fri Aug 03, 2007 10:11 am

Thanks much!

So taking /usr down to 10 GB and /var down to 2 GB or so would be okay? It's just a desktop system with one user.
Jess

User avatar
linuxviolin
Level 8
Level 8
Posts: 2071
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Postby linuxviolin » Fri Aug 03, 2007 11:37 am

msgnomer wrote:It's just a desktop system with one user.


Again personally I would say to you not to be bored to do as many different partitions and just to make / and /home (maybe /boot if you really want it). That is completely sufficient. It is just a personal opinion.

{scorp123, do not strike me! :lol:}

msgnomer wrote:hda2 /swap 3 GB (1.75 GB RAM)


I guess 3 GB seems excessive to me. 1 GB is sufficient:

http://www.extremetech.com/article2/0,1697,2114123,00.asp

"There is an old rule-of-thumb about the amount of swap space. The conventional wisdom says that you should have twice as much swap as RAM. A computer with 256 MB of RAM should start with 512 MB of swap. Although this is a good idea for memory limited systems, it isn't practical for high-end home user systems. If you have 1 GB of RAM, then you probably will never need swap space—and you are very unlikely to need 2 GB of swap unless you are planning on doing video editing or audio composition."

Personally I have 1 GB RAM and a 1 GB swap partition with swappiness at 0 (see my post above) with no problem. I am a simple desktop user. :)
Last edited by linuxviolin on Fri Aug 03, 2007 12:22 pm, edited 1 time in total.
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)

msgnomer
Level 2
Level 2
Posts: 59
Joined: Sun Jul 15, 2007 3:22 pm
Location: NY, USA

Postby msgnomer » Fri Aug 03, 2007 12:21 pm

Thanks!

"you are very unlikely to need 2 GB of swap unless you are planning on doing video editing or audio composition."

I do some video editing (or did, in Windows). I haven't tried editing in Linux yet,
Jess

User avatar
scorp123
Level 8
Level 8
Posts: 2264
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby scorp123 » Fri Aug 03, 2007 2:10 pm

linuxviolin wrote: Again personally I would say to you not to be bored
You maybe mean "bothered" ? To be bored is something entirely different ...

linuxviolin wrote: to do as many different partitions and just to make / and /home (maybe /boot if you really want it). That is completely sufficient. It is just a personal opinion.
I'd separate /var if anything. That stuff fills up all the time and having it on / together with all the static stuff (/usr, /opt, etc.) is ugly and slows the system down. /home should always be separate.

linuxviolin wrote: {scorp123, do not strike me! :lol:}
You're lucky..... I'm too tired. Tomorrow maybe? :lol:

msgnomer wrote: I guess 3 GB seems excessive to me. 1 GB is sufficient
Out of experience I'd suggest size of swap = size of RAM if you have 1 GB or more RAM. If your RAM size is less than 1 GB then size of swap = 2 * size of RAM. But I wouldn't recommend a swap larger than 4 GB ... I mean if you have to swap 4 GB around and still run "Out of memory" then something is seriously wrong anyway :wink: But for video editing 2-3 GB swap looks OK to me.

User avatar
linuxviolin
Level 8
Level 8
Posts: 2071
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Postby linuxviolin » Fri Aug 03, 2007 3:03 pm

scorp123 wrote:You maybe mean "bothered" ? To be bored is something entirely different ...


Or annoyed maybe.... sorry for my a little approximate English! :oops:

scorp123 wrote:/home should always be separate.


Definitively YES!
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)

nelamvr6
Level 4
Level 4
Posts: 327
Joined: Sun Jul 08, 2007 8:14 pm
Location: New London, CT USA

Postby nelamvr6 » Wed Aug 08, 2007 3:52 pm

linuxviolin wrote:
scorp123 wrote:You maybe mean "bothered" ? To be bored is something entirely different ...


Or annoyed maybe.... sorry for my a little approximate English! :oops:

scorp123 wrote:/home should always be separate.


Definitively YES!


If this is the case, is it possible to make this the default behavior for the Mint install routine?

I'm right this minute in the process of re-doing my partitions because when I asked the Mint installer to do the right thing it gave me a / and a swap, and nothing more.

User avatar
scorp123
Level 8
Level 8
Posts: 2264
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby scorp123 » Thu Aug 09, 2007 4:33 am

nelamvr6 wrote: If this is the case, is it possible to make this the default behavior for the Mint install routine?
Sure, we could change it so that every Windows partition gets automatically formatted and deleted (too bad if you wanted to keep it). Or we make /home use 80% of your second hard disk (too bad if you don't have one). ..... :wink:

You see the problem, yes? No installer can replace human intelligence. *YOU* have to tell it what you want. To correctly guess the "right" partition scheme (and what is "right" or not is a hot topic in it self) for each and every user and each and every system is impossible. The other problem I see: Even if the installer did suggest to create a separate /home partition I fear it would confuse the heck out of newbies. Chances are also they'd get the sizes wrong, e.g. make /home too small because they don't realise yet what they need it for. Or they make " / " too small ... or they by accident delete their Windows partition because they thought they could re-use the same partitions and settings under Linux ... and and and.

It's better if the user informs himself and then decides for himself what he wants to do.

nelamvr6 wrote: when I asked the Mint installer to do the right thing it gave me a / and a swap, and nothing more.
See above. You want a separate /home? Then tell the installer.

If you think this is "unfriendly" try the Solaris installer for contrast ... it will overwrite whatever it finds and take no prisoners and show no mercy to whatever is on your harddisks. And it will enforce it's partitioning scheme: e.g. per default slice 0 is always root " / ", slice 1 is always swap, slice 2 always covers the entire disk from first sector to the last sector and is reserved for Solaris-internal use (this by accident also makes sure that normal partition programs get confused like hell when they see that the third partition overlaps with the rest ... but this is "normal" here!), slice 3 is always /export, slice 4 is always not really defined, slice 5 is always usually used for /opt, slice 6 is always /usr, and slice 7 is always /home ... and there are always exactly these 8 partitions, slices 0 - 7 on each Solaris disk. Not more. Not less. And nothing else .... usually.

Trust me, you don't want the Mint installer (or any other Linux installer) do this to you. Being able to tell the installer about your partitioning wishes is precisely what you as home user want. An installer that would enforce the "right" partitioning scheme whether you want it or not would make you very unhappy.


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest