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
MadPigeon

Re: How to install with manual partitioning

Post by MadPigeon »

Howdy!
I have a question, which have many answers around the net, but none od them was enough precise (and trustworthy).

Does 2 GB PC / laptop needs a /swap partition? From what i've heard it is "reasonable" to have it, but it's not crucial. Personally I've gave my 2 GB laptop 512 MB for /swap, but i am looking for some kind of "recommendation" of how much space to provide for each RAM specification.

Thanks!
ej64
Level 4
Level 4
Posts: 323
Joined: Tue Nov 24, 2009 7:43 am
Location: somewhere in Germany

Re: How to install with manual partitioning

Post by ej64 »

Does 2 GB PC / laptop needs a /swap partition?
If you don't have /swap you can't hibernate (or needs some effort => e.g. tuxonice). Usually you choose a swap partition at least the size of your RAM.
Thinkpad X220 with Samsung SSD running Xubuntu 13.04
I'm getting old gladly -- I don't like to die young ...
ej64
Level 4
Level 4
Posts: 323
Joined: Tue Nov 24, 2009 7:43 am
Location: somewhere in Germany

Re: How to install with manual partitioning

Post by ej64 »

Brahim wrote:Do I need the /home partition? If so how much space should I give it?
It's more convenient. If you reinstall you don't have to backup and restore (recommended anyway), you just point the new /home to the old partition (or logical volume if you use lvm) and tell the installer to NOT FORMAT it.
Another advantage can be to assign different mount options, e.g. noexec for /home to harden your system.
There are lots of other reasons.

Good reading:
https://wiki.archlinux.org/index.php/Partitioning
Thinkpad X220 with Samsung SSD running Xubuntu 13.04
I'm getting old gladly -- I don't like to die young ...
anass

Re: How to install with manual partitioning

Post by anass »

Thanks a lot for this very useful information. This really open my mind. Thanks again.
eds

Re: How to install with manual partitioning

Post by eds »

This is a great step by step with good explanations! :D

So to summarise, we need to create at least 2 partitions,"/" (set up as primary) and swap (set up as logical), in order to properly install and run mint? Does this apply to all linux installations or just mint (sorry noob question)? I tried to do this on a macbook, and if I may ask, where do I install the bootloader?

Also, going a little bit deeper here, I've been reading about this manual partitioning on other systems (for educational purposes, hoping to gain some insight), does mint automatically set the boot flag to the / partition?
grizebaard

Re: How to install with manual partitioning

Post by grizebaard »

