How to install with manual partitioning

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

Re: How to install with manual partitioning

Postby MadPigeon on Fri Jul 05, 2013 9:58 am

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!
"The tragedy of our time is, that we take authority as truth, not truth as authority"
MadPigeon
Level 1
Level 1
 
Posts: 1
Joined: Fri Jul 05, 2013 9:50 am

Linux Mint is funded by ads and donations.
 

Re: How to install with manual partitioning

Postby ej64 on Fri Jul 05, 2013 10:28 am

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: 326
Joined: Tue Nov 24, 2009 7:43 am
Location: somewhere in Germany

Re: How to install with manual partitioning

Postby ej64 on Fri Jul 05, 2013 10:37 am

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 ...
ej64
Level 4
Level 4
 
Posts: 326
Joined: Tue Nov 24, 2009 7:43 am
Location: somewhere in Germany

Re: How to install with manual partitioning

Postby anass on Thu Aug 08, 2013 4:04 pm

Thanks a lot for this very useful information. This really open my mind. Thanks again.
anass
Level 1
Level 1
 
Posts: 2
Joined: Wed Aug 07, 2013 11:47 am

Re: How to install with manual partitioning

Postby eds on Fri Aug 16, 2013 8:21 am

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?
eds
Level 1
Level 1
 
Posts: 7
Joined: Thu Apr 25, 2013 3:52 am

Re: How to install with manual partitioning

Postby grizebaard on Sun Oct 13, 2013 7:04 pm

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... )
grizebaard
Level 1
Level 1
 
Posts: 12
Joined: Sun Oct 13, 2013 4:13 pm

Re: How to install with manual partitioning

Postby xenopeek on Mon Oct 14, 2013 3:46 am

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
User avatar
xenopeek
Level 21
Level 21
 
Posts: 16422
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: How to install with manual partitioning

Postby grizebaard on Mon Oct 14, 2013 10:44 pm

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...!)
grizebaard
Level 1
Level 1
 
Posts: 12
Joined: Sun Oct 13, 2013 4:13 pm

Re: How to install with manual partitioning

Postby graybeard on Mon Feb 17, 2014 11:51 am

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!
graybeard
Level 1
Level 1
 
Posts: 7
Joined: Mon Feb 17, 2014 9:20 am
Location: on the homestead

Re: How to install with manual partitioning

Postby austin.texas on Mon Feb 17, 2014 2:46 pm

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 17.1 Cinnamon (64 bit), Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Microsoft-free environment since 1996

Linux Linx 2015
User avatar
austin.texas
Level 13
Level 13
 
Posts: 4547
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How to install with manual partitioning

Postby graybeard on Mon Feb 17, 2014 2:48 pm

I set up the /home so maybe I am good.
graybeard
Level 1
Level 1
 
Posts: 7
Joined: Mon Feb 17, 2014 9:20 am
Location: on the homestead

Re: Complex mixed install

Postby zolar1 on Sat Mar 08, 2014 10:23 pm

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??
zolar1
Level 3
Level 3
 
Posts: 199
Joined: Fri Oct 05, 2012 9:07 pm

Re: How to install with manual partitioning

Postby Grimjaw on Sat Apr 19, 2014 6:04 pm

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!
Grimjaw
Level 1
Level 1
 
Posts: 1
Joined: Sat Apr 19, 2014 3:50 pm

Re: How to install with manual partitioning

Postby zolar1 on Sat Apr 19, 2014 8:18 pm

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.
zolar1
Level 3
Level 3
 
Posts: 199
Joined: Fri Oct 05, 2012 9:07 pm

Re: How to install with manual partitioning

Postby xakira on Sat Jun 14, 2014 3:10 am

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.
xakira
Level 1
Level 1
 
Posts: 1
Joined: Sat Jun 14, 2014 2:23 am

Re: How to install with manual partitioning

Postby zolar1 on Sat Jun 14, 2014 10:13 am

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.
zolar1
Level 3
Level 3
 
Posts: 199
Joined: Fri Oct 05, 2012 9:07 pm

Re: How to install with manual partitioning

Postby geekomatic on Mon Feb 09, 2015 4:58 am

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
geekomatic
Level 2
Level 2
 
Posts: 64
Joined: Sun Jun 06, 2010 1:11 am
Location: Awesome Western Australia!

Re: How to install with manual partitioning

Postby xenopeek on Mon Feb 09, 2015 5:30 am

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
User avatar
xenopeek
Level 21
Level 21
 
Posts: 16422
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Linux Mint is funded by ads and donations.
 
Previous

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 13 guests