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

Re: How To: Partition your Hard Drive.

Postby marcus0263 » Tue Oct 20, 2009 6:22 pm

MintyCat wrote:<snip>
And now, finally, my partitioning scheme, followed by some questions:

HDD -- 500GB

/dev/sda1: /boot [150 MB]
/dev/sda2: / [20GB, because here apps get installed, right? so I need some space]
/dev/sda3: extended partition, up and until the end of the disk
/dev/sda4: /usr [5GB, what's this for?]
/dev/sda5: NFTS (Factory_Image)
/dev/sda6: /opt [2GB, is that enough or those files get stored in / if this partition doesn't exist?]
/dev/sda7: /var [2GB, do I need this if I'm not running a server?]
/dev/sda8: /home [Rest of the disk]
/dev/sda9: swap [3GB, since I have 3GB RAM]

Supposedly I don't need /srv since I don't run a server, right? :?

Nope, don't need /srv

MintyCat wrote:And I already have an Windows partition, which contains a recovery image of Vista, and I think it's located in between /usr and /opt. Is there any problem with that? If there is, how can I work it out? :?

Yep, it'll be fine

MintyCat wrote:And can someone explain to me how do I make that extended partition? What's it for?

"extended" get by the hard set 4 partition limitation, by created an "extended" slice you can therefore create more slices in the "extended" slice.

MintyCat wrote:Hopefully I haven't got you guys bored, or actually sleeping, I just like to make my contribution to the project the way I can, giving suggestions and participating on the forum. At least for the moment, because I plan on helping much more. Thank you all guys for your time! :D


I though would change your scheme to this -
/dev/sda1: /boot [150 MB]
Fine

/dev/sda2: / [20GB, because here apps get installed, right? so I need some space]
Don't really need this much, I would only have 10 - 12 GB at most here

/dev/sda3: extended partition, up and until the end of the disk
Yep

/dev/sda4: /usr [5GB, what's this for?]
Fine, maybe even bump it up to 8 GB. This is where most of your programs and libraries are stored

/dev/sda5: NFTS (Factory_Image)
Fine

/dev/sda6: /opt [2GB, is that enough or those files get stored in / if this partition doesn't exist?]
You could remove this completly, not many programs us the /opt file system, some do though and it's safe to be on the root slice

/dev/sda7: /var [2GB, do I need this if I'm not running a server?]
You're going to run into issues with only 2GB here IMO. I would bump this up to at least 5 GB. I also recommend having a slice for /var/log at around 256 MB, this will prevent a misbehaving daemon filling up the logs to bleed over and corrupting critical system files. I always put /var/log on it's own slice.

/dev/sda8: /home [Rest of the disk]
Yep

/dev/sda9: swap [3GB, since I have 3GB RAM]
Don't need this much, I'd personally cut it down to 512MB. But if you plan on using "suspend to disk" (which I never do) you will need a bit over the amount of RAM you have installed. If you're going to use "Suspend to Disk" I'd go amount of RAM + 128 - 256 MB
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

MintyCat
Level 1
Level 1
Posts: 12
Joined: Sun Sep 27, 2009 7:58 am

Re: How To: Partition your Hard Drive.

Postby MintyCat » Tue Oct 20, 2009 7:34 pm

marcus0263 wrote:"extended" get by the hard set 4 partition limitation, by created an "extended" slice you can therefore create more slices in the "extended" slice.

I though would change your scheme to this -
/dev/sda1: /boot [150 MB]
Fine

/dev/sda2: / [20GB, because here apps get installed, right? so I need some space]
Don't really need this much, I would only have 10 - 12 GB at most here

/dev/sda3: extended partition, up and until the end of the disk
Yep

/dev/sda4: /usr [5GB, what's this for?]
Fine, maybe even bump it up to 8 GB. This is where most of your programs and libraries are stored

/dev/sda5: NFTS (Factory_Image)
Fine

/dev/sda6: /opt [2GB, is that enough or those files get stored in / if this partition doesn't exist?]
You could remove this completly, not many programs us the /opt file system, some do though and it's safe to be on the root slice

/dev/sda7: /var [2GB, do I need this if I'm not running a server?]
You're going to run into issues with only 2GB here IMO. I would bump this up to at least 5 GB. I also recommend having a slice for /var/log at around 256 MB, this will prevent a misbehaving daemon filling up the logs to bleed over and corrupting critical system files. I always put /var/log on it's own slice.

/dev/sda8: /home [Rest of the disk]
Yep

/dev/sda9: swap [3GB, since I have 3GB RAM]
Don't need this much, I'd personally cut it down to 512MB. But if you plan on using "suspend to disk" (which I never do) you will need a bit over the amount of RAM you have installed. If you're going to use "Suspend to Disk" I'd go amount of RAM + 128 - 256 MB


Oh. So let me see if I caught the drill...

/dev/sda1: /boot [150 MB]
/dev/sda2: / [15GB, just in case]
/dev/sda3: extended partition, up and until the end of the disk [in which /usr, /var, /home and swap are included, right?]
/dev/sda4: /usr [10GB, since I like to install stuff :P]
/dev/sda5: NFTS (Factory_Image)
no more /opt, since whatever was supposed to be here it will be stored in /, am I right?
/dev/sda7: /var [5GB, but how do I make a slice for /var/log? Make /var extended?]
/dev/sda8: /home [Rest of the disk]
/dev/sda9: swap [512MB? Even if I want video editing, compiz and games?]

Thank you very much for your help and quick response :D

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

Re: How To: Partition your Hard Drive.

Postby marcus0263 » Tue Oct 20, 2009 8:30 pm

MintyCat wrote:Oh. So let me see if I caught the drill...

/dev/sda1: /boot [150 MB]
/dev/sda2: / [15GB, just in case]
/dev/sda3: extended partition, up and until the end of the disk [in which /usr, /var, /home and swap are included, right?]
/dev/sda4: /usr [10GB, since I like to install stuff :P]
/dev/sda5: NFTS (Factory_Image)
no more /opt, since whatever was supposed to be here it will be stored in /, am I right?
/dev/sda7: /var [5GB, but how do I make a slice for /var/log? Make /var extended?]
/dev/sda8: /home [Rest of the disk]
/dev/sda9: swap [512MB? Even if I want video editing, compiz and games?]

Thank you very much for your help and quick response :D

You'll need to move slices around, but remember this

swap should to be your last slice
/home next to last
/var/log
/var

Don't loose any sleep over that though, but it's best due to those file systems are written to the most, thus should be on farthest out to the edge of the disk. It's just "good form" to set it up that way. Here's how I would slice up a disk

sda1 /boot
sda2 /
sda3 /usr/src
sda4 extended
sda5 /usr
sda6 /var
sda7 /var/log
sda8 /home
sda10 swap

As for creating a new slice for /var/log you'll need to use gparted which is the easiest for noob's. You can use it to resize, create new slices, delete slices, etc.

Now for the question about the swap, if you're nailing your swap for anything over a few meg here and there you've got bigger things to worry about. I've got my swappiness set to 5 and I very rarely touch it, 512MB should be more than enough. And yes I use the Gimp and have all the 3D eye candy turned on
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
atlef
Level 4
Level 4
Posts: 306
Joined: Sun Nov 18, 2007 8:20 am
Location: Stavanger NORWAY
Contact:

Re: How To: Partition your Hard Drive.

Postby atlef » Wed Oct 21, 2009 12:45 am

/dev/sda1: / 10gb (filesystem ext4)
/dev/sda2: swap 2gb (if you want to hibernate make this atleast the size of your ram)
make the rest /home (filesystem ext4) on an extended partition))

That is all you need.
This is my opinion, these may vary from person to person though.

atlef.

User avatar
mzsade
Level 5
Level 5
Posts: 750
Joined: Sun Jul 19, 2009 4:36 am

Re: How To: Partition your Hard Drive.

Postby mzsade » Thu Oct 22, 2009 9:40 am

Speaking of opinions, check out mine, whenever i have to install a new release/reinstall after i mess up, i do it on my ext 4 sda 3, this way my data partition (sda 2, ext 3 for stability) is undisturbed and the partitions are maintained in the "correct disk order".
You may also want to consider viking777's views here: http://forums.linuxmint.com/viewtopic.php?f=46&t=32578
Attachments
Screenshot.jpeg
Screenshot.jpeg (64.59 KiB) Viewed 10233 times
Linux User #481272 Reg: 15th Sept., 2008

rbpyogesh
Level 1
Level 1
Posts: 38
Joined: Mon Nov 23, 2009 5:55 am

Re: How To: Partition your Hard Drive.

Postby rbpyogesh » Mon Nov 30, 2009 3:19 am

I am a new user...I have used mint 7 for few days...and now using mint 8 as primary and only OS

I have formatted....the hard drive in this manner

Total of 120GB

Primary /---40GB

Logical /home---40GB

Logical /usr/local/--40 GB

According to my understanding after reading this topic home is where all the documents and files are stored.....and usr is where pacakages and other important files are stored.....Correct me If I am wrong

Can anyone suggest me whether this partition is Good or a Bad one

Thanks

brian927
Level 1
Level 1
Posts: 2
Joined: Sat Dec 26, 2009 1:48 am

Re: How To: Partition your Hard Drive.

Postby brian927 » Sat Dec 26, 2009 2:15 am

i have a win7 desktop im about to set up a dual boot on with this mint thanks for all the useful info in here, good stuff

bugmenotprettyplz
Level 2
Level 2
Posts: 92
Joined: Tue May 11, 2010 2:26 pm
Contact:

Re: How To: Partition your Hard Drive.

Postby bugmenotprettyplz » Wed Sep 08, 2010 11:46 am

Anyone care to come up with the suggestion regarding the latest Debian rolling release of Linux Mint with GPT(GUID)?

Would appreciate it a lot.
y8 | Miniclip | y3 | friv | ben10 |

alex30
Level 1
Level 1
Posts: 6
Joined: Wed Sep 22, 2010 1:43 am

Re: How To: Partition your Hard Drive.

Postby alex30 » Thu Sep 23, 2010 12:56 am

all the procedures are mentioned above and the another way when you do the partition all the instruction need to follow

bilbojr
Level 1
Level 1
Posts: 5
Joined: Fri Dec 24, 2010 9:24 am

Am wondering if I did this correctly?

Postby bilbojr » Thu Jan 06, 2011 11:18 am

Hello! What a great thread this is! :D
I am a newbie and this is my first post on these forums.
I have been very happy with Mint10 as I recently decided to completely quit Windows 'cold-turkey'. I am using the Gnome distro I believe - it is the 'standard' Mint 10 on the main linuxmint.com page.
I am wanting to try other distros so here is how I partitioned my HD the first time: (I know I can use a live CD and I do before installing it.)

sda1 ext3 / 10GB ~ Linux Mint 10 installed
sda2 ext3 / 10GB ~ I marked it 'do not use' until I installed Ubuntu on this partition
sda3 ext3 10GB ~ 'do not use this partition'
sda5 ext3 /home ~ rest of the HD, until swap
sda6 swap

I believe that the sda4 is the extended and was done automatically. The first 3 are primary. It is a 250gb HD.

So, my questions are:
1. Should I have used the sda2 and sda3 differently than the 'do not use now' option?

2. When I log into either Mint or Ubuntu - Mint for this discussion - I see a 10GB File System on my desktop - is this correct? I assume it is the Ubuntu, sda2 partition that is showing up.

3. I have read that many like to have a /boot slice for each one installed but to be honest I am pretty happy and proud that both OS's work on the first try! I believe scorp123 mentioned this was an ok setup, especially for beginners so do I NEED to have a /boot for each or am I OK?

4. Do software packages get installed to /home? Or somewhere else? Do I need to make another - important - partition for this? I am not worried about a little performance boost (yet) nor security (only one computer) and I don't mind re-installing & configuring (I enjoy it actually :shock: ). I just want the distros to work reliably and to be able to add one or change them out whenever I want.

Forgive my lack of correct terminology but I am trying to get it down!
Thanks for the great community support - made it much easier to quit Windows.

Bilbo

*Will post ss from gparted when i am able*
Last edited by bilbojr on Thu Jan 06, 2011 1:44 pm, edited 1 time in total.

User avatar
Murdock
Level 3
Level 3
Posts: 145
Joined: Fri Apr 02, 2010 11:23 pm
Location: Costa Rica

Re: How To: Partition your Hard Drive.

Postby Murdock » Thu Jan 06, 2011 12:21 pm

Heres a fresh install
Attachments
11.png
11.png (207.27 KiB) Viewed 8478 times
Pura Vida.
Arenal Botanical Garden
Lake Arenal, Costa Rica

bilbojr
Level 1
Level 1
Posts: 5
Joined: Fri Dec 24, 2010 9:24 am

Re: How To: Partition your Hard Drive.

Postby bilbojr » Thu Jan 06, 2011 5:41 pm

Continued from my original post a few above here. Dual boot different linux os on same hd.

Here is my partition:
sda1 - mint
sda2 - ubuntu
sda3 - not in use, saving for another distro

Here is my gparted ss:
Image

Now when I click 'Computer'
I have these choices:
250 GB HD : 10 GB File System
cd/dvd drive
printer
File System

My concern is that the 2 FS's have the same files inside when I open them. The first - 250gb... - has a series of numbers and letters at the top (folder title) like 56464564-as56-54d5-6454-54e545454454b54 or whatever they are (the letters are in the correct positions - not the actual numbers/letters). The second FS is '/'.

Is this going to be a big problem? Is something incorrect? Do I need to re-format or re-install?
Thanks so much!

Bilbo
Attachments
gparted.gif
gparted.gif (61.39 KiB) Viewed 8474 times

latie3822
Level 1
Level 1
Posts: 3
Joined: Fri Feb 25, 2011 6:08 pm

Re:

Postby latie3822 » Sat Feb 26, 2011 3:45 pm

Redhorse wrote:If you have already few partions then you get problem.
You can't pick one and use it. You must delete it first and make it again. You must go forward and back in the instal. to make this.
And you can't install grub were you like and you can not put it on floppy.
This is on all ubuntu dists.



Yes, I agree. I had this issue arise when I was doing this. I had to go back and delete the partitions I had already, and then I was able to make it again.

mariapeter12
Level 1
Level 1
Posts: 2
Joined: Fri May 20, 2011 3:01 am

Re: How To: Partition your Hard Drive.

Postby mariapeter12 » Fri May 20, 2011 3:14 am

There is an hidden danger in partitioning the hard drive as a lot of space can be "lost for use" due to bad partitioning.

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

Re: How To: Partition your Hard Drive.

Postby scorp123 » Fri May 20, 2011 5:32 pm

mariapeter12 wrote:There is an hidden danger in partitioning the hard drive as a lot of space can be "lost for use" due to bad partitioning.
In this time and age it is possible to resize the partitions if needed. The current partitioning scheme on my main desktop:

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             2.4G  323M  2.0G  15% /
/dev/sdd1             459G  216M  435G   1% /data2
/dev/sda9             8.0G  147M  7.8G   2% /tmp
/dev/sda1             130M   34M   95M  27% /boot
/dev/sda6             7.1G  3.7G  3.4G  53% /usr
/dev/sdc1             1.4T  969G  338G  75% /data
/dev/sda7             3.5G  604M  2.9G  18% /var
/dev/sda8             6.9G  864M  5.7G  13% /opt
/dev/sda11            543G  337G  200G  63% /home
/home/sysadm/.Private    543G  337G  200G  63% /home/sysadm


Sometimes I install a lot of apps and the space used on /usr will increase up to 6.5G .... Same with /var: too much stuff in /var/tmp or /var/cache can fill that partition pretty fast. And /tmp is safest on its own little partition where it can't cripple / with all those constant writes and reads. As these locations are not on the same partition like / it means that / can't get filled up ... because *that* (= a full root file system!) is *SUPER UGLY* effect-wise: your system turns into a half-dead zombie where nothing works properly, you can't start new programs, you can't kill the running ones .... Yuck. All this because / got filled 100%. So that's why I personally insist on keeping /boot, /, /tmp, /usr, /opt and /var on different partitions.

Matti L
Level 2
Level 2
Posts: 62
Joined: Sat Jun 04, 2011 9:30 am
Location: Finland

Re: How To: Partition your Hard Drive.

Postby Matti L » Sat Jun 04, 2011 9:45 am

I used to have a separate home partition, but now I only have / and swap because all my important files are on windows partition or separate hard drives and settings for Firefox and Chromium and synced with Firefox Sync and Gmail. I have 1 gb of swap in the end of the hd, but it's rarely used at all.

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

Re: How To: Partition your Hard Drive.

Postby scorp123 » Sat Jun 04, 2011 8:54 pm

Matti L wrote: all my important files are on windows partition
Sounds like a recipe for disaster :lol:

Just a few hours ago I could witness how a oh-so-rock-stable Windows 2008 R2 server crashed. Too bad it was that particular customer's file server and it had a few unique files .... But now? Not anymore. The disks were utterly and completely corrupted. Bye bye unique files.

And I don't hate Microsoft at all. In fact Microsoft makes selling Unix- and Linux-based products and services so easy lately :twisted: ....

Matti L
Level 2
Level 2
Posts: 62
Joined: Sat Jun 04, 2011 9:30 am
Location: Finland

Re: How To: Partition your Hard Drive.

Postby Matti L » Sun Jun 05, 2011 5:47 am

scorp123 wrote:Just a few hours ago I could witness how a oh-so-rock-stable Windows 2008 R2 server crashed. Too bad it was that particular customer's file server and it had a few unique files .... But now? Not anymore. The disks were utterly and completely corrupted. Bye bye unique files.
Hehe... that's why you have to have more than one backup place and why USB and NAT hd's are great. On my previous Compaq laptop the hard drive broke down and I lost everything on it and it only had Ubuntu on it, but when someone makes a good working ext4 or btfrs driver for Windows then I'll keep everything on the Linux partitions.

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

Re: How To: Partition your Hard Drive.

Postby scorp123 » Mon Jun 06, 2011 6:31 pm

Matti L wrote:
scorp123 wrote:but when someone makes a good working ext4 or btfrs driver for Windows then I'll keep everything on the Linux partitions.
You could put your files on a NAS with a set of mirrored disks? If one fails, you still have the other disks. And those home NAS solutions one can buy or build one-self these days (e.g. FreeNAS) are able to offer SMB-access for Windows and Mac OS X, so exchanging files between platforms _AND_ keeping them safe should be easy these days. I myself use a PC which has Solaris 11 Express on it. The filesystem is ZFS. And I regularly take ZFS snapshots of everything. If something fails or accidentally gets deleted I simply rollback that folder to a point in time when the file was still around. Works pretty much like Apple's time machine and it's rock-solid.

Matti L
Level 2
Level 2
Posts: 62
Joined: Sat Jun 04, 2011 9:30 am
Location: Finland

Re: How To: Partition your Hard Drive.

Postby Matti L » Tue Jun 07, 2011 5:07 am

Yes, I've read a lot of RAID configurations and something like this would be nice to have:
LinkStation Pro Quad LS-QVL/R5

Right now I just don't have much of files (just 6gb of music) to backup so I don't need much. That ZFS snapshot thing sounds interesting too. I'll read more about it later.


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 5 guests