How to partition Linux Mint?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
mintgum

How to partition Linux Mint?

Post by mintgum »

Hello!
If I install Linux Mint, it will create the default 2 partitions Swap and Root only? because I heard you need to manually add partition such as Home so that nobody mess with Root or something. can I just leave Swap and use the rest space for Root and use Root as the Home aswell ?
Can you suggest me how to partition my hard drive and what size to allocate to each partition?? I have 80 GB hard drive and 4 GB Ram.

thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
daveinuk
Level 7
Level 7
Posts: 1559
Joined: Tue Mar 23, 2010 7:52 pm
Location: Manchester, England.
Contact:

Re: How to partition Linux Mint?

Post by daveinuk »

There are a number of ways you can do it but first you need to read through the forums a bit more to get a better idea of the best way for you and your computer. Have a look through the links in another post below as they have all the info in them that you will need and after a good look through come back with any detailed questions .

http://forums.linuxmint.com/viewtopic.php?f=90&t=121585

The forum for installation and boot has even more detailed info in it
nomko

Re: How to partition Linux Mint?

Post by nomko »

If I install Linux Mint, it will create the default 2 partitions Swap and Root only?
These 2 partitions are the minimum 2 partitions you need. More partitions can make, especially for novice users, the entire partition table more confusing and more difficult to set up and maintain.
because I heard you need to manually add partition such as Home so that nobody mess with Root or something.
Rubbish! During the installation you can create the needed partitions manually or automatically. People telling you that you must do it manually since there's no other way, they don't have any clue of where they are talking about!

This picture of Mint 12 (as example) shows you that there are 2 ways to create the partitions: manually (bottom option) and automatically (top option). If you don't know what to choose, the top option is the best option, namely partition your disc automatically during setup.
Image


can I just leave Swap and use the rest space for Root and use Root as the Home aswell ?
Yes you can. As long you have enough main memory. Best advise is leave swap with a minimum of 4 gig main memory.

Can you suggest me how to partition my hard drive and what size to allocate to each partition?? I have 80 GB hard drive and 4 GB Ram.
If you don't want any swap partition, choose the bottom option and then add a new partition and use your whole disc space as root (/). Just click the Add button and fill in the info which is required.
Image


Keep in mind that there might be programs who require a swap partition. I always keep a swap file of 1 gig size on my disc.
If you decide to have a swapfile, take a look here: https://sites.google.com/site/tipsandtr ... swappiness
Last edited by nomko on Thu Jan 03, 2013 8:17 am, edited 2 times in total.
nomko

Re: How to partition Linux Mint?

Post by nomko »

daveinuk wrote:There are a number of ways you can do it
Linux Mint has 2 ways:
- manually
- automatically
but first you need to read through the forums a bit more to get a better idea of the best way for you and your computer. Have a look through the links in another post below as they have all the info in them that you will need and after a good look through come back with any detailed questions .
http://forums.linuxmint.com/viewtopic.php?f=90&t=121585
The forum for installation and boot has even more detailed info in it
Always a good advise to provide information about some topics.
mintgum

Re: How to partition Linux Mint?

Post by mintgum »

nomko wrote:
daveinuk wrote:There are a number of ways you can do it
Linux Mint has 2 ways:
- manually
- automatically
but first you need to read through the forums a bit more to get a better idea of the best way for you and your computer. Have a look through the links in another post below as they have all the info in them that you will need and after a good look through come back with any detailed questions .
http://forums.linuxmint.com/viewtopic.php?f=90&t=121585
The forum for installation and boot has even more detailed info in it
Always a good advise to provide information about some topics.
Hi nomko, I'm sorry if I didnt make my self clear, I meant leave swap, by not touching it, just letting it automatically be installed with root .
I already installed Linux Mint, and now I have a few problems.
I did the auto installation and I don't even know what partitions it created.
I have some questions.. :D
when I log into Linux now, I log into Root or Home(did auto installation create separate Home partition or its inside Root?)?
when I press Computer in Linux , I can see my Windows 500 GB hard drive and delete files from it, but I don't want to do it , is there a way to block the access to this hard drive from Linux? or hide it?

thanks
usbtux

Re: How to partition Linux Mint?

Post by usbtux »

http://ubuntuportal.com/2012/07/quick-t ... 4-lts.html should help with seeing (or not) additional disks.

No auto install does not make a separate home partition. See this for manual partitioning. http://youtu.be/gVCfeFOxGLQ the specifics are easy to change for what you want/need. But for now I'd stick with what you've got until you feel happy to reinstall.
nomko

