How to install with manual partitioning (for older systems)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

How to install with manual partitioning (for older systems)

Post by xenopeek »

Read this first!!! This is an old tutorial and covers manual partitioning for older systems with legacy boot (MBR + BIOS). For modern systems you almost certainly are using EFI boot (GPT + UEFI) and that requires additional steps. For one you'll need to create a EFI boot partition (format as FAT32, at least 200 MB, mount point /boot/efi and the boot flag must be set). That goes beyond the scope of this tutorial.



By default the Linux Mint installer will create one root partition and one swap partition for you during installation. If you want to have a different set of partitions, for example a separate home partition, or if you want to specify the file system type, size or location of partitions, then you will have to use manual partitioning. It can get complex, especially when you have other operating systems installed. This is a simple example, to show you the basics. If you have a more complex situation and need advice on that, please make a new topic for that in the Installation & Boot forum.

This example uses Linux Mint 14 Cinnamon, but it is equally applicable to the MATE, Xfce and KDE editions (though KDE will look a bit different). I'll partition an empty 250 GiB hard disk, create a root partition, a separate home partition, and a swap partition. The steps for this are described below, with hints for slightly different situations. You can click the screenshots to zoom in, if needed.
  1. During the "Installation type" step of the installation, select to do "Something else".
    Image
  2. If this is an empty hard disk, or if you want to use the entire hard disk for Linux Mint, click "New Partition Table". You should skip to step 4 if you have partitions on your hard disk that you want to keep.

    Hint: if you have another operating systems installed, it is generally easier to use either its partition manager, or use the GParted partition manager included with Linux Mint, to make free space available (by resizing existing partitions) to install Linux Mint on before you start the installer.
    Image
  3. Click "Continue" to erase all current partitions and create a new partition table.
    Image
  4. Click the "free space" in the list to highlight it, then click the "Add" button to create a new partition in this free space.

    Hint: if you have existing partitions that you want to reuse, click those to highlight them and then click the "Change" button. Generally, you will want to set to use as an ext4 journaling file system, tick to format the partition (not needed for swap), and set the mount point as per the following steps (not needed for swap). If you do not want to erase the current files on the partition, do not tick to format the partition and make sure the file system you set matches the current file system used.
    Image
  5. First I'll create the root partition. Set the new partition size to how big you want it to be in megabytes (1 gigabyte = 1000 megabytes). I've configured 30000 megabytes (30 gigabyte), which is reasonable for average use. Set the mount point to / (forward slash), to indicate this will be the root partition. The other fields you don't need to change unless you have reason to. Click the "OK" button to create the partition.
    Image
  6. Next I'll repeat steps 4 and 5, to create the home partition. Set the new partition size to the remainder of the free space, but subtract the size you want for your swap partition (subtracting between 4000 and 5000 from the number shown will generally be enough). Set the mount point to /home, to indicate this will be the home partition.

    Hint: you can always change or delete the newly created partition if you made a mistake, and you can resize partitions later if you need to. You can do that by booting from the Linux Mint installation DVD or USB stick, and using the GParted partition manager.
    Image
  7. Next I'll repeat steps 4 and 5, to create the swap partition. Set the new partition size to the remainder of the free space, as in step 6 you deliberately left some free space for the swap partition. Set it to be used as swap area. You don't need to set a mount point.

    NOTE: If you are using Linux Mint 17.x and you intend to install with swap and you intend to use home folder encryption, consult the release notes of your Linux Mint version. There is a bug with home folder encryption installation that causes swap to be configured incorrectly by the installer. Swap will be configured fine when you don't use home folder encryption. Else read up on the links in the release notes about the bug and how to fix it.
    Image
  8. You can now review the partitions you created before you continue with the installation. Also, you have the option here to select where to install the boot loader. The default is fine if you have no other operating system installed or if you want Linux Mint to ask you at boot time which operating system to boot.

    If you want another operating system to ask you at boot time which operating system to boot, then change the device for boot loader installation to your root partition (/dev/sda1 in this example). Note that without additional software, Windows isn't able to ask you which operating system to boot.
    Image
Image
usbtux

Re: How to install with manual partitioning

Post by usbtux »

Last edited by usbtux on Sat Feb 09, 2013 5:10 pm, edited 1 time in total.
Orbmiser

Re: How to install with manual partitioning

Post by Orbmiser »

Nice shares for the new to partitioning. Thanks for sharing.
.
Enna

Re: How to install with manual partitioning

