How To: Partition your Hard Drive.

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Re: How To: Partition your Hard Drive.

Postby Eric Weir on Wed Jun 11, 2008 4:06 pm

mdd4696 wrote:Anyways, I've used scorp123's post to partition a drive for a small desktop/server running Ubuntu 6.10 with a 200GB drive (pretty much the system he designed his example for).

  • Primary (sda1) ext3 128MiB /boot/
  • Primary (sda2) ext3 4GiB /
  • Extended 182.18GiB (the rest of the drive)
    • Logical (sda5) ext3 8GiB /usr/
    • Logical (sda6) ext3 4GiB /var/
    • Logical (sda7) ext3 168.18GiB /home/
    • Logical (sda8) linux-swap 2GiB swap
Can anyone comment on this partition scheme? Does it seem reasonable?

I'm getting ready to install Mint 5 after having just installed Mint 5RC2, and I'm think of partitioning my drive roughly this way, allowing for difference in the size of the drives.

I have two questions: [1] Why is the swap partition at the end? I've heard it should be at the beginning, so it can be accessed more quickly. [2] I have two drives on my machine. How do I mount the second drive? Or do I leave it unmounted?

Thanks,
Eric Weir
Decatur, GA USA
Linux Mint 5
User avatar
Eric Weir
Level 2
Level 2
 
Posts: 93
Joined: Sat May 31, 2008 3:06 pm
Location: Decatur, GA USA

Linux Mint is funded by ads and donations.
 

Re: How To: Partition your Hard Drive.

Postby AK Dave on Wed Jun 11, 2008 5:42 pm

Usually swap should be at the beginning. There is some logic in the idea that swap should be in the "middle" or at least very close to /usr if that is a seperate partition, but ultimately swap should be either at the start or close to the data you'll be accessing the most so that the drive head is either close to "home" (not to be confused with /home) when accessing swap or doesn't have to move far from the data surge that is causing the swap.

When I partition a system with a seperate /boot, swap is the very next partition in line followed by the root filesystem.

That said, I think that the partition plan detailed above is needlessly complicated for a single-user single-drive home system. I submit that seperating /boot, /var, and /usr on a home system on a modern linux system doesn't offer any real advantages over a single-partition OS install with seperate partitions only for "data" and swap. If you have multiple drives, distributing the filesystem across multiple drives offers some performance advantage but arraying multiple drives in a raid does this even better.

Do you have specific application reasons to actually need seperate partitions for /var and /usr?

There are some security advantages to a seperate /home and it offers some advantages for OS upgrades.

Also, never never never us a journaling file system for a /boot partition, and you don't need it for a / partition either. You have more file system overhead and you needlessly delay your cold boot time with random file system checks. For a single partion install, a journaling file system is good if and only if you routinely churn through different software packages, installing and removing. If you can be trusted to have a stable install, a nonjournaling filesystem for the OS install is acceptable and "lighter".

This is suggestion #1:
Primary (sda1) ext2 /boot 128meg
Primary (sda2) swap swap 2gig
Primary (sda3) ext3 / 12gig
Extended
- Logical (sda5) ext3 /home 1gig
- Logical (sda6) ext3 (the rest of the drive)

This is suggestion #2:
Primary (sda1) swap swap 2gig
Primary (sda2) ext3 / 12gig
Primary (sda3) ext3 /home 1gig
Extended
- Logical (sda5) ext3 (the rest of the drive)

Why in #2 do I have an Extended partition when none is needed? Subdividing an Extended partition is simpler than playing with Primary partions. If you trust that your partition table will be stable, then use a Primary for this last partition.

The advantage to a seperate /home is keeping your .config files for various software from distro to distro. The disadvantage is the same as the advantage. By partitioning seperately for your user data (typically: video, music, isos, downloads) you make it easy to backup this junk, even easier to backup /home, and you simply create symlinks between the data partition and /home/user for folders that you want directly accessable. This also makes it much much easier to share multimedia or other big file libraries between different users. This also makes it much easier to encrypt, hide, or otherwise make invisible files that you don't want visible.

I suggest layout #2, and further suggest that you configure TWO seperate 12gig "/" partitions. Use one for your primary OS install. Use the other with grub for an alternate OS install, or a "dirty" OS install to field test software packages. It is a very good thing to be able to test drive software in a "safe" environment.
User avatar
AK Dave
Level 6
Level 6
 