Re: How to partition Linux Mint?

Post by nomko »

mintgum wrote: I already installed Linux Mint, and now I have a few problems.
I did the auto installation and I don't even know what partitions it created.
If you let the setup create the partitions, then you have 2 partitions:
- root partition
- swapfile 4 gig

You can check it by installing gparted, this is a disc partitioning tool in which you can check your partitions.

Here you can read some stuff about disc partitioning: http://en.wikipedia.org/wiki/Disk_partitioning.

when I log into Linux now, I log into Root or Home(did auto installation create separate Home partition or its inside Root?)?
Root is your main partition. Yopur Home is just a folder on the root partition. If you create the root partition automatically, the home folder is on that root partition. Only by hand (manually) you can create a separate home partition on which Home.
mintgum

Re: How to partition Linux Mint?

Post by mintgum »

nomko wrote:
mintgum wrote: I already installed Linux Mint, and now I have a few problems.
I did the auto installation and I don't even know what partitions it created.
If you let the setup create the partitions, then you have 2 partitions:
- root partition
- swapfile 4 gig

You can check it by installing gparted, this is a disc partitioning tool in which you can check your partitions.

Here you can read some stuff about disc partitioning: http://en.wikipedia.org/wiki/Disk_partitioning.

when I log into Linux now, I log into Root or Home(did auto installation create separate Home partition or its inside Root?)?
Root is your main partition. Yopur Home is just a folder on the root partition. If you create the root partition automatically, the home folder is on that root partition. Only by hand (manually) you can create a separate home partition on which Home.
Thanks, it's really helpful, can I change the partitions now? after Ive already installed Linux?
Also,if I am always logged in to root, why I still have to write my password for almost everything I do , and I can't enter some folders for example root folder?
nomko

Re: How to partition Linux Mint?

Post by nomko »

mintgum wrote:Thanks, it's really helpful, can I change the partitions now? after Ive already installed Linux?
Yes you are still able to modify the partitions after the installation of Mint. But before you do hat, always make a backup of your files (documents/photo's/images/etc). Just in case.

Also,if I am always logged in to root, why I still have to write my password for almost everything I do , and I can't enter some folders for example root folder?
You are not logged in as root but as a user. And for some actions you need root privileges. Actions like installing programs for instance. And some folders you can't access as a regular user due to security restrictions, only as a root.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: How to partition Linux Mint?

Post by altair4 »

I can see my Windows 500 GB hard drive and delete files from it ...
Luckily for you you did not act on an earlier piece of advice and choose the "Erase disk and install Linux Mint" option.
... is there a way to block the access to this hard drive from Linux? or hide it?
Yes there is. You can make it read only ( umask=222 ) and you can hide it completely ( noauto ) but before you go too far you might want to post the output of the following commands:

Code: Select all

cat /etc/fstab

Code: Select all

sudo blkid -c /dev/null

Code: Select all

sudo parted -l
This will tell us how you are currently set up and allow responders to make suggestions more specific to your particular circumstances and offer a greater degree of peer review of the suggestions being offered.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
nomko

Re: How to partition Linux Mint?

Post by nomko »

altair4 wrote:
I can see my Windows 500 GB hard drive and delete files from it ...
Luckily for you you did not act on an earlier piece of advice and choose the "Erase disk and install Linux Mint" option.
Good reading can be difficult altair4!!

Next time quote the whole story instead of a small part just to create confusion!!!
To quote mintgum completely for this matter:
I already installed Linux Mint, and now I have a few problems.
I did the auto installation and I don't even know what partitions it created.
I have some questions.. :D
when I log into Linux now, I log into Root or Home(did auto installation create separate Home partition or its inside Root?)?
when I press Computer in Linux , I can see my Windows 500 GB hard drive and delete files from it, but I don't want to do it , is there a way to block the access to this hard drive from Linux? or hide it?
See??? He did exactly what has to be done! Installing Linux on his second drive!!! And now he sees his first drive with Windows installed on it in Nemo/Caja!
Shame on you altair4! :wink:

And my appreciation for your help on mintgum's question about hiding the Windows partition.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: How to partition Linux Mint?

Post by altair4 »

Your recommendation to erase the disk was before you knew how many disks he had. In fact based solely on his original post one could have concluded it was only one. Some people do searches when they have a question and post when they either don't find it or perhaps don't understand it. Your recommendation was without context and a very dangerous thing to do.

Contrast that to this:
daveinuk wrote:There are a number of ways you can do it but first you need to read through the forums a bit more to get a better idea of the best way for you and your computer. Have a look through the links in another post below as they have all the info in them that you will need and after a good look through come back with any detailed questions .

http://forums.linuxmint.com/viewtopic.php?f=90&t=121585

The forum for installation and boot has even more detailed info in it
The post above was in context of the original question which was "Can you suggest me how to partition my hard drive and what size to allocate to each partition?? I have 80 GB hard drive and 4 GB Ram."
Yet you responded to daveinuk's post with:
Linux Mint has 2 ways:
- manually
- automatically
In the context of the question it's a non-sequitur.

In regards to the original question there is no way to answer it until we find out what he's done so far:

Code: Select all

cat /etc/fstab
What partitions and types are available:

Code: Select all

sudo parted -l
And some information in case we want to make specific recommendations in regards to making it happen:

Code: Select all

sudo blkid -c /dev/null
And my appreciation for your help on mintgum's question about hiding the Windows partition.
Actually, only part of it was helpful. This part you referred to was not helpful:
You can make it read only ( umask=222 ) and you can hide it completely ( noauto ) ...
What I should have written was: You have to mount the partition in fstab to make it read only (umask=222) or hide it completely ( noauto) ... "
The only helpful part was a request for more information.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
mintgum

Re: How to partition Linux Mint?

Post by mintgum »

Hi again, don't worry, at first I had only one hard drive because I disconnected the main 500 GB hard drive leaving only the 80 GB connected.
Here the output:
cat /etc/fstab:
-----------------------------------------
# / was on /dev/sda1 during installation
# swap was on /dev/sda5 during installation
-----------------------------------------

sudo parted -l:
-----------------------------------------
Disk /dev/sda: 82.3GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 78.1GB 78.1GB primary ext4 boot
2 78.1GB 82.3GB 4202MB extended
5 78.1GB 82.3GB 4202MB logical linux-swap(v1)


Model: ATA ST500DM002-1BD14 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary ntfs boot
2 106MB 500GB 500GB primary ntfs
-----------------------------------------

you told me I can hide or set reading permissions only to the 500 GB hard drive, but you said in general to type "umask 222" or "noauto" but I am new to Linux and I have no idea what is the exact way to do that - can I have all the commands from the beginning?:D

A question about the user: Why do I need to create a separate "Home" partition if I am already logged in as a user with no superuser privileges unless I type the password?(it's already safe)

Last one ( :lol: ) : Can I open root folder by double clicking on it and view its contents or the only way is via Terminal?
Thanks and sorry for headache :mrgreen:
nomko

Re: How to partition Linux Mint?

Post by nomko »

mintgum wrote:Why do I need to create a separate "Home" partition if I am already logged in as a user with no superuser privileges unless I type the password?
Some will say it's really handy to have a separate /Home partition, other will say it doesn't matter as long you back up your files now and then. I don't have a separate /home partition since i store my files/photo's/etc. on a external USB disc and create back up's now and then. You also should know that some programs creates a hidden folder or hidden files (such as configuration files) in your /home folder. When you have a separate /home partition and you re-install Mint, then Mint will automatically detect your separate /home partition and re-use it again. The problem here is, that it will also detect those hidden files/folders with those configuration files and re-use those files. This might lead to conflicts between files: mainly version conflicts or filename conflicts which might lead to an unstable system.

My advice: keep your home folder under the root partition and back up your files now and then. And when you need to re-install Mint, erase the whole root partition including the home folder to ensure that there won't be any conflicts afterwards.
mintgum wrote:Can I open root folder by double clicking on it and view its contents or the only way is via Terminal?
In the file-manager you can open the root folder and see it's content. What you can't do is modify the content to which you don't have any access or privileges as a normal user. In most cases it will system files/folders to which you don't have access without root privileges.
Thanks and sorry for headache
No problem! We are here to help each other out! And don't worry about my headaches, i've got a very good medicine for it :wink:
Image
mintgum

Re: How to partition Linux Mint?

Post by mintgum »

Thanks alot :mrgreen:
I really don't need Home partition then because I store all the important stuff on the main 500 GB drive, and that's why I need to know how to hide it in Linux, I don't want someone to accidentally come to Linux and erase my Windows drive. Is there a way to block access/hide the 500 GB hard drive in Linux?
nomko wrote: In the file-manager you can open the root folder and see it's content.
The problem is , when I try to open "root" folder in the file-manager I get this error message :
The folder contents could not be displayed.
You do not have the permissions necessary to view the contents of "root". ** (looks like there is a folder named "root" inside root itself which I can't access)

I am still confused about something, the user and the superuser both have same names ?

I hope your'e not too drunk by now :lol:
nomko

Re: How to partition Linux Mint?

Post by nomko »

mintgum wrote:I really don't need Home partition then because I store all the important stuff on the main 500 GB drive, and that's why I need to know how to hide it in Linux
You need the /home folder due to the fact that some programs store their configuration files, theme's as a hidden file or folder in your /home folder. So, saying you don't need /home is not really smart to say :wink: You need a /home folder. But that does not mean you have to use it. It's convenient to have it and is doesn't consume a lot of space of your 80 gig drive, so just leave it there. And storing your important stuff on an other (external) drive is always a good idea! As long you make back-ups now and then of course just in case...


mintgum wrote:I don't want someone to accidentally come to Linux and erase my Windows drive. Is there a way to block access/hide the 500 GB hard drive in Linux?
I'm not familiar with this stuff. Here's something to read about fstab: https://help.ubuntu.com/community/Fstab.
mintgum wrote:The problem is , when I try to open "root" folder in the file-manager I get this error message :
The folder contents could not be displayed.
You do not have the permissions necessary to view the contents of "root". ** (looks like there is a folder named "root" inside root itself which I can't access)
Yes, there's a root folder ( /root) on the root partition (/). And yes, as a normal user you don't have access to that folder. And therefore you are not able to see the content of that folder. If you want to know what the content is you have to open your filemanager with root privileges. Press Alt+F2 and type gksu nautilus or gksu caja or gksu nemo (depending which filemanager you're using) and press Enter. Type your password and you have a filemanager with root privileges.
mintgum wrote:I am still confused about something, the user and the superuser both have same names ?
No, you, as normal user, grant yourself (temporarily) root privileges to gain access to your system (root files) as superuser. Let's say you want to install a program using Software Manager. To install programs you have to be a superuser. When asked for it you have to type in your password to gain temporarily root access (superuser) in order to install that program. When the program is installed your root access will be dropped and you become a regular user again. Basically: your password as normal user is required to gain access as a superuser.
I hope your'e not too drunk by now :lol:
Do you want a sip???
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: How to partition Linux Mint?

Post by altair4 »

Something is not right about the output of those commands:
cat /etc/fstab:
-----------------------------------------
# / was on /dev/sda1 during installation
# swap was on /dev/sda5 during installation
Where is the rest of it? Those are comments not how your current auto-mounted partitions are configured.
A question about the user: Why do I need to create a separate "Home" partition if I am already logged in as a user with no superuser privileges unless I type the password?(it's already safe)
You don't need to create a separate home partition although many recommend it. The argument for such a thing is that it separates all your user's individual home directories in a partition removed from where the OS itself lives. If something goes wrong with your install and you need to reinstall all of your users data and settings are preserved and can be reused. The argument against such a thing is that since all of your settings are preserved a reinstall might just restore the same things that caused you to reinstall in the first place. Not a big fan of separate home partitions myself.
Last one ( :lol: ) : Can I open root folder by double clicking on it and view its contents or the only way is via Terminal?
Are you talking about the root directory ( i.e., / ) or /root? If you can't open up "/" as a regular user then you have a problem with your install. If you can't open /root that's by design. If you really need to see what's in there run the file manager with elevated privileges:

Code: Select all

gksu nemo /root
Not sure what desktop environment you are using so substitute nautilus, caja, or thunar for nemo above if you are using something other than Cinnamon.
you told me I can hide or set reading permissions only to the 500 GB hard drive, but you said in general to type "umask 222" or "noauto" but I am new to Linux and I have no idea what is the exact way to do that - can I have all the commands from the beginning?:D
That's why I asked for but you did not post the output of the following command:

Code: Select all

sudo blkid -c /dev/null
I can give you some templates to use ( I like the template approach to fstab editing myself ). The general procedure is to:

[1] If you have mounted the Windows partition manually unmount it.

[2] Make a mount point for the Windows partition. For example:

Code: Select all

sudo mkdir /mnt/WinC
[3] Edit fstab with elevated privileges:

Code: Select all

gksu gedit /etc/fstab
EDIT: Changed the editor from nemo to gedit. Don't know what I was thinking :oops:

[4] Add to the end of fstab one of the following templates ( examples ) depending on how you intend to use the Windows partition:

NOTE: To use these templates you need to substitute the real UUID for the one I'm using in the template and that's from the "sudo blkid -c /dev/null" command I gave you above.

Hide it:

Code: Select all

UUID=DA9056C19056A3B3 /mnt/WinC ntfs defaults,nls=utf8,umask=222,noauto 0 0
"naouto" will prevent the partition from being mounted at boot but since it's in fstab it will prevent you from seeing it as a mountable partition in the file manager. I left a "umask=222" in there just in case. Even though it will not auto-mount root can still mount it through the terminal and the umask=222 will make it read only.

Mount it read only:

Code: Select all

UUID=DA9056C19056A3B3 /mnt/WinC ntfs defaults,nls=utf8,umask=222 0 0
Mount it Read /Write: This is just in case in the future you decide to mount it writeable:

Code: Select all

UUID=DA9056C19056A3B3 /mnt/WinC ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
Note: I'm kind of old school when it comes to mounting the partition that the Windows OS lives in as writeable. I think it's a very bad idea especially on a laptop where you can place Windows in a hibernated state. But if in the future you decide to make a NTFS "Data" partition - maybe a WinD or a WinE - then the same template can be used.

[5] Run the following command which will test for errors ( like any possible typos I have made ) and if there are none execute the new instruction you added in fstab:

Code: Select all

sudo mount -a
Last edited by altair4 on Fri Jan 04, 2013 3:09 pm, edited 5 times in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: How to partition Linux Mint?

Post by altair4 »

I am still confused about something, the user and the superuser both have same names ?
The first user created on your installed system automatically becomes a member of the sudo group. That enables that user to do certain things with elevated privileges by invoking sudo ( for terminal commands ) or gksu ( for those utilities or applications that have GUI's ).

It's sort of kind of like being in the administrators group in Windows except in Windows most of those elevated privileges are automatic. In Linux you have to invoke it as a separate process.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
mintgum

Re: How to partition Linux Mint?

Post by mintgum »

Thanks you both very much for the help.
Now I am left with the 500 GB hiding problem.
Here is the output of sudo blkid -c /dev/null:

/dev/sda1: UUID="061da7a8-e7g7-4bd7-a324-533dab64eef8" TYPE="ext4"
/dev/sda5: UUID="3bd0cb63-396f-4023-9a8e-07e2c0e4b254" TYPE="swap"
/dev/sdb1: LABEL="M-bM-^@M-^OM-bM-^@M-^OM-WM-)M-WM-^^M-WM-^UM-WM-( M-WM-"M-WM-^\-M-WM-^YM-WM-^SM-WM-^Y M-WM-^TM-WM-^^M-WM-"M-WM-(M-WM-^[M-WM-*" UUID="8000136C11135A92" TYPE="ntfs"
/dev/sdb2: UUID="1B34235012235CD7" TYPE="ntfs"



btw, I downloaded gedit , do I need to substitute "nemo" with "gedit"? (that's the only way it works, I have MATE desktop btw)
if yes, I did it, I opened fstab and added these two lines at the bottom:
UUID=8000136C11135A92 /mnt/WinC ntfs defaults,nls=utf8,umask=222,noauto 0 0
UUID=1B34235012235CD7 /mnt/WinC ntfs defaults,nls=utf8,umask=222,noauto 0 0
and saved the file, but nothing happened, look :
Image

you can see in this image that the 500 gb still appears in Computer, how to hide it?
Thanks very much
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: How to partition Linux Mint?

Post by altair4 »

UUID=8000136C11135A92 /mnt/WinC ntfs defaults,nls=utf8,umask=222,noauto 0 0
UUID=1B34235012235CD7 /mnt/WinC ntfs defaults,nls=utf8,umask=222,noauto 0 0
/mnt/WinC is a mount point. There can only be one mount point per partition.

Create another mount point:

Code: Select all

sudo mkdir /mnt/Win
Then change the line to this:

Code: Select all

UUID=8000136C11135A92 /mnt/Win ntfs defaults,nls=utf8,umask=222,noauto 0 0
EDIT: Note: the 2 lines should now look like this:
UUID=8000136C11135A92 /mnt/Win ntfs defaults,nls=utf8,umask=222,noauto 0 0
UUID=1B34235012235CD7 /mnt/WinC ntfs defaults,nls=utf8,umask=222,noauto 0 0
Then run the following command:

Code: Select all

sudo mount -a
If there are any errors post the result. If there are no errors then reboot your box.

Side Issue: The only reference to nemo in my post was this:
If you really need to see what's in there run the file manager with elevated privileges:

Code: Select all

gksu nemo /root
Not sure what desktop environment you are using so substitute nautilus, caja, or thunar for nemo above if you are using something other than Cinnamon.
You command becomes:

Code: Select all

gksu caja /root
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Installation & Boot”