Post by Enna »

Thanks for your post here xenopeek.
After creating a separate home partition on installing Linux Mint 14, can I overwrite the partition with my OS on it with say, the next Mint version or any other Linux distro and still access the home partition with all files undamaged on it?

Thanks,
Enna
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: How to install with manual partitioning

Post by xenopeek »

Yes you could do that, using the manual partition option in the installer the next time you install. Instead of following the guide above and creating new partitions, you would click the "Change" button for each existing partition. For the root partition, you would set the mount point again to / and select to format it to the filesystem type of your choice (ext4 is current recommendation as a default). Same for the home partition, you would set the mount point again to /home but not select to format it. And lastly same for the swap partition, though swap doesn't have a format option. That way you install a new release, but keep your existing files in /home.

Downside of that approach is that preferences files and folders (generally hidden in your home folder, press Ctrl+H in your file manager to see them) might cause problems with the new release. This happens sometimes, with problems ranging from one application having problems starting until you clean its preferences, or (though rarely) having problems logging in successfully. It should generally work fine from one release to a next so I'm just putting this here as full disclosure, but if you skip releases the chance of running into such problems increases. As always, before your install a new release, make a backup of your important files!

An alternative some users (me included) have adopted to instead of a separate /home partition have a separate data partition. Documents, downloads, music, pictures and videos I store on the separate data partition (by linking the respective folders from my home folder to folders on that data partition). The steps are very similar to the above, though with a few extra steps. Benefit of this is that when you do a new install, you erase your preferences from your home folder also and so start with a clean install. I can detail that more if you would like, though as shared the separate /home partition would generally also work fine and is a little easier to do.
Image
Enna

Re: How to install with manual partitioning

Post by Enna »

Hi xenopeek,

First, thanks you a lot for your detailed answer! :o
The seperate data partition option sounds much more like what I think would be useful to do. If you have time, it would be great if you could describe this in more detail and than I'll go ahead and install 14 like that.

With our old MSI laptop, we had it a few times that we couldn't log in to the system after running it for a year or so or Mint wouldn't even start up in the first place after it did work for a long time, for these reasons, i want my data to be secure on a different partition.

So, thank you again for sharing your knowledge!

Regards!
Enna
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: How to install with manual partitioning

Post by xenopeek »

I've previously written a post on that, I think this is the one: http://forums.linuxmint.com/viewtopic.p ... 47#p659010. This shows how to add a data partition after you have already installed Linux Mint. To do so during installation, follow the manual partitioning steps above but instead of creating the second partition with mount point /home, create it elsewhere. From the linked post, in /mnt/disk2 for example. Then the installer will take care of adding the entry to /etc/fstab. After installation, make your mount point readable and writable by all:

Code: Select all

sudo chmod 1777 /mnt/disk2
And then repeat the example from the linked post for the directories you want on the data partition. For example, to delete the Music directory in your home folder and link it instead to a new Music directory on the data partition:

Code: Select all

mkdir /mnt/disk2/Music
rm -fr ~/Music
ln -s /mnt/disk2/Music ~/Music
There are probably other ways to go around this. But this is the one that works for me :wink:
Image
Enna

Re: How to install with manual partitioning

Post by Enna »

Thank you so much xenopeek!
I finally got around to do the new install and with help of your description created a seperate data partition!
I think the Linux philosophy is really great and I really appreciate the great work and sharing of knowledge beyond money! So thank you again xenopeek!

All the best,
from Enna
Viking64

Re: How to install with manual partitioning

Post by Viking64 »

What sizes would you recommend for each partition?

/
/home
/swap
/data partition

P.S. space is not a concern.
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: How to install with manual partitioning

Post by xenopeek »

If you have a data partition, I wouldn't normally use a separate home partition (the data partition is to keep your personal documents intact when you reinstall, but intentionally not with a separate home partition so that application configurations are installed with the defaults from your new Linux Mint version so as to avoid any compatibility problems between old and new). Though you can of course have both if you so desire.