Posts: 1042
Joined: Wed May 14, 2008 3:39 pm
Location: Anchorage, AK USA

Re: How To: Partition your Hard Drive.

Postby Eric Weir on Wed Jun 11, 2008 9:18 pm

AK Dave wrote:Do you have specific application reasons to actually need seperate partitions for /var and /usr?
No. I was just going with what the guy back at the beginning of the thread, the one with long experience as a Unix system administrator, recommended.

This is suggestion #2:
Primary (sda1) swap swap 2gig
Primary (sda2) ext3 / 12gig
Primary (sda3) ext3 /home 1gig
Extended
- Logical (sda5) ext3 (the rest of the drive)

If I read you correctly, this is how I have my system at this time, i.e., prior to the fresh install I' planning, and the way I would have partitioned it in the fresh install if I hadn't come across the suggestions at the beginning of this thread.

As I understand it, you've basically got three usable partitions, sda1/swap, sda2/root, and sda3/sda5/home. I don't understand why sda3 is needed. [Actually, my current install has only sda3/home (the rest of the drive)].

Also unclear about the primary, extended, and logical distinctions and relations among them.

I suggest layout #2, and further suggest that you configure TWO seperate 12gig "/" partitions. Use one for your primary OS install. Use the other with grub for an alternate OS install, or a "dirty" OS install to field test software packages. It is a very good thing to be able to test drive software in a "safe" environment.

Makes sense. However, my machine has only 40 Gb drives. I'm probably going to be getting a new machine soon, and I'll keep this in mind for then. The second 12Gb partition comes immediately after the first?

My last question. I have two 40 Gb drives. I want to use the second for backing up data. It will have only one partition. Any problem with that? And how do I mount it?

Since you mounted both of your 12 Gb partitions as "/," can I mount it as /home? I.e., can I have two /home partitions? [I didn't know how to mount it last time, so I didn't, and as a result I don't have access to it.]

I really appreciate your help.

Sincerely,
Eric Weir
Decatur, GA USA
Linux Mint 5
User avatar
Eric Weir
Level 2
Level 2
 
Posts: 93
Joined: Sat May 31, 2008 3:06 pm
Location: Decatur, GA USA

Re: How To: Partition your Hard Drive.

Postby AK Dave on Thu Jun 12, 2008 12:29 am

Two drives? 40gb each?

Put the OS on one drive, the swap at the root of the other drive. Why? Because when the drive with binaries is working hard, the other drive will be at rest so a swap based at the root of this idle drive will be accessed quicker than one based anywhere on the busy drive.

Primary/Extended/Logical. Your drive can only have 4 Primary partitions. One Primary partition can be an Extended partition. An Extended partition can have one or many Logical partitions.

/home: as a seperate partition, this makes it easy to keep user .config files seperate. If and when you reinstall the OS, the /home partition can be rolled from one install to the next rather seamlessly. There is a little extra work in this, but usually less than backing up all of the user data in /home and restoring it with a new install. You want enough space for .config data, email, etc, but don't need to allocate /home space for music/video/multimedia/etc. Use one or more seperate partitions for data.

The advice you were following was from someone with experience administering larger unix/linux systems than you're talking about. Multiple drives. Lots of users. Server, not desktop. Different logic and organization applies.

Do you want to be able to have two OS installs on the same machine? I prefer this, because it allows me to have a "stable" day-to-day install that I use routinely, and one or more "experimental" installs. My trio at the moment is Kubuntu-KDE4 with proposed/unsupported, Elyssa stable+proposed, and Daryna-KDE3. Each install has its own /home folder as part of the / partition, but all share media off of a seperate shared partition. For an "alternate" install, a 12gb partition is overkill. Unless you plan to do a lot of development work. But if you just want a place to install a distro to play with it without fragging your main everyday install, 4-6gb is sufficient for all but the most bloated distros. And if your hardware is based around a pair of 40gb drives, you likely don't have the muscle to be playing with big compiz-heavy DVD-based distros. Like Sabayon.

Here's my table:
sda
Primary (sda1) swap swap 1.8gb
Primary (sda2) ext3 / 12gb
Primary (sda3) ext3 / 12gb
Extended
Logical (sda5) ext3 / 12gb
Logical (sda6) ext3) - remainder

2 drives? 40gb each? How much RAM do you have? What sort of processor do you run? I'll make some assumptions: 1gb, 32bit AMD.

Here's my suggestion:
hda
Primary (hda1) ext3 / 11gb
Logical (hda2) ext3 /home 1gb
Extended
Logical (hda5) ext3 - 28gb
hdb
Primary (hdb1) swap swap 2gb
Primary (hdb2) ext3 / 10gb
Extended
Logical (hdb5) ext3 - 28gb

Why? Swap on the secondary drive makes it faster. Small distro partition on secondary drive for testing and for emergency use. The /home is seperated from the primary /, but not the secondary /. This allows plenty of space for user .config files and "stuff". Create symlinks to data on the big storage partitions for ease of access to media files.
User avatar
AK Dave
Level 6
Level 6
 
Posts: 1042
Joined: Wed May 14, 2008 3:39 pm
Location: Anchorage, AK USA

Re: How To: Partition your Hard Drive.

Postby melbo on Thu Jun 12, 2008 1:27 am

Great thread. I'm getting ready to redo my HD and I'm like a few others that have grown beyond my partitions. (Tri boot XP, Mint and Os X) I had separated my / and my /home but because Mint installer stuck my "data" directories on that /home partition, I kept them there. I am currently running no swap on the 2 gB system... So I now want to pull off my 'data' from /home and add a swap. I have run 'swapless' since I installed Daryna and have never had an issue...


What happens when I run with no swap partition or file?
melbo
Level 2
Level 2
 
Posts: 67
Joined: Fri Jan 04, 2008 11:57 pm
Location: WA, USA

Re: How To: Partition your Hard Drive.

Postby Fred on Thu Jun 12, 2008 8:24 am

melbo wrote:
What happens when I run with no swap partition or file?


Actually, in most cases, almost nothing. Most general purpose desktops with 2 Gig or more RAM rarely need to go into swap. When it does need to go into swap however, it will be noticeably slower. The exception would be if you are running virtual machines. They consume lots of RAM so having a swap partition in that case would be wise.

Having said that, the Linux kernel expects to have a swap partition available. There are some other situations, rare on a GP desktop, that not having a swap partition available can also cause slow downs.

For those looking at a reinstall, you might also want to read the thread below regarding things to consider before installing.

viewtopic.php?f=90&t=11872

For those looking for a back-up solution you might look at my back-up / restore and clean-up script. It is at version 1.2 now and I am currently testing version 1.3, which will be more flexible and have more options. It should be posted to the below thread replacing version 1.2 in a few more days.

viewtopic.php?f=42&t=12988

Hope this is helpful.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: How To: Partition your Hard Drive.

Postby Eric Weir on Thu Jun 12, 2008 4:41 pm

AK Dave wrote:Put the OS on one drive, the swap at the root of the other drive.

I understand everything that follows.
Do you want to be able to have two OS installs on the same machine?

It's occurred to me, though my motives would probably be a little different than yours, i.e., just to try out different distributions, rather than unstable releases, etc.
2 drives? 40gb each? How much RAM do you have? What sort of processor do you run?

Two drives, 40 Gb each, one 7200 rpm, the other 5400. P4 1.6 Ghz, 512 Mb.
Here's my suggestion:
hda
Primary (hda1) ext3 / 11gb
Logical (hda2) ext3 /home 1gb
Extended
Logical (hda5) ext3 - 28gb
hdb
Primary (hdb1) swap swap 2gb
Primary (hdb2) ext3 / 10gb
Extended
Logical (hdb5) ext3 - 28gb

Most of this I understand, some things I don't. [1] 1 Gb /home is enough, even if you separate data from .config files and email? [2] No mount points for the two extended partitions? [3] Symlinks? I've heard of them. Have no idea how to establish them. Sounds more complicated than having data files in /home.

Still don't understand primary/extended/logical. No more than four primary per drive. One primary can be an extended. [Only one? Only one per drive period?] An extended can have many logical. [Logical is a distinction within extended? What's the primary/extended distinction? Primary can't be subdivided?] Why these different types? Why not just one type?

Thanks again,
Eric Weir
Decatur, GA USA
Linux Mint 5
User avatar
Eric Weir
Level 2
Level 2
 
Posts: 93
Joined: Sat May 31, 2008 3:06 pm
Location: Decatur, GA USA

Re: How To: Partition your Hard Drive.

Postby AK Dave on Thu Jun 12, 2008 5:33 pm

1. The 1gb /home should be more than enough if you don't use it for bulk media storage. Music, Video, etc can all be very bulky. It is bad practice to download direct to the desktop (/home/username/Desktop) and files should be directed to folders as appropriate. The bulk of these would be expected to be directed to folders outside of /home and thus can easily be on a seperate partition.

2. Mount points are at your discretion for the "non-core-filesystem" extra partitions. I mount my internal data/media/junk/download partition as "/Local" but it could just as easily be mounted as "/media/warez" or whatever you want to call it. With two drives, you might have /thing1 and /thing2 or /media/thing1 and /media/thing2 depending on what you prefer. You can edit your fstab (/etc/fstab) as necessary if you have a particular way you want them mounted. If you don't designate mountpoints for those drives, they can still be mounted. They'll show up as /media/hda5 and /media/hdb5.

-sidenote:fstab-
If you have multiple swap partitions across multiple drives (internal, external, usb-stick) you can mount them in fstab in a specific order OR you can give one of them an obnoxious priority (bash script or manual terminal). My laptop has a 1.8gb swap partition on the hard disk. This is just part of a polite linux install. The kernel expects to see a swap, so I provide one gratis. But if I am actually expecting to NEED a swapfile, I plug in a usb stick and mount it as a swapfile. Using a usb stick (flash memory) for random access swap is vastly more efficient than a hard drive, so I give it an obnoxious priority (32768) so that if I do need to swap it goes there first.

3. Symlinks are awesome. Open nautilus. R-click a folder. There's the option to create the link. Can't remember if this is Nautilus or just Konquerer (I'm usually a KDE guy so I usually run Konq), but in Konquerer you drag-drop a folder and it asks if you want to move, copy, or create a symlink. Can't get much easier than that. A symlink is a genuine real file system item sitting in a folder that is a pointer to another folder or file of another name and/or location. The name symlink means "symbolic link". Generically, Nautilus creates symlinks in the same directory as the original file with the name "Link to Foldername", and then instead of drag/drop the file you drag/drop the link where you want it. Rename the link. Bobs your uncle.

Here's how I use them:
1. In my /Local drive there is a folder called /Music (/media/Local/username/Music). All my music goes there. Its a nice arrangement. If I want access to that music from my desktop, Banshee, an app, anything else, I could direct the entire path name. But I'm lazy and don't like to do that. I also like being able to drag/drop from my home (/home/username) into the music folder. So I deleted the /home/username/Music folder created by default and replaced it with a symlink pointing the way to the real folder on the /Local drive.
2. Video is big and bulky. I don't like to store video (avi files, dvd isos) on my hard disk. I use k9copy to create iso images of dvd video for backup purposes, but an iso image of a commercial dvd is around 8gig. I put these iso files on an external hard drive. I create a symlink in my home folder pointing the way to the actual location on the remote drive, which needs to be mounted at the time the symlink is created but can then be dismounted. When the drive is mounted, the symlink is active.

The other question about primary/extended and the "rules": well, those are the rules. I didn't make them up and they're stupid, but those are the rules for partition tables. Some genius thunk them up decades ago and we're stuck with them. The distinction between Primary and Extended is made in the partition table. The last Primary partition may be created as an Extended partition. An Extended partition is a Primary partition with some special features. Used to be we only had Primary partitions. Now we also have Extended partitions. An Extended partition is a useless designation without a Logical partition within it. Otherwise it is just an empty placeholder. Why is it this way? Because it is.

Okay, P4 & 512mb RAM?
You actually should have a swapfile, unless you run a mini-linux (Damn Small, Puppy, etc), and will probably use it. Your CPU can address a max of 4gb ram, but your BIOS might limit that to 3gb. Your swapfile should be a minimum of 1gb, and you could theoretically have up to 3gb of swap but by that time your CPU will be spending so much time swapping that no work will get done. Limit swap on hda to 512mb and add another 1024mb on EITHER hdb OR a usb stick. My preference, given your RAM constraints, would be for you to plug a 1gb usb stick into the back of your computer as a permenant addition and mount it as swap, permenantly. It will be cheaper than doubling your ram (you need oldschool DDR, which will be either pricey and new or cheap and used), and almost as good (better than buying someone's old burnt-out DOA ram anyways). With a usb stick as your priority swapfile and swapping=100 you should be in good shape. But at that point we're bridging into a couple different moderate-skill how-to articles on "usb stick swap" and "swap performance tweaks".
User avatar
AK Dave
Level 6
Level 6
 
Posts: 1042
Joined: Wed May 14, 2008 3:39 pm
Location: Anchorage, AK USA

Re: How To: Partition your Hard Drive.

Postby Fred on Thu Jun 12, 2008 8:40 pm

AK Dave,

It is so nice to see somebody post on this topic that actually "gets it right" instead of posting myths and hearsay. :-)

Use the below to create a symlink:

ln -sf target_file/foldername symlink_filename

Example:
............ target folder/file path .........symlink path/name
ln -sf /media/sda7/Music/Country /home/fred/CountryMusic

If you are in the folder you wish to create the symlink in you don't need the path for the symlink, just the symlink name.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: How To: Partition your Hard Drive.

Postby infamous on Fri Oct 03, 2008 9:29 pm

Disclaimer: I'm a noob.
Observation: If you use swap a lot put it near the bigging and near the /
Seems all too obvious to me.
Putting it after the /home seems kinda dumb.
infamous
Level 2
Level 2
 
Posts: 73
Joined: Mon Aug 04, 2008 4:21 pm

Re: How To: Partition your Hard Drive.

Postby JohnS on Wed Jan 14, 2009 1:05 am

scorp123 wrote:
9812713 wrote:I deleted my 1 BIG partition, and broke it into 3 separate partitions. I have used the following sizes to reflect my system settings.

HDA1 - Size = 1.4 GB -- Mount Point = LINUX-SWAP (2.5 x Ram Size)
HDA2 - Size = 4 GB -- Mount Point = / (top level) Type: RieserFS
HDA3 - Size = 30+ GB -- Mount Point = /Home Type: RieserFS
Bonus: Add a hda4 - size = 8GB == Basically this can be used to install windows ...
So you installed your entire OS into one single " / " root partition ??? :shock:
Why oh why would one do such a thing!?

9812713 wrote:Now the beauty of this setup is
Beauty?! Ahemmmm ... no. Putting the entire OS into one single partition is bad bad bad bad bad!

It's a somewhat forgiveable mistake recent converts and ex-Windows users make, but this is definitely not the right way to do this!


Partitioning - UNIX style

Working fullt-time as UNIX + Linux support engineer for a really big company I shall be so arrogant and simply claim that I know what I am talking of.

Putting the entire operating system into one single partition is a big "No" ... It's a mistake ex-Windows users often make because they don't know it better. OK, we shall forgive them. But if you as administrator do this in a live environment with critical applications running on the machines you will get your head whacked off -- either by "friendly" colleagues such as myself or we will make sure the responsible manager will do it. Can you say BOFH?

Why this is a bad idea: Please read this article: http://www.hccfl.edu/pollock/AUnix1/Partitioning.htm

Basically, if something goes wrong and you have everything in one single partition, repairing this will be very hard.

Having your stuff broken up into the various UNIX-style mount-points has vast advantages here, as any broken partition can be mounted individually and independently from the main " / " root partition.

How I partition my disks (work + private!)

Before exploring this we should take a look what mount-points a typical UNIX and/or Linux system has. And I will sort them here by read/write access likeliness - meaning: Those mount-points which will mostly be read are on the top, followed by mount-points which mostly will get written to:

    /boot -- contains the boot loader and boot menu. Is mostly read at boot time, has only limited numbers of write accesses. Because of its importance this should be the first Linux partition on the disk.

    / -- contains all the other filesystems, plus important locations such as /etc, /sbin, /lib, and many other important places that cannot exist on separate partitions. Can have some limited write accesses (e.g. temporary files in /tmp) but for the most of the time only gets read accesses. Because of its importance for the boot process this partition should be right after the /boot partition (otherwise the heads of the disk have to move a lot, especially during the boot process ...)

    /usr -- contains all the binaries and the X11 graphical interface (e.g. /usr/X11R6) and libraries that don't belong to the OS proper but rather to an application somewhere somehow (e.g. /usr/lib). Only gets bigger write accesses when applications get installed or someone compiles a kernel (the kernel sources are usually located in /usr/src/linux), other than that this mount-point mostly gets read from not written to. Because of its importance for the boot process and overall significance for the functioning of the system this partition should be right before or right after the " / " partition.

    /opt -- some distributions use this for optional stuff, e.g. non-essential tools (from the system's point of view!) such as GoogleEarth and other things that are considered "nice to have" but not really "must have or the system won't work without it". This partition can be anywhere on the disk, but I personally prefer to place it before /var ...

    /srv -- some distributions use this to run their WWW and/or FTP servers in there. Sometimes admins chose to create this mount-point as some sort of "sand box" in which they run their network services. Can have some fair amount of write accesses, especially if you have stuff running in there that produces logs.

    /var -- used for variable data. Usually your system logs are in there (e.g. /var/log/* ), some distributions use it for the WWW pages that are being served (e.g. /var/www). Gets mostly written to, and then a lot!

    /home -- where the users place all their stuff. Bookmarks, config files created by all the various applications and desktops, all one's personal files, and all the stuff you do all day ends up here. Gets read and written to like mad.

So ... given how certain mount-points get written to a lot and others don't, I'd order them the way as written above. Now let's assume you have a 100 GB disk you want to partition, and you will use your system for WWW (e.g. to host your personal homepage on it + a small forum?) and maybe for some FTP (e.g. to exchange files easily with other users?), here is the partitioning I would suggest:

    /dev/hda1: /boot, 50 MB min., 150 MB max.
    /dev/hda2: /, 2 GB min.
    /dev/hda3: extended partition, up and until the end of the disk
    /dev/hda5: /usr, at least 5 GB
    /dev/hda6: /opt ... if you want it. 2 GB should be enough
    /dev/hda7: /srv ... if you really want it. At least 4 GB
    /dev/hda8: /var ... at least 2 GB.
    /dev/hda10: /home ... at least 75-80 GB if we take a 100 GB disk as basis
    /dev/hda11: swap ... 2x the size of your RAM, but not more. If you have like 2 GB RAM, then 1x the size of your RAM should be enough.

Now, the beauty in this setup is that first of all it's properly partitioned and less likely to give you headaches, and the second aspect is that all the partitions with lots of read accesses are concentrated towards the beginning of the harddisk and thus can be read faster whereas the partitions which will get lots of write accesses and which are more likely to fragment a little are towards the end of the harddisk (towards the physical center as stated by someone else further down in this thread).

This is how it's supposed to be done.

Suggestions and flame messages welcome :lol:


EDIT: some factual errors about where harddisks begin or end corrected ... :wink: Thanks to all :D



this is exactly where alot of my problems stem from now i am running
mint 5 Elyssa main edition
u think you could break down that partion table in bytes so i i know what to type in
or tell me how to break that down
A Windows user will not endear himself by bringing his habitual attitudes over to Linux, to put it lightly....The Newbie with His Foot in His Mouth
JohnS
Level 1
Level 1
 
Posts: 20
Joined: Sat Jan 10, 2009 1:25 pm

Re: How To: Partition your Hard Drive.

Postby chowanec on Wed Jan 14, 2009 2:02 am

1MB = 1024 bytes

Just multiply the math from there...?

:)
chowanec
Level 3
Level 3
 
Posts: 107
Joined: Fri Dec 14, 2007 11:59 am

Re: How To: Partition your Hard Drive.

Postby mikedeerf on Fri Jan 16, 2009 9:15 am

1MB = 1024 bytes


Also, 1GB = 1024MB.
If your using GParted, it asks you to set partition sizes in MB. If, for aesthetic reasons, you want your partitions to be even GB numbers, just take what you want in GB * 1024 to get the number to punch into GParted.

ex: 5GB * 1024 = 5120 MB; 60GB * 1024 = 61440 MB.

Speaking of GParted, the GParted Live CD is awesome. http://gparted.sourceforge.net/livecd.php
(as far as this newbie can tell, you can't edit partitions while they're mounted, so you can't modify your Mint / partition from inside of Mint - this is where the GParted CD comes in). I suppose you could use the Mint Live CD too, but it takes longer to boot and such.

One tangent: do be aware that with the GParted Live CD, you're running with root permissions. So don't open a terminal and start typing commands if you don't know what you're doing (last night for instance, I accidentally ran chmod on every file in my Mint 5 partition, which really hosed things. Thankfully, I'd used GParted to back that partition up 2 hours earlier, so I just restored the partition back. But that could have been very, very bad.)
mikedeerf
Level 1
Level 1
 
Posts: 2
Joined: Tue Jan 13, 2009 5:10 pm

Re: How To: Partition your Hard Drive.

Postby mintyed on Mon Mar 16, 2009 2:06 am

i need to know how to set up a Linux mint hard drive from scratch

I want to partition most of it for Mint and some for XP

mint tells me i need to allocate a swap file what is this and do i need it

This is so confusing and different from XP so where to begin. Xp only needs one partition and its easy. no swap needed.
Enjoy It
Linux is many things to many people.
If you use it and it fits your needs enjoy it.
User avatar
mintyed
Level 2
Level 2
 
Posts: 89
Joined: Mon Mar 16, 2009 1:58 am

Re: How To: Partition your Hard Drive.

Postby altair4 on Mon Mar 16, 2009 7:26 am

Xp only needs one partition and its easy. no swap needed.

Actually, that is not correct. WinXP does indeed need a swap file but it creates one automatically. In Windows the swap file is called pagefile and it's default location is C:\pagefile.sys.

Also, there is no law that states that you have to create a separate partition for every single linux directory. You could just create 2: "/" and "swap".
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5817
Joined: Tue Feb 03, 2009 10:27 am

Re: How To: Partition your Hard Drive.

Postby viniciuscortez on Sun Mar 29, 2009 2:31 pm

Question:

Once I partition my hd in / and /home, what should I do before installing a new system? Should I wipe out everything on my home folder but my own stuff (cleaning all the hidden paths), or having those directories will somehow help my new system to read my configs?
viniciuscortez
Level 1
Level 1
 
Posts: 15
Joined: Tue Mar 10, 2009 5:46 pm

Re: How To: Partition your Hard Drive.

Postby newW2 on Sun Mar 29, 2009 3:00 pm

You should tell us what your goal is. For example:
What are your trying to accomplish? Are moving from one Mint version to another, or from Ubuntu (or an unbuntu based system) to another unbuntu based system.
Do you want all the same packages installed?
What do you want to do if the new install fails - reload a backup of the current OS?
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Re: How To: Partition your Hard Drive.

Postby viniciuscortez on Sun Mar 29, 2009 4:44 pm

I'm currently moving back from pclinuxos to mint 6 (hopefully to mint 6 KDE the moment the final version is released). I don't need all my configurations to be kept, because I only tested that distro for about two weeks. What I'd like to know is:

When I [re]install mint and set this data partition mountpoint to /home/vinicius, the new system will automatically recreate the needed system folders (in the case I delete them), as well as keep intact my Pictures, Movies, Documents, etc folders, or will it overwrite their content?

My hd is partiotioned in three: a filesystem "/"; a swap space; and a data partition "sda" mounted on /home/vinicius/
viniciuscortez
Level 1
Level 1
 
Posts: 15
Joined: Tue Mar 10, 2009 5:46 pm

Re: How To: Partition your Hard Drive.

Postby newW2 on Tue Mar 31, 2009 11:15 pm

If your data partition is truly not on the same partition as root or home then your data should be safe. There are some good how to posts, the wiki also has a good section on partitioning and install. And don't forget the users guide (theres a link on the Linuxmint.com/start page). Referencing that guide look at page 18. Note the format column has a check box - don't check it on that data partition.
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Re: How To: Partition your Hard Drive.

Postby viniciuscortez on Thu Apr 02, 2009 3:07 pm

Then in order to make mint read my partition all I need is to set the mounting point, without checking the format box!

Thanks!
viniciuscortez
Level 1
Level 1
 
Posts: 15
Joined: Tue Mar 10, 2009 5:46 pm

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 10 guests