# Linux file systems and disk partition questions



## Darth80 (Jul 22, 2012)

Hey guys,

As a new Linux user, I have some questions about the file system and disk partition I should use for Linux Mint 17.3 Cinnamon on my secondary living room desktop, a 2010 gaming machine (which has now been recycled into a living room computer) with i7-930, 12 GB RAM, GTX 460, one 80 GB SSD, one 1 TB hard drive and one 3 TB hard drive. 

I have not done the transition from Windows 7 to Linux yet as I wanted to be sure of what I do before I do it (or before I ask my local specialised computer shop to do it for me with clear instructions on the end result). 

So here are my Linux file system and disk partition questions:

1) I have read on the internet that for Linux users, it is recommended to use one partition for [OS and software] and another partition for user files and folders because of frequent (yearly ?) Linux OS updates. Do you agree with that statement and/or can you explain?

1.1) That 2010 desktop has a 80 GB SSD, a 1 TB hard drive and a 3 TB hard drive. Should I replace that 80 GB SSD from 2010 with a 250 GB SSD from 2016 for Linux or would 80 GB SSD be more than enough? I want my Linux to run fast, that’s why I love SSD.

1.2) Is it a good idea to have one 80 GB or 250 GB SSD partitioned as one big OS and software partition, with a physically separate 3 TB hard drive for user data? 

2) I have heard that Linux can read NTFS but can’t write (modify) files on NTFS. That would mean that on Linux, I should not have a 3 TB internal hard drive formatted as NTFS?

2.1) What is the best “Linux disk format” to replace NTFS for large internal drives such as 5 TB including files bigger than 4 GB? 

2.2) What is the best “Linux disk format” to replace NTFS for smaller internal SSD drives such as 250 ou 80 GB ?

2.3) What is the best “Linux disk format” to replace NTFS for big external hard drives such as 5 TB including files bigger than 4 GB? Is that new format readable and modifiable by Windows? 

2.4) So far, I intend to do a backup of the 3 TB internal drive (currently formatted in NTFS) on a 5 TB external drive (currently formatted in NTFS). Then, should I format the internal 3 TB drive into “Linux file format” (which would delete everything that is on it right now) ? If I do that, will I be able to copy back the data from the 5 TB NTFS external hard drive to the 3 TB internal hard drive “formatted as Linux would like it” ?

3) Is it true that Windows cannot read any disk formatted in Linux? I guess that is some kind of privacy protection against Windows ?

4) Is the Linux Mint 17.3 Cinnamon file system as tolerant as the Windows file system about which characters are authorized to be part of a file name or folder name? 

4.1) More precisely, if I copy thousands of files from a Windows-formatted external hard drive with hundreds of file and folder names including French characters (à, è, à, ù, û, ë, ê…) other non-standard characters (like the dot and others) which we tolerated by Windows to a Linux-formatted internal hard drive, what will happen? 

4.2) Will some of those files “just not copy” ? If that happens, will I get an error message for every single file so that I get a chance to change it on the spot or afterwards?

5) Files names: I was previously told that “Filesnames limit are 255 characters but à, è, é, ë, û, ù ? are all accepted as is any locale, french , Russian etc”. So during the installation process, if I pick the French option when installing Linux, then Linux will be able to handle characters such as “à, è, é, ë, û, ù” in the files names without doing weird stuff? 
5.1) Are such French file names ONLY tolerated by the French installation of Linux Mint Cinnamon 17.3 ? Or would they be tolerated by the English version as well?

6) Is the 255 character limit a limit of file name, or does the 255 characters include the pathway to that file like C:/…/…/…/file.docx ? That would make it shorter than Windows’s limit, I believe? I tend to have deep architectures sometimes…

I look forward to reading you !


----------



## hal8000 (Dec 23, 2006)

At the moment what is installed on each of these hard drives?
Need to know if one is windows, which one contains your video files, etc

80G SSD

1G HD

3G HD

Can you also state what names windows is using e.g. C:\ drive 80G SSD

The next thing you have to do is try the 64bit version of Mint 17.3 DVD and choose to boot from it. Make sure you have a working display, sound and internet connection. It will not touch your hard drive.

If its KDE then open dolphin. The left hand pane will show your hard drives and you should be able to see the contents (and play and read your video files). Have you really
got 255 character names?
Some questions have been answered below.

http://www.techsupportforum.com/for...-to-linux-before-windows-10-hits-1098233.html


----------



## Gary R (Jul 23, 2008)

1. It is common for many Linux users to format their drives with the following partitions ...


Root - in which the "system" files are kept.
Home - in which your personal files are kept.
Swap - which acts as a sort of "paging out" area for memory. Not really necessary if you have a lot of memory ... see https://www.linux.com/news/all-about-linux-swap-space

As you suppose, the reason for keeping your personal files separate is to make upgrading your Linux install easier. You are wrong however about having to upgrade Linux every year. If you install one of the LTS (long term support) distros you will not have to upgrade as often (usually a LTS distro is supported for 5 years).

For a guide for installing Linux Mint see ... Guide To Install Linux Mint 17 & 16 In Dual Boot With Windows ... which will explain more than I have time to.

2. Linux is compatible with a number of different file systems ... https://help.ubuntu.com/community/LinuxFilesystemsExplained ... each has its pluses and minuses, so read through them and decide which is the best for your purposes. See also ... https://en.wikipedia.org/wiki/Comparison_of_file_systems

The "standard" installer for Mint usually defaults to *Ext4* file format ... https://en.wikipedia.org/wiki/Ext4

3. Depends which file system you choose to use. Windows will not read many of the file formats commonly used with Windows, but as explained in the last question, you could choose to use NTFS file system in your Linux install. I have not done this personally, so can't tell you whether it creates problems or not.

4. With Ext4 the only character you can't use is null apart from that you can use any Unix character.

5. With Ext4 name length is 255 characters.

6. With Ext4 the 255 characters is for name, pathlength is unlimited.


----------



## Darth80 (Jul 22, 2012)

Hey guys, here’s an answer for both of you:

*So the current situation is like this:*
C drive: 80 GB SSD: Windows 7 is there currently. 

D drive: 1 TB HD: some secondary Windows programs like CCleaner 

E drive: 3 TB HD: user data here

*The final situation would be like this:*
80 GB SSD:Linux Mint Cinnamon 17.3 only (no Windows). Should a SSD drive running the OS be formatted as Ext4? Would you recommend replacing it with a new 250G SSD so that all my future Linux programs can be installed on it and run super fast? From what I’ve heard of Linux, 80 GB might even be sufficient?

How should that 80 GB SSD be partitioned in Linux?

20 GB Root partition, on Ext4

If I set 20 GB, does that mean that I cannot install more than 20 GB of Linux software here? Or is just for the Linux OS itself?

Swap partition: I have 12 GB of RAM on that computer. Should I set 24 GB of Ext4 space for swap? Should that swap be on my small 80 GB SSD drive (for speed) or my big (slower) 3 TB hard drive? I guess that might not be entirely necessary, but doing this would eliminate one question for the diagnostic list (“Do you have swap space?”) if something goes wrong as a first time user.

Even if I did that, I would have 80 – 20 – 24 = 36 Go left on that SSD. What should be done with that space? My intention is that I want to make it available for Linux software, because I will not accumulate personal user files here. How do I make it available for Linux software?​1 TB HD: next format would be Ext4. Deleting Windows programs like CCleaner doesn’t trouble me because they won’t be useful on Linux.

3 TB HD:before I switch to Linux, I will backup only this drive to an external drive (in NTFS). Then I will switch to Linux and format this internal drive as Ext4 (therefore deleting everything). Then I will copy back the files from the external hard drive (in NTFS) to the internal hard drive in Ext4. Would this plan work?

My plan would be to format it as one huge 3 TB Ext4 “Home” partition for personal files. Would that work as a simple and practical solution? Would it also work with a 5 TB hard drive, for example?​It should be noted that this Linux project is about a secondary computer, so I will have another computer functional during the transition if something goes wrong (but I am trying to make it work on a first try).

*Other questions:*

However, I was puzzled by this bit about the “super standard installation”: what is that and do I need it as a new Linux user?“Ext3 = Standard linux filesystem for many years. Best choice for super-standard installation.

Ext4 = Modern iteration of ext3. Best choice for new installations where super-standard isn't necessary.”
https://help.ubuntu.com/community/LinuxFilesystemsExplained​About the DVD boot test for my hardware: I have already performed that test before choosing Linux Mint Cinnamon 17.3 as my distribution. It worked well. It’s a good thing you mention it though: better be safe than sorry.

I would need some precision on the following because I didn’t understand your answer from the previous tread:Files names: I was previously told that “Filesnames limit are 255 characters but à, è, é, ë, û, ù ? are all accepted as is any locale, french , Russian etc”. 

So during the installation process, if I pick the French option when installing Linux, then Linux home desktop will be able to handle characters such as “à, è, é, ë, û, ù” in the files names without doing weird stuff like "&eacute" instead of "é" for exemple?

5.1) Are such French file names ONLY tolerated by the French installation of Linux Mint Cinnamon 17.3 ? Or would they be tolerated by the English version as well? 
​Any thoughts on this ? I am still hesitating between the French and English version of Linux: I am bilingual, mainly French, but I also want to able to get support if I have problems (easier in English), and screenshots of French error messages are probably useless to you guys? I guess I would attempt to translate if that happens?

About file name restrictions: ok, so Ext4 folder name or file name can be anything except null However, NTFS can do that too according to the wiki page. However, Windows OS + NTFS doesn’t allow “?” in file name, for example. So there must be some other kind of limitation… any thoughts on this? I don’t care about the specific case of “?”, but more about the general idea of why some characters are refused and if there is a list of such characters formally refused by Linux Mint + Ext4 ?

Your comment about LTS encourages me a lot as a new Linux user. So I won’t have to do a big OS upgrade for 5 years unless I want to. However, will I still get incremental security updates through the Update Manager during those years?

About the 255 characters being only for file names (excluding file path): you say that path length is unlimited. Is it really the case on Linux? On Windows, I (very rarely) get an error message about a file having a too long pathway and I correct the situation. That’s never the case on Linux ?!?

*Other things I learned:*
I like the illustrated installation guide, impressive!

I have read a little bit about ext4: I am impressed by the fact that ext4 seems to beat NTFS on file size limit (16 TiB vs 2 TiB) and partition size limit (millions of terabytes vs 256 TiB). All those numbers are way above anything I could ever need, so I am happy.

I also learned a little bit about Kilobyte(KB) = 1000 bytes vs Kibibyte(KiB) = 1024. Apparently only used to make the memory capacity look bigger on an external hard drive box.

I was also impressed to learn that Linux allows you to change a file or delete it while it is opened by a program, while Windows (NTFS and FAT) doesn’t allow that. Linux really works differently!


----------



## hal8000 (Dec 23, 2006)

For now just keep your 80G SSD.

With 12G RAM you do not need a separate /swap partition, just increase / space a little to 30G, should your system ever need swap its allocated under /.
The / space is only for linux system software, a complete install plus development packages is probably only 25G but without development packages
less, mine is <8G

The rest of the drive allocate to /home and make both / and /home ext4.
The Mint DVD will do this for you.

One Warning: Make absolutely sure it is the 80G drive, as your other drives are 1TB and 3TB its difficult (but not impossible) to get this wrong.
Install it in English, most forums and support prefer english, but it will read all
your French character, as did the live CD.

For now, you can backup your other drives if you want to but they will be recognised by Linux Mint.
Your drives will become /dev/sda, /dev/sdb and /dev/sdc (but not neccessarily in the same order as windows) the only thing you need to check is when installing the drive is the 80G one.


----------



## hal8000 (Dec 23, 2006)

If you're still unsure boot from the live Mint CD and open the terminal
and post the output of:

sudo fdisk -l

This will list all drive information, the 80G SSD may not be sda, it depends
if its on the first SATA port so you can post the output before you start your
install if you want.


----------



## Fjandr (Sep 26, 2012)

One thing to note is that Linux partitions are a LOT more flexible than Windows partitions. If you find yourself running out of space on your /home partition, you can mount an entire separate hard drive partition into a folder under /home (or anywhere else) and it will act for almost all practical purposes as if it's a single, seamless chunk of space. You can also create virtual partitions by combining partitions across multiple drives.


----------



## Darth80 (Jul 22, 2012)

Hey guys,

1) Here is the feedback for the command you proposed: there is one warning in the output that worries me, can you please comment on that? Is it sill possible to convert the “/dev/sdc” 3 TB hard drive to ext4 to do a big “3 TB /home partition” on that drive? (I added the bold fonts, the original warning message was just plain text)
[email protected] ~ $ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4c608d1f

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 156299263 78046208 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4c608d07

Device Boot Start End Blocks Id System
/dev/sdb1 2048 1953521663 976759808 7 HPFS/NTFS/exFAT

*WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.*


Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdc1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.​2) About the installation process:

My overall idea for that (secondary) computer is to switch from “just Windows 7” to “erase everything and start back with just Linux Mint 17.3 Cinnamon, with all hard drives formatted as ext4” to make it easy in Linux and prevent (potential ?) problems from managing internal NTFS drives.

I will backup the data to an external drive before I do so

Do you believe that I should go with this Linux installation guide :
Guide To Install Linux Mint 17 & 16 In Dual Boot With Windows
or this one ?
Howto Install Linux Mint 17.3 Rosa Cinnamon Edition 

or another one ?

3) I want that computer to run a simple user. Is there any practical or security disadvantage at using the default “’Mint” user?

4) I also want that simple user not to have admin rights. When I install something in Linux, I want to be specifically asked for a super user / admin password for more security. How do I configure that? 

Should I configure a separate user for that or is it simpler / recommended to simply have "a superuser password without a an entirely different superuser account" ?

Should it be done before or after the installation? 

Which types of characters are authorized in a Linux admin password?

3) Do you have any further comments that may help me to install Linux Lint Mint 17.3 Cinnamon (on a secondary computer) as a new user to Linux? I am considering taking a day of holiday to install it right and do some configuration and patching afterwards. I will set it up to use the “Canadian French” keyboard (hoping Linux has it, but should be ok since there seem to have many keyboard options), the QWERTY one that produce “à” by doing ` then a (not s single button for à)

4) @Fjandr: impressive ! I didn’t know you could add space to a /home partition from a new, additional and physically separate internal hard drive !

5) Other things I discovered

So I did a second round of tests by using my liveboot DVD of Linux.
I discovered that Linux can read, modify and save files on NTFS partitions. That could be useful for external hard drive management, for example.

Linux (in English by default in the liveboot) was able to open French file names like é è ë à ê ù û ç, which is great.

You’re right, I better go for the English version of Linux: it does support French characters in file names and getting help on the error messages will be a lot easier than in French.


----------



## Fjandr (Sep 26, 2012)

1) The warning doesn't matter if you aren't trying to manipulate the partition with fdisk. Once you have backed up any data on that drive you wish to preserve, you can erase the GPT partition and create a new ext4 partition.

2) You can use either, but the first one is geared toward creating a functional dual-boot system. As you've said you want the machine to be a dedicated Linux box, it would be simpler to follow the instructions in the second one.

3) No, there are not really any security or practical issues running as the default created user.

4) While I have never used Mint personally, if it's like almost any other distribution it will prompt you to create an ordinary user account. Super user rights are only granted by default to the "root" account. You'll likely be asked to set a password for root, or it will set the root password to be the same as the user account created during installation. Actually using root privileges requires either logging in via the root account, escalating your user privileges using the "su" command (this literally switches the user you're interacting as; by default to root, but you can switch to any user with the command), or executing single commands through the "sudo" command. Additionally, most distributions do not add the first user account to the sudoers file. Only those accounts listed in the sudoers file are allowed to execute privileged commands via the "sudo" command.

You should use a separate user account. You can't separate root privileges from the root account, and it's a bad idea to log in as root for any task which does not absolutely require being run as root. Get in the habit early of never using the root account for anything you can accomplish (almost) any other way.

You can use almost any character in a password that is available using any of the extended ASCII code tables.

5) You'll be able to set up any keyboard layout you want, and hundreds you've probably never heard of.  There are layouts which provide accented characters with a single keystroke, or you can set a key that operates as (I think it's called) the Option key, which allows for typing almost any extended character with two strokes.

6) Partition and file management have all sorts of really cool tricks in Linux. Symbolic linking is a like a shortcut on steroids. You can make links to files, folders, mount points, etc, anywhere you like, and they operate for the most part as common sense would dictate. If you want a directory in /home/stuff that acts as a mount point for an entire hard drive, you can do that. Or you can link it to a directory that's 16 places deep somewhere in an external archive. Or pretty much anything else you could want to do.

7) You can read and write NTFS drives. It's pretty stable, for the most part. And yes, the installation language only changes the interface messages. It doesn't even affect the keyboard layout, which is set independently. Linux doesn't differentiate between character sets. Any installation can correctly read and write in any character set.


----------



## Darth80 (Jul 22, 2012)

Hey guys,

I attempted to install Linux, but a weird error and a few unexpected questions prevented me from completing the partition part of the installation. That secondary computer still runs Windows 7 for now. I need your help on the following matters:

*1) One thing that I did not expect: the following 2 questions for every new partition I create during the Linux installation process from the DVD:*

1.1) The choice between making this partition “Primary” or “Logical”: what’s the difference and does it matter? 

I did some research and some people say it doesn’t matter too much, although you can only boot from a Primary partition and that there seem to be some kind of limitation to 4 “Primary” partitions under some systems (but not all systems).

During the installation process, I observed that the default setting for the first partition on a disk was Primary, and when I recreated a second partition on that disk, the default setting was Logical.80 GB SSD: all of it in Ext4, with a 30 GB “/” (root) partition (Primary ?), and the rest as “/home” (Logicial ?)

3 TB hard drive: all of it in Ext4, with one huge “/home” partition (Primary ?) for this disk: this will be the main place where I store user data.

1 TB hard drive: all of it in Ext4, with one huge “/home” (Primary ?) partition for this disk.​1.2) And the choice to start this partition at the start or at the end. I assume that this is used to place it after or before the previous partition on that same physical drive and does not have big consequences. Is that the case?

1.3) I was really happy to see that the disks are not formatted (the choice is not final) until you click next (you may click Back to revert if you haven’t clicked Next yet, I guess), which is great for my case since I had deleted the Windows 7 partition before I saw the following error message, which brings up point number 2:

*2) The big error message preventing me from going any further:*











That happened when I attempted to do this:










Also, if I put “/home” on the sdv 1 TB hard drive, I would get the same error message, but about that 1 TB drive this time:










Basically, it seems like you can only have ONE “/home” partition. However, that doesn’t work for me, because I want to be able to store my user files at more than one place (see the 3 disk setup described above in the current post). 

What's wrong here ?

If I can’t have 3 places named “/home”, what should they be to achieve this purpose?

*3) Usual DVD boot error message*

Every time I use the Linux Mint 17.3 Cinnamon DVD to boot up Linux (before installing), an error very briefly pops up on the screen. I didn’t pay too much attention to it until now because everything worked when I tested functions with the live boot DVD like sound and opening files. However, this time, I prepared myself and successfully took a picture during the 2-3 seconds during which the error is visible:

The error is at the very top left of the screen and shows this (the rest of the TV screen is pure black):










The error is displayed every time I boot that DVD. It happens somewhere after the Linux Mint 10 seconds countdown before it attempts to boot. A short amount of time after this error appears, the Linux Mint log on screen appears and everything seems normal on the surface.

However, I did check the MD5 checksum of the .iso file against the official website (where I got the download link) and it matched. 

I also did an integrity self-check (by pressing space during the 10 seconds countdown for Linux boot), which didn’t seem to yield any result, so I assumed it was fine. Is it supposed to say “everything is ok” ?

I look forward to reading your solutions !


----------



## Gary R (Jul 23, 2008)

There are 2 different types of disk partitioning, MBR *Master Boot Record* (which was used up until Windows 7), and GPT *GUID Partition Table* which is used on more modern machines.

Which you have will determine the number of physial (primary) partitions you can have on a hard drive. With a MBR partitioned machine you can have a maximum of 4 physical (primary) partitions, whereas with a GPT you can have as many as you wish.

Now there may be times when someone with a MBR partitioned machine needs more than 4 partions, in which case you can sub-divide one of the physical (primary) partitions into "logical" partitions.

The following article will explain partitioning using GParted much better than I can ... GParted partitioning software - Full tutorial ... GParted is the partitioning tool that comes pre-installed on most Linux distros, and is the one that is usually used to partition your drive on install.


----------



## hal8000 (Dec 23, 2006)

You can only have one / partition and one /home partition as mount points.
You can create different mount points for your other drives.

So to start out, format the 80G SSD as primary / size 30G primary /home (rest of drive) as ext4.

The primary/logical only applies to the MBR partition table. The MBR has been good for 30 years but only works with drives up to 2.2TB. If you use an MBR with your 3TB drive it will only see it as 2.2TB as you need to use parted or gparted to create a GUID table for the 3TB drive.

What you need to do is create different mount points for your other drives.
For example if the 3TB drive is full of videos mount it under /videos or /media/videos.
If your 1TB drive contains backup or music, suitable mount points could be
/media/backup or /media/data

Whatever name you choose it has to be different from the other mount points
You could however call them /home2 or home3 for example.

So, to summarize on MBR partition tables you can only have 4 primary partitions (this is not too important as you are only using / and /home).
Both can be primary and choose start of drive so there are no gaps.

When you choose a mount point make sure that your 1T and 3T have different mount points. You can call them home2 or home3 or video or backup
or anything as long as the names are different.


----------



## Darth80 (Jul 22, 2012)

Hey guys, 

1) So I did some reading as you suggested. However, one thing is still unclear to be: is it possible to transform a computer running a Master Boot Record (MBR) into a computer running another type of boot record such as GPT (GUID Partition Table) ? That tutorial talks about changing partitions and etc, but not about transforming a MBR into another type of boot record such as GPT.

The overall goal is that I want my secondary Windows 7 computer to be transformed into a Linux Mint computer able to see drives bigger than 2.2 TB, which can't be done under its current MBR from what you wrote. What surprises me is that computer running Windows 7 does see the 3 TB internal hard drive as 2.7 TB which is bigger than 2.2 TB.

1.1) Does a computer have only one boot record for interpreting all disks or is there one boot record (MBR, GUID or etc) for every single disk?

2) What type of boot record would you recommend for this computer ? GPT or something else ?

2.1) Are there any significant disadvantages to your recommended boot record ?

3) What's the best way to install your recommended boot record, keeping in mind that the end goal is to transform that secondary Windows 7 computer into Linux Mint computer seeing drives bigger than 2.2 TB and that all disks will be reformated in ext4 at some point of the procedure?


----------



## hal8000 (Dec 23, 2006)

Darth80 said:


> Hey guys,
> 
> 1.1) Does a computer have only one boot record for interpreting all disks or is there one boot record (MBR, GUID or etc) for every single disk?
> 
> ...



Every hard disk uses its own partition table. This table is either MBR or GUID.
For your large 3TB disk the partition table needs to be gUID otherwise if were
to make it MBR the size would only be about 2.2TB

When you install on the 80G SSD you can use an MBR it will not affect reading your other disks, and remember you only need / say 30G ext4 and /home rest of drive as you have 12G RAM and wont need a /swap file.

IN fact you can keep the 3G as it is, it will already be GUID and probably formatted as NTFS. If you want to make it ext4 then backup all the software first. You can do this before or after you install linux.

The only changes you make to make is that your 1T and 3T drives have unique mount point names. home2 home3, video, or backup are all suitable names.


----------



## Darth80 (Jul 22, 2012)

Hey guys, so I successfully installed Linux Mint 17.3 with the Cinnamon desktop, but I do have 3 questions:

1) I also installed GUFW and rkhunter. I updated rkhunter and did a scan. However, I don’t seem to have the necessary rights to view the log file that was generated: I went to the designated path for the log file and when I double-clicked it, it didn’t work. How can that be? How can I read that log? I also tried to right click the file to see if I could change permission, but the owner was the root and I could not change that. I also saw that there is an “x” on the icon of that file. Please see the 2 following screenshots:





















2) I took a screenshot of problem #1, put the file on a USB key and brought it to a Windows machine to write this. The Windows machine saw the file and recognized its format as a picture but could not open that file. Back to the Linux machine, the file could be opened. I believe it is because the default Linux Mint screenshot-generated file included the time and the time’s format was XX:XX:XX. The “:” isn’t accepted in Windows but clearly seems to be accepted in Linux. Could that be the reason? Should I expect further similar incompatibilities about user files between Linux and Windows?

3) Also, in “System settings” / Language, there is an option for Language support, and additional languages can be added. What does that do? It is to add Canadian French to get spellcheck somewhere or something similar to that?

4) Any further or additional advice for a new Linux user is also very welcome.

PS: I look forward to reading you: your technical expertise in Linux is impressive and you have been very supportive of my project to switch my secondary computer to Linux ! :smile:


----------



## Gary R (Jul 23, 2008)

Open a terminal and enter the following code ...

*sudo chmod 755 /var/log/rkhunter.log*

... which will give you read and execute permissions for the *rkhunter.log* file.

You'll be prompted for your password, when you hit return after entering the code.

Enter your password, and you should now be able to open *rkhunter.log* with one of the Linux text editors (like gedit).

The following article describes file permissions in Linux in more detail ... Learning the shell - Lesson 9: Permissions


----------



## Darth80 (Jul 22, 2012)

Hey guys,


3 questions this time:


1) It worked, I now have access to the rkhunter log. It's a huge quantity of “not found” rookits (great !) and some warnings at the end. I freshly installed Linux only a few days ago on that PC (it was on Windows 7) , so I assume that the following warnings at the very end of the log are just normal and do not require any user action for further security? What do you think of this ?
[10:07:40] Info: Starting test name 'filesystem'
[10:07:40] Performing filesystem checks
[10:07:40] Info: SCAN_MODE_DEV set to 'THOROUGH'
[10:07:40] Checking /dev for suspicious file types [ Warning ]
[10:07:40] Warning: Suspicious file types found in /dev:
[10:07:40] /dev/.udev/rules.d/root.rules: ASCII text
[10:07:40] Checking for hidden files and directories [ Warning ]
[10:07:40] Warning: Hidden directory found: /etc/.java: directory
[10:07:40] Warning: Hidden directory found: /dev/.udev: directory
[10:07:40] Warning: Hidden file found: /dev/.initramfs: symbolic link to `/run/initramfs'
[10:07:49]
[10:07:49] Info: Test 'apps' disabled at users request.
[10:07:49]
[10:07:49] System checks summary
[10:07:49] =====================
[10:07:49]
[10:07:49] File properties checks...
[10:07:49] Files checked: 134
[10:07:49] Suspect files: 0
[10:07:49]
[10:07:49] Rootkit checks...
[10:07:49] Rootkits checked : 292
[10:07:49] Possible rootkits: 0
[10:07:49]
[10:07:49] Applications checks...
[10:07:49] All checks skipped
[10:07:49]
[10:07:49] The system checks took: 59 seconds
[10:07:49]
[10:07:49] Info: End date is Mon May 23 10:07:49 EDT 2016​2) I need your expert eyes: do the 10 lines of code suggested in this solution seem legitimate (and not harmful) ?



http://support.eset.com/kb3723/ 



That solution is a solution to the following problem:


I really feel safer when I have real-time antivirus protection covering Linux and Windows viruses. I have found a program who does it (ESET NOD32 Antivirus for Linux Desktop), but a small change is required to make the GUI work in recent Linux versions that use "systemd" (the rest of the program appears to work well, I've seen the pop-up showing it updated its virus database, the only problem is that I cannot open the GUI).


I was recommended this solution by those people's customer care, but I am not sufficiently competent in Linux to determine if that solution is legitimate or harmful (I suspect that it's just a good temporary fix for their product's GUI while we wait for the permanent fix). I know that you don't think there are Linux viruses, but I really feel safer when I have real-time protection to protect this Linux machine and prevent it from passing Windows viruses to my Windows machine via USB keys or else.

3) About formatting that 3 TB hard drive now that I see that Linux works: do I have the right to format it as ext4 and call it something with a space like "/my documents" or can it only me something without space like "/mydocuments"?

I look forward to reading you! :smile:


----------



## hal8000 (Dec 23, 2006)

2 quick answers

1) Rkhunter.log is normal and all is ok


2)
That code for ESET is not going to work in Mint because systemctl does not exist and therefore wont start

https://sites.google.com/site/easylinuxtipsproject/security

The advice is not to install AV software just let AV software run on windows.

If you want an AV that doe work take a look at ClamAV:
https://forums.linuxmint.com/viewtopic.php?t=123127


3)Dont use spaces in mountpoints. It is better to call it mydocuments
with no space. To format as ext4 you use sudo

sudo fsck.ext4 /dev/sdx1

Repacing sdx1 with correct partition. WARNING. Get this wrong and you are 
reinstalling, so if unsure open a terminal and post output of:

sudo fdisk -l


----------



## Darth80 (Jul 22, 2012)

Hey guys,

I attempted to format a new 4 TB hard drive with the recommended command line and I didn't work. With the details below, can you please help ?

I bought a new internal 4 TB drive at my favourite local computer shop, which had also assembled that computer years ago (and all my previous custom computers of the last decade). They physically connected the hard drive inside the computer. I can see the hard drive in Linux. However, I can't format it because of the following error log. How do I solve this?

I'm pretty sure they did a good job (they have been doing so for more than a decade), but if they did not, I still got my invoice for the hard drive purchase and connection inside the computer (probably valid for 30 days).Disk /dev/sdc: 4000.8 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders, total 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdd: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdd1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
[email protected] ~ $ sudo fsck.ext4 /dev/sdc
e2fsck 1.42.9 (4-Feb-2014)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdc

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

[email protected] ~ $ sudo fsck.ext4 /dev/sdc
e2fsck 1.42.9 (4-Feb-2014)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdc

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
​


----------



## hal8000 (Dec 23, 2006)

Ok, be EXTREMELY careful. 
Read the error messages slowly.
Look at what you have told us:

SDC = 4G
Disk /dev/sdc: 4000.8 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders, total 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.

SDD = 3TB
Disk /dev/sdd: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdd1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
[email protected] ~ $ sudo fsck.ext4 /dev/sdc
e2fsck 1.42.9 (4-Feb-2014)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdc


You have probably backed up your 3TB drive which is now /dev/sdd but in which case youve just wiped it clean.

Your new 4TB is device sdc. Device enumeration depends on cable postion and the message already says that sdd contains a GPT partition table.
So now just one step per post, open your terminal and type:

sudo parted /dev/sdc (press return)

mkpart (press return)

Partition name? (enter a name here like backup no spaces and only use a -z and 1 - 0, backup2 is ok)

Filesystem type? (enter ext4 and press return )

Start? ( enter 1 and press return)

End? (enter 4000.8G and press return)


Press print
(this will show you new gpt partition name)

Press quit to exit parted.

Now reboot so that the kernel sees the new partition table on sdc.
Create ext4

sudo mkfs.ext4 /dev/sdc1

You cannot use fdisk, cfdisk or any other MBR partition table tool. You can
only use parted or gparted on GPT drives.

I'll check for your replies every day. You've not done anything bad apart
from wipe a drive that was already backed up.


Heres one of my 1G flash drives, same sequence formatted as a GPT table:



```
sudo parted /dev/sdc
GNU Parted 2.3
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt                                                      
Warning: The existing disk label on /dev/sdc will be destroyed and all data on this
disk will be lost. Do you want to continue?
Yes/No? Yes                                                               
(parted) print
Model: Easy Disk (scsi)
Disk /dev/sdc: 1032MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart
Partition name?  []? video                                                
File system type?  [ext2]? ext4                                           
Start? 1                                                                  
End? 1032M                                                                
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i                                                          
(parted) print                                                            
Model: Easy Disk (scsi)
Disk /dev/sdc: 1032MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name   Flags
 1      17.4kB  1032MB  1032MB  ext4         video

(parted) quit                                                             
Information: You may need to update /etc/fstab.
```
When you get a brand new hard drive, before you format it, you have to create a
partition table. The shop may have already done this as your message shows it
already contains a GPT partition, so just read through this last reply and and type the
instructions to create a new partition.

The other thing forgot to mention is that with SATA drives they are recognised
by the position of the SATA connector, so as highlighted in red, your 3TB drive is
now sdd and the new 4TB drive is sdc.

Its ok to make these mistakes when trying out something new but you need to
take extreme care with any disk operation and formatting as work on the wrong drive
and you will wipe your data.


----------



## Darth80 (Jul 22, 2012)

Hey there,

I want to reassure you that I have not accidentally formatted my old 3 TB hard drive: the files are still on it (and I do have an external backup). When I attempted to format sdc, it was after the 4 TB was internally connected inside the computer and became the sdc (the 3 TB became the sdd).

I tried the procedure you offered. It almost worked. 

the "mkpart" command didn't work and the error message made me believe that I had to use the "mklabel gpt" command. I did that and I could use mkpart afterwards.

I formatted as you suggested and including a restart before the mkfs command and I restarted afterwards as well.

I was slightly confused by "Press print" (I thought you might mean printscreen), but I just typed "print" + enter and that worked.

However, here's the problem: I attempted to save a test file on that newly formatted hard drive with LibreOffice Write and I could not. I did get an error message. I can't copy files to it either, but I didn't get an error message for that.

I supplied my logs below and a screenshot of the error message: 

First log:2016-06-05 manip 1

[email protected] ~ $ sudo parted /dev/sdc
[sudo] password for eric1:
GNU Parted 2.3
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mkpart 
Error: /dev/sdc: unrecognised disk label 
(parted) mklabel gpt
(parted) mkpart 
Partition name? []? mesvideos
File system type? [ext2]? ext4 
Start? 1 
End? 4000.8G 
(parted) print 
Model: ATA ST4000DM000-1F21 (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 4001GB 4001GB mesvideos

(parted) quit 
Information: You may need to update /etc/fstab. 

[email protected] ~ $ ^C
[email protected] ~ $
​Second log:[email protected] ~ $ sudo mkfs.ext4 /dev/sdc1
[sudo] password for eric1:
Sorry, try again.
[sudo] password for eric1:
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
244195328 inodes, 976754176 blocks
48837708 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
29809 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done 
Writing inode tables: done 
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 

[email protected] ~ $
​Then I attempted to save a test file on it from LibreOffice Writer and I got this error message:









Also, I copied a test file and I attempted to paste it on the newly formatted 4 TB hard drive and I could not paste it. No error message. Just doesn't work. I could easily copy the same test file towards the 3 TB hard drive.

I look forward to reading you! :smile: Thanks for your dedication to helping new Linux users !


----------



## hal8000 (Dec 23, 2006)

Good work with parted !

mklabel gpt

is the command to create a gpt partition table. Looks like this was needed
but according to previous output said it already was a gpt table...... the shop may have created this under windows or something.

You're almost ready to write to this drive. It will only be a permission problem or mismatch in the filesystem table.

Can you now open a terminal and post the output of these commands:

sudo parted

This print out your gpt partitions. (scroll the mouse over the text output it will
be highlighted then right click to copy) You can paste the output with next reply. Type "quit" and enter to exit parted.

cat /etc/fstab

Last command does not need sudo access.


----------



## Darth80 (Jul 22, 2012)

I tried what you suggested and got an output, but I didn't seem like the output we needed. So I improvised a little bit afterwards and I think I got the kind of output you were looking for to help you diagnose the problem.

Here is the full output where I tried what you suggested, and afterwards I improvised:

[email protected] ~ $ sudo parted
[sudo] password for eric1:
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) cat /etc/fstab 
align-check TYPE N check partition N for TYPE(min|opt)
alignment
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on
COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition
table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on
partition NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
resizepart NUMBER END resize partition NUMBER
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table,
available devices, free space, all found partitions, or a particular
partition
quit exit program
rescue START END rescue a lost partition near START
and END
resize NUMBER START END resize partition NUMBER and its file
system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition
NUMBER
unit UNIT set the default unit to UNIT
version display the version number and
copyright information of GNU Parted
align-check TYPE N check partition N for TYPE(min|opt)
alignment
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on
COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition
table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on
partition NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
resizepart NUMBER END resize partition NUMBER
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table,
available devices, free space, all found partitions, or a particular
partition
quit exit program
rescue START END rescue a lost partition near START
and END
resize NUMBER START END resize partition NUMBER and its file
system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition
NUMBER
unit UNIT set the default unit to UNIT
version display the version number and
copyright information of GNU Parted
(parted) quit 
[email protected] ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=b4c2549a-fd05-4085-b779-3a6c43dad593 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda5 during installation
UUID=f3726aec-2eac-4f4f-ac4b-99f1786d7701 /home ext4 defaults 0 2
[email protected] ~ $ sudo parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print 
Model: ATA INTEL SSDSA2M080 (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 30.0GB 30.0GB primary ext4 boot
2 30.0GB 80.0GB 50.0GB extended
5 30.0GB 80.0GB 50.0GB logical ext4

(parted) help 
align-check TYPE N check partition N for TYPE(min|opt)
alignment
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on
COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition
table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on
partition NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
resizepart NUMBER END resize partition NUMBER
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table,
available devices, free space, all found partitions, or a particular
partition
quit exit program
rescue START END rescue a lost partition near START
and END
resize NUMBER START END resize partition NUMBER and its file
system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition
NUMBER
unit UNIT set the default unit to UNIT
version display the version number and
copyright information of GNU Parted
(parted) print all 
Model: ATA INTEL SSDSA2M080 (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 30.0GB 30.0GB primary ext4 boot
2 30.0GB 80.0GB 50.0GB extended
5 30.0GB 80.0GB 50.0GB logical ext4


Model: ATA WDC WD10EALS-00Z (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary ntfs


Model: ATA ST4000DM000-1F21 (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 4001GB 4001GB ext4 mesvideos


Model: ATA ST3000DM001-1ER1 (scsi)
Disk /dev/sdd: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 134MB 134MB Microsoft reserved partition msftres
2 135MB 3001GB 3000GB ntfs Basic data partition msftdata


(parted) quit 
[email protected] ~ $


----------



## hal8000 (Dec 23, 2006)

OK, I should have said:

sudo parted /dev/sdc
(type print and enter)

But you got all the info I needed in the end.

Currently your filesystem table looks like below:


[email protected] ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=b4c2549a-fd05-4085-b779-3a6c43dad593 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda5 during installation
UUID=f3726aec-2eac-4f4f-ac4b-99f1786d7701 /home ext4 defaults 0 2

TYpe

sudo gedit /etc/fstab

Then add this last line:
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=b4c2549a-fd05-4085-b779-3a6c43dad593 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda5 during installation
UUID=f3726aec-2eac-4f4f-ac4b-99f1786d7701 /home ext4 defaults 0 2
/dev/sdc1 /media/mesvideos ext4 defaults,exec 0 2

Save the file and exit gedit.

( If gedit is not installed type:
sudo apt-get install gedit )

Now create a mount point:

sudo mkdir /media/mesvideos

After that try mounting the new hard drive:

sudo mount /media/mesvideos

You should not get an error.
Then type:
df -m

This should give you the information about the hard drives.
You should be able to create a shortcut to the new drive icon on your
Cinnamon desktop and it should be browsable from the file manager.

You should also be able to write and delete files on it. A reboot
is not required but you can reboot if you want.

If you get "permission denied" then I'll give you a command to
change all files and subdirectories to your username, but I think
it will work.


----------



## Darth80 (Jul 22, 2012)

I did as you suggested then rebooted. I still cannot copy a file to that new 4 TB hard drive. 

The log below leads me to believe that it might be because the new 4 TB hard drive is not assigned to my user. I have some difficulty understanding why a hard drive cannot be access by my user unless my user specifically owns that hard drive.

I have also observed that when I connect an USB key to that desktop, the window is located in:
/media/eric1/KINGSTON

It looks like I can only modify a hard drive if it's under /media/eric1 (even though I am the only user on this machine). Is this normal default Linux Mint behaviour ?

Installing a new hard drive on Linux is quite a task: the level of difficulty is much higher than I expected.

The log:

[email protected] ~ $ df -m
Filesystem 1M-blocks Used Available Use% Mounted on
udev 5992 1 5992 1% /dev
tmpfs 1202 2 1200 1% /run
/dev/sda1 28032 5686 20900 22% /
none 1 0 1 0% /sys/fs/cgroup
none 5 0 5 0% /run/lock
none 6007 1 6007 1% /run/shm
none 100 1 100 1% /run/user
/dev/sda5 46831 489 43942 2% /home
/dev/sdc1 3755448 68 3564591 1% /media/mesvideos
/dev/sdd2 2861459 2390897 470563 84% /media/eric1/extra storage
[email protected] ~ $

**
It should be noted that this line:
/dev/sdd2 2861459 2390897 470563 84% /media/eric1/extra storage

Is not there when I boot the computer. It's only there if I open the 3 TB hard drive with the file explorer. My personal interpretation would be that this internal NTFS drive gets automatically mounted like that when I open it.


----------



## hal8000 (Dec 23, 2006)

Darth80 said:


> I did as you suggested then rebooted. I still cannot copy a file to that new 4 TB hard drive.
> 
> [email protected] ~ $ df -m
> Filesystem  1M-blocks Used Available Use% Mounted on
> ...


No its there and mounted at boot time under /media/mesvideos.

All you have to do is change the owner and group to your username.
Open a terminal and type:

whoami


Note the output, it may say "eric1" or whatever username you created. 
Then enter this command


```
sudo  chown  -R  eric1:eric1  /media/mesvideos
```
You MUST replace eric1 with your username (output of whoami).
Thats it.

You can now read and write to /media/mesvideos.
Take time with the command and remember its case sensitive.

If you want the icon on your desktop then you need to create a
link or shortcut to it.
What did you install Mint kde or Mint Cinnamon or another version?


----------



## Darth80 (Jul 22, 2012)

That technique worked ! I can save and copy files to the 4 TB hard drive now!

I installed Linux Mint Cinnamon. I believe it's the most popular version?

Is it always this complex to install a new internal hard drive on Linux or was this a though ride?

EDIT: I would now want to transform that 3 TB NTFS drive into a 3 TB ext4 drive named /mydocuments or something similar in French. I assume that it would be in /media/mydocuments/, along with the 4 TB who is now /media/mesvideos

It's backup, so I will be able to put back the files after the formatting.

Could you provide the correct way to do this based on what you have learned from my setup from the process of doing it with the 4 TB ?


----------



## hal8000 (Dec 23, 2006)

Darth80 said:


> That technique worked ! I can save and copy files to the 4 TB hard drive now!
> 
> I installed Linux Mint Cinnamon. I believe it's the most popular version?
> 
> ...



What you've done is quite easy and is just basic linux administration. In 6 months time
or so you will look back and see its only a matter of formatting and adding a new mount point.


OK the 3TB drive is sdd , size 3000.6G. First step is to back up your software (you may have done this. Then you use parted to create a gpt table and partition

sudo parted /dev/sdd
(parted) mklabel gpt
(parted) mkpart
(parted) mklabel gpt
(parted) mkpart
Partition name? []? mesdocuments
File system type? [ext2]? ext4
Start? 1
End? 3000.6G
(parted) print 
Should show new partition. Change name "mesdocuments" to My Documents in French,
no spaces, no special charcters
quit

Last command exits from parted.

Format the drive as ext4
sudo mkfs.ext4 /dev/sdd1


Now create a mountpoint
sudo mkdir /media/mesdocuments

Now edit fstab:
sudo gedit /etc/fstab

add a line:
/dev/sdd1 /media/mesdocuments ext4 defaults,exec 0 2

Try and mount the drive:
sudo mount /media/mesdocuments

(If you get an error just reboot and try mount command again.)

Finally change the ownership to your username

sudo chown -R eric1:eric1 /media/mesdocuments




Thats it all in one reply. Just make sure eric1 is changed to your username
and that "mesdocuments" is the same name in all of the commands.
Mon Français n'est pas bon.


----------



## Darth80 (Jul 22, 2012)

That's a very good summary of what we accomplished !

It worked ! I can save files to that drive or copy files to it. I decided to go for "mesdocs" because it's shorter. 

Your French is better than most English-speaking people in the world


----------



## hal8000 (Dec 23, 2006)

Ok, well done Darth on setting up your 3TB and 4TB drives.
The first six months of using linux are make and break for many people. If you can get past the first 6 months (as in my case) I think you will probably use linux all the time.

I'm going to mark this thread as [solved] in the title bar shortly, but feel
free to start new threads about any other linux topic you need support with.


----------