As answered already also above in my first post; 30 GB for / is a good number (Linux Mint installation initially needs but 6 GB so that leaves plenty of room). /home if you are using a separate data partition would not need to be very large, 1 GB should more than suffice for application configuration (hence I don't put it on a separate partition, so it is also on the / partition). Swap is generally not needed if you have more than 4 GB RAM. If you intend to use hibernate (suspend to disk) then you should have swap at least equal to the amount of RAM you have (but double it if you have less than 2 GB RAM, and do it times one and a half if you either have less than 4 GB RAM or more than 4 GB RAM but use memory intense applications). Data should be the rest of your disk :wink:
Image
User avatar
russellz
Level 3
Level 3
Posts: 174
Joined: Sat Nov 24, 2012 7:02 am
Location: Millas, France

Re: How to install with manual partitioning

Post by russellz »

xenopeek wrote:If you have a data partition, I wouldn't normally use a separate home partition (the data partition is to keep your personal documents intact when you reinstall, but intentionally not with a separate home partition so that application configurations are installed with the defaults from your new Linux Mint version so as to avoid any compatibility problems between old and new).
I used to do this but the disadvantage is that you loose all your settings such as bookmarks, cookies, and stored passwords on re-installing. If you have a separate /home you can try a new release keeping the /home, if it works you have saved hours of work setting up your software as you like it. If it doesn't work you can repeat the install only keeping the /data and you have lost very little time.

Russell.
Laptop: HP17bs086nf, Intel Core i5-7200U, Intel HD Graphics 620 . Mint Cinnamon 21.1
Desktop: ASUS Prime B760-plus D4 motherboard, AMD Radeon RX6500XT, Intel 12th gen i7 12 core 3500MHz, 8GB ram, 500GB Samsung SSD, Mint Cinnamon 21.1
Viking64

Re: How to install with manual partitioning

Post by Viking64 »

For those who use Wine here is what xenopeek said.
In short; I don't use Wine so aren't the best to ask :wink: I believe wine puts a hidden folder in your home folder, .Wine? Press Ctrl+H in your file manager to see hidden folders like that. I believe your virtual C drive with programs installed is in that folder. You can move the .Wine folder to your data partition and then create a link to it from your home folder. That should work similar as linking the Music folder for example.
Thanks, :D
Viking64
Viking64

Re: How to install with manual partitioning

Post by Viking64 »

Is disk2 the partition name?

xenopeek wrote:I've previously written a post on that, I think this is the one: http://forums.linuxmint.com/viewtopic.p ... 47#p659010. This shows how to add a data partition after you have already installed Linux Mint. To do so during installation, follow the manual partitioning steps above but instead of creating the second partition with mount point /home, create it elsewhere. From the linked post, in /mnt/disk2 for example. Then the installer will take care of adding the entry to /etc/fstab. After installation, make your mount point readable and writable by all:

Code: Select all

sudo chmod 1777 /mnt/disk2
And then repeat the example from the linked post for the directories you want on the data partition. For example, to delete the Music directory in your home folder and link it instead to a new Music directory on the data partition:

Code: Select all

mkdir /mnt/disk2/Music
rm -fr ~/Music
ln -s /mnt/disk2/Music ~/Music
There are probably other ways to go around this. But this is the one that works for me :wink:
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: How to install with manual partitioning

Post by xenopeek »

disk2 is the directory name used as the mount point.
Image
Viking64

Re: How to install with manual partitioning

Post by Viking64 »

Why make the mount point /mnt/disk2? Could I just make the mount point /data? I am somewhat new to Linux was just just curious if there was a reason for it or if it was just personal preference.
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: How to install with manual partitioning

Post by xenopeek »

You can mount it pretty much anywhere you want, /mnt/disk2 is just an example.
Image
User avatar
RytronII
Level 4
Level 4
Posts: 363
Joined: Wed May 18, 2011 4:46 am
Location: Emerald Isle

Re: How to install with manual partitioning

Post by RytronII »

Thank you xenopeek for your excellent tutorial. :D
Husse: "Don't fix it if it ain't broken, don't break it if you can't fix it."
Image
Brahim Salem

Re: How to install with manual partitioning

Post by Brahim Salem »

Do I need the /home partition? If so how much space should I give it? Ubuntu guide here https://help.ubuntu.com/community/DiskSpace says it is "optional" Does the same apply to Mint? :roll:

I always install Linux Mint/Ubuntu by creating an ext4 partition + swap . Even the automatic partitioning does not create a /home partition :shock: I'm I in trouble now?
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: How to install with manual partitioning

Post by xenopeek »

xenopeek wrote:If you want to have a different set of partitions, for example a separate home partition, or if you want to specify the file system type, size or location of partitions, then you will have to use manual partitioning
i.e., you don't need it but if you want it this guide shows you how.
Image
BobCo

Re: How to install with manual partitioning

Post by BobCo »

does this work for LMDE also?
Locked

Return to “Tutorials”