Being a neo-newbie at Linux (was an ordinary Unix user many moons ago when the terminal window wasn't a window!), and preparing to attempt a sensible first install, I want to create a separate top-level "/data" partition for use as a distinct sub-tree for all user files, but what's not clear to me from the previous postings what the implications for system operation may be if the partition is not set to /home or some other expected system-embedded directory like /mnt/disk2 or whatever. I really want to keep all app. configuration stuff (hidden or not) happily tucked away in the system tree, but if possible also avoid apps defaulting to leaving user files there as well (à la the painful "Documents and Settings" in Windows), but instead somewhere convenient in the /data subtree. Is this impossible or just a matter of setting the right environment variable(s) afterwards...?

(Oh, and the "/data" partition mounted automatically on boot... )
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 create a partition during installation and set its mount point to /data. That will work fine. If you intend to use it for one user only, chown /data to that user after installation (as /data will be owned by root by default). If you intend to use it for multiple users you could chmod 1777 /data, to make it similar to /tmp where all users can write files.

Programs will normally offer to save new files in your configured user directories (~/Documents, ~/Downloads, ~/Pictures, etc.). You can browse to /data to save there of course, and set a bookmark in your file browser to make that easier. You can also remove the ~/Documents directory for example, create it on /data, and then create a link called Documents from your home directory to /data/Documents so that files written to ~/Documents will be stored on /data/Documents. You can also edit the ~/.config/user-dirs.dirs file and update where your user directories are. if you log in with different languages from time to time, I recommend against that though. There have been users with problems because of misconfiguration in this file.
Image
grizebaard

Re: How to install with manual partitioning

Post by grizebaard »

Much obliged for your response, xenopeek. Re: partitioning, that's just the info and reassurance I needed. (As to organising where apps expect to find stuff, clearly I'm going to have to guddle about with that post-install, =laugh= but that's beyond the scope of this topic...!)
graybeard

Re: How to install with manual partitioning

Post by graybeard »

Xenopeek - finally thanks to your tutorial i have partitioned the new petra cinnamon. I have been using mint since Bea, but have always had to do a total install. It was my understanding that having the partitioned home folder that all settings would be saved etc.. Now I find out that it doesn't. I just did s re-instatll this AM but then read abut the data partition which I am lost on - esp. since my wife is a secondary user. Argh!!!! I wish someone would fix linux to do as Mac does when installing an newer version of their OS. Everything is there and no issues have ever been encountered. Thank you. At least i got it this far - FINALLY!
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How to install with manual partitioning

Post by austin.texas »

graybeard wrote: It was my understanding that having the partitioned home folder that all settings would be saved etc..
You can configure it either way. You can have /home on a separate partition where your settings will be preserved, or you can have a separate /data partition with the settings on the / partition. They will then not be preserved when you install a new version of Mint to that / partition. It is your choice - however you want to do it.
If you use the Mint installation program to set up a separate /home, the user settings will be there and not on the / partition.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
graybeard

Re: How to install with manual partitioning

Post by graybeard »

I set up the /home so maybe I am good.
zolar1

Re: Complex mixed install

Post by zolar1 »

I have an SSD and a platter drive.

I plan on dual booting mint 13 and win7.

I expect to put mint 13 and win7 on the ssd, but want to put /tmp and /var/tmp on the platter drive as well as windows tmp and pagefie on the platter drive.

Win7 will probably need about 100GB and the remaining 400gb for mint on the ssd.

The platter drive is also 500GB.

What is the best use of the platter drive? I can put long term storage on that too (movies and such).

Best sizes for the platter drive is needed AND what files systems should I choose for all the linux stuff on ecach drive??
Grimjaw

Re: How to install with manual partitioning

Post by Grimjaw »

Nice! I'm installing Mint 16 with Mate on an old laptop. Minor differences in the dialogs for Mint 16/Mate do not cause problems. I'm an old DOS/Windows user, so partitioning is nothing new. The most important information for me was how to size the partitions effectively. They way you did it was the most helpful I have found yet. 30K for root. Remaining free space minus 4k - 5k for swap. Rest to swap.

I've seen a lot of schemes, but most were complicated and assume a certain size hard drive (if you have 80 gigs do this, but if you have 500 gigs do this other). None easily translated to 120 gig disk. Your way works for any reasonable disk size.

Thanks!
zolar1

Re: How to install with manual partitioning

Post by zolar1 »

Grimjaw,

Pretty much you only need to be concerned with the root partition size ( the / partition) and a /swap if you have less than 4gb ram (need one if you are doing ram gobbling things like video editing and large databases and such)

The /home is generally where your data goes and any programs you install.

If you had an extra drive then you can put /swap , /tmp . and /data on it.

Seems when you split things up across more then one drive things feel faster.

For me, even though I have a /swap , it is *never ever* used (I have 8gb ram)

Even my /tmp is barely used.

However, my /data I pack a LOT on it and use /home for leftovers if needed.

Some distros if you auto allocate it will generally set things up for a single drive, linux only.

And give you a /swap whether or not you need one.

I prefer to set things a bit differently. And that is the beauty of linux. You have more control over what you can do.

I have my / partition set for 11.4Gb and only use 4.8Gb of it.

Next time I will set it to 6Gb I think.
xakira

Re: How to install with manual partitioning

Post by xakira »

Hi, my 2 cents worth.
I always upgrade to a new version of Mint by the manual partition method.
I always reformat my root "/" partition and install the new Mint clean.
I always have a "/home" partition that I don't format.
My configuration is 20GB for root (/) and formated, then 1GB for the swap, then remainder for /home and NOT formatted.
I also use primary partitions for all of them, but have no good reason for doing that :)
I place swap between system and data so that if it starts to use swap the heads aren't flying from system partition to the end of the drive back and forth.
(placing swap after root is probably just a personal thing with me and not really an issue)
I would suggest using 1GB swap for any size RAM.
The rule of thumb is the less RAM you have the more chance u will use swap and the bigger swap you should have.
In practice, if you ever got to 500MB of swapped memory you would be rebooting your PC because it would be running so slooow.
Even on my 8GB RAM system i get some swapping out to /swap partition over time.
So whether you have 2GB or 16GB ram, just go with 1GB swap partition.
My /home partition is always left alone with my data on it but I don't let Mint install into my /home/myname directory.
Before I start the install I browse to the old /home partition and rename /myname to /mynamezzz
Then I can install Mint clean to the /home partition with my same username (myname) and have all clean and known to working configs.
After install I can move all my "Data" files over from /home/mynamezzz/ to /home/myname. This is instantaneous because they are on the same partition.
If I then want to transfer over some config files I can play around with that, but I tend to just rebuild my configurations from scratch believing it will be more stable that way. After a month or so and I'm sure I have all my data and things are working fine I delete /home/mynamezzz directoy.
That's it - a completely clean install of Mint with stable default configs without losing your data files.
zolar1

Re: How to install with manual partitioning

Post by zolar1 »

I like many modern computer users either have or are switching to SSD drives. Swap partitions can be hard on those drives. And if you did want a swap file, it matters not where you place it.

I typically do not make a swap partition because I have 8gb RAM. I am not doing large databases nor video editing. Just typical computer stuff like surfing, downloading, similar.
I probably have too much ram because linus is still screwed up with USB caching of external drives. No way to turn USB drive caching off. When it says transfer complete, it isn't. You still have to wait for cache flush

Sometimes I will convert DVD's to MP4 or MKV. That take cpu power but little ram. Seems Linux is a cpu hog (windows is both a cpu and a RAM hog).

I tried formatting /root with ext4 and /home with other filesystems. Seems I cannot get enough throughput no matter which I use. So, everything is at default right now except for no swap.
User avatar
geekomatic
Level 4
Level 4
Posts: 410
Joined: Sun Jun 06, 2010 1:11 am
Location: Awesome Western Australia!

Re: How to install with manual partitioning

Post by geekomatic »

Old post, I know, but I have a query which is an extension of this excellent guide:

I'd like to use an SSD + a HDD. I want to know if I can, during the initial install, specify /home on the SSD, but then /home/Downloads (& also Music, Photos, Videos, Documents) to the HDD?

I've read a lot about symlinks/binding, etc...& did have a go at it, but I had troubles & could not boot after the fstab changes were made.

Then, I thought- "can I just use gparted to create a partition /home/Music from the start"? My thinking was to keep the programs on /home (SSD) but my own folders (large & written to/changed a lot) on the HDD.

Hope this makes sense. I've tried a lot of scenarios but don't want to keep writing & writing to the SSD.

Thanks
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 any (sub)folder you want on a specific partition. However, without symlinking (which really isn't that hard) you'd have to make a partition for each folder you want to mount. So one partition for Documents, another on for Downloads. another one for Music, and so on. Doesn't really make sense to do that.

During initial install you'd create a partition with mount point / on the HDD (optionally also a swap partition. and an EFI system partition if using UEFI) and a partition with mount point /home on the SSD. You have do this in the Linux Mint installer; not in GParted! GParted doesn't configure the mount points for the installer. If you don't want your music, videos, and other files that you'll store on the HDD to be on the same partition as your OS, you could create another partition in your HDD with a mount point set to something like /mydata.

After installing the OS, you need not change anything in /etc/fstab. You will probably first have to chown /mydata to yourself:

Code: Select all

sudo chown $(id -un):$(id -gn) /mydata
Assuming you Documents, Downloads, Music, Photos, and Videos folders are still empty for each you'd do (example with Documents):

Code: Select all

rm -rf ~/Documents
ln -s /mydata/Documents ~/Documents
That's all.

BTW, I don't know how tiny your SSD is but moving all those folders to your HDD doesn't leave much on the SSD (unless you have Steam or Wine games, those would all stay on the SSD). You might as well not bother with using the SSD, if you aren't going to actually put files on it :wink: Any half decent SSD these days has a write durability that will outlast the rest of your computer components... It doesn't make sense to not use your SSD.

If your SSD is at least 50 GB, I'd put both / and /home on it (both 25 GB; if you have Steam and Wine games you'll want a much larger /home) and put optional swap partition and the /mydata partition on your HDD. Then symlink from your home folder to /mydata the really big folders; like Music, Pictures and Videos (would Documents and Downloads really be very big?).
Image
MintRainbow

Re: How to install with manual partitioning

Post by MintRainbow »

That's an especially handy thing if you are using NTFS to make a big partition you can use in Windows without compatibility software. I made this handy little script during the install process to make that possible;

Code: Select all

mkdir /path/to/Downloads
mkdir /path/to/Documents
mkdir /path/to/Videos
mkdir /path/to/Music
mkdir /path/to/Pictures
mv ~/Downloads /path/to/Downloads
mv ~/Documents /path/to/Documents
mv ~/Videos /path/to/Videos
mv ~/Music /path/to/Music
mv ~/Pictures /path/to/Picturest
ln -s /path/to/Downloads ~/Downloads
ln -s /path/to/Documents ~/Documents
ln -s /path/to/Videos ~/Videos
ln -s /path/to/Music ~/Music
ln -s /path/to/Pictures ~/Pictures
Edit that however you need it. Just remember that you need the disk to mount at startup, which in most installs can be done with gnome-disks or palimpsest.
Anaemic

Re: How to install with manual partitioning

Post by Anaemic »

Thanks xenopeek for the excellent tutorial on partitioning.
I think it is a good idea to have a home partition.
I have read that the recommended size for the Swap partition is twice
the RAM.
Locked

Return to “Tutorials”