Installing Linux on a new SSD (in a desktop PC with a second hard drive)
If, like me, you have a lot of data and a suitable conventional hard drive (HDD), then I recommend that you just buy the smallest, good-quality SSD you can find.
30GB or 60GB is more than enough to accommodate a Linux distro.
6 SSDs to consider:
http://www.pcadvisor.co.uk/test-cent...views-3235200/
NB Do bear in mind that cheaper, smaller capacity versions of the these drives are available in addition to the featured ones.
See the original LQ thread and further details about SSDs at:
http://www.linuxquestions.org/questi...sd-4175571647/
This blog features a fresh installation of Linux Mint 17.3 Cinnamon 64 bit onto a 120GB Samsung 850 SSD in a desktop PC, which has a 1TB HDD as a second drive for data storage.
The HDD is called drive2 and the username is jimmy.
Please change these to your own details.
NB BACKUP all personal data before proceeding with a change of drive!
Open the case of the desktop PC and locate the internal SATA 3 (or SATA 2) ports on the motherboard. Connect the SSD to port 0 and HDD to port 1, using either SATA 3 or SATA 2 cables.
SATA 2 ports/cables are rated at 3 Gbps and SATA 3 are rated at 6 Gbps.
Don't worry if your motherboard only has SATA 2 ports, or you have lost the SATA 3 cables for your SATA 3 port motherboard, because the SSD is so fast, you will hardly notice.
SATA 3 cables are cheap in any event.
Using gparted, or similar partitioning software, partition both of the drives:
http://gparted.org/livecd.php
SSD (sda)
Suggested partitions:
root.......15GB to 20GB (ext4), swap 2GB, /home for the remainder (ext4)
HDD
Format the whole partition (sdb) to ext4.
Next, insert the Linux Mint 17.3 DVD, then reboot to install Mint 17.3.
Do Mint updates via Terminal:
Next, find the UUID of the HDD. In Terminal, type:
Copy the UUID of HDD:
Example: /dev/sdb1: UUID="94b3caef-4536-4ba6-ae70-44ca89bbdeb7"
NB Ignore the quotation marks when copying!
Then, create a new directory (drive2), followed by modifications to /etc/fstab file:
Next, modify the /etc/fstab file by pasting in the copied UUID (without quotation marks!) for the HDD:
Example:
# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
# /media/drive2 was on /dev/sdb1
UUID=94b3caef-4536-4ba6-ae70-44ca89bbdeb7 /media/drive2 ext4 defaults 0 2
# / (root) was on /dev/sda1 during installation
UUID=4a8455b4-7b5a-4365-9267-85bcaf551133 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=2df03568-787c-418d-b6b5-21c262813c7c /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=17e15732-47dd-4661-8327-dbb4a90be070 none swap sw 0 0
NB Make sure all pass numbers are correct.
1 for root, 0 for swap, 0 or 2 for /home and drive2.
File > Save and Close.
Next, mount drive2:
Then reboot:
Next, give the user permission:
Next:
First, create the following (7) directories on the HDD.
Go to the home folder on the SSD and find drive2. Right click inside drive2, then left click on “Create Folder”.
Create and name these folders:
Documents, Downloads, Music, Pictures, Public, Templates, Videos.
Next, delete the existing, corresponding folders in the home directory on the SSD, but leave the Desktop folder untouched.
Note that ~ means /home/jimmy
Next, make the symbolic links:
Next, do these 3 modifications:
1. Modify /etc/fstab file:
Now add noatime to the line for your root partition and /home
but NOT to the line for the swap partition!
Save & Close.
…......................................................................................
2. Swappiness > Change to 1
Type in the terminal (use copy/paste):
Press Enter.
Add the following lines, at the very end of the existing text in that file (use copy/paste to avoid errors):
Save & Close.
…...........................................................................................
3. Change the Disk I/O scheduler to deadline for the SSD drive.
Change:
TO:
Save & exit.
Then:
General points with the latest (Feb 2016) SSDs:
1. There is no need to move /var, /tmp and others to the HDD.
2. As of Ubuntu 14.04, scheduled TRIM is enabled by default for Intel, Samsung, OCZ, Patriot and Sandisk SSDs, so there is no need to use discard.
NB For some Linux distros and other SSD manufacturers it may be necessary to manually run fstrim occasionally.
Here are three articles about using fstrim, which may be useful:
How to enable TRIM:
http://askubuntu.com/questions/18903/how-to-enable-trim
Optimise your Solid State Drive for Linux Mint 18.1, Ubuntu 16.04 and Debian:
https://sites.google.com/site/easylinuxtipsproject/ssd
Enable TRIM on SSD:
http://www.webupd8.org/2013/01/enabl...te-drives.html
30GB or 60GB is more than enough to accommodate a Linux distro.
6 SSDs to consider:
http://www.pcadvisor.co.uk/test-cent...views-3235200/
NB Do bear in mind that cheaper, smaller capacity versions of the these drives are available in addition to the featured ones.
See the original LQ thread and further details about SSDs at:
http://www.linuxquestions.org/questi...sd-4175571647/
This blog features a fresh installation of Linux Mint 17.3 Cinnamon 64 bit onto a 120GB Samsung 850 SSD in a desktop PC, which has a 1TB HDD as a second drive for data storage.
The HDD is called drive2 and the username is jimmy.
Please change these to your own details.
NB BACKUP all personal data before proceeding with a change of drive!
Open the case of the desktop PC and locate the internal SATA 3 (or SATA 2) ports on the motherboard. Connect the SSD to port 0 and HDD to port 1, using either SATA 3 or SATA 2 cables.
SATA 2 ports/cables are rated at 3 Gbps and SATA 3 are rated at 6 Gbps.
Don't worry if your motherboard only has SATA 2 ports, or you have lost the SATA 3 cables for your SATA 3 port motherboard, because the SSD is so fast, you will hardly notice.
SATA 3 cables are cheap in any event.
Using gparted, or similar partitioning software, partition both of the drives:
http://gparted.org/livecd.php
SSD (sda)
Suggested partitions:
root.......15GB to 20GB (ext4), swap 2GB, /home for the remainder (ext4)
HDD
Format the whole partition (sdb) to ext4.
Next, insert the Linux Mint 17.3 DVD, then reboot to install Mint 17.3.
Do Mint updates via Terminal:
Code:
sudo apt-get update && sudo apt-get upgrade
Code:
sudo blkid
Example: /dev/sdb1: UUID="94b3caef-4536-4ba6-ae70-44ca89bbdeb7"
NB Ignore the quotation marks when copying!
Then, create a new directory (drive2), followed by modifications to /etc/fstab file:
Code:
sudo mkdir /media/drive2
Code:
gksudo gedit /etc/fstab
# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
# /media/drive2 was on /dev/sdb1
UUID=94b3caef-4536-4ba6-ae70-44ca89bbdeb7 /media/drive2 ext4 defaults 0 2
# / (root) was on /dev/sda1 during installation
UUID=4a8455b4-7b5a-4365-9267-85bcaf551133 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=2df03568-787c-418d-b6b5-21c262813c7c /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=17e15732-47dd-4661-8327-dbb4a90be070 none swap sw 0 0
NB Make sure all pass numbers are correct.
1 for root, 0 for swap, 0 or 2 for /home and drive2.
File > Save and Close.
Next, mount drive2:
Code:
sudo mount /dev/sdb1 /media/drive2
Code:
sudo reboot
Code:
sudo chown -R jimmy:jimmy /media/drive2
First, create the following (7) directories on the HDD.
Go to the home folder on the SSD and find drive2. Right click inside drive2, then left click on “Create Folder”.
Create and name these folders:
Documents, Downloads, Music, Pictures, Public, Templates, Videos.
Code:
/media/drive2/Documents/ /media/drive2/Downloads/ /media/drive2/Music/ /media/drive2/Pictures/ /media/drive2/Public/ /media/drive2/Templates/ /media/drive2/Videos/
Note that ~ means /home/jimmy
Code:
sudo rmdir ~/Documents sudo rmdir ~/Downloads sudo rmdir ~/Music sudo rmdir ~/Pictures sudo rmdir ~/Public sudo rmdir ~/Templates sudo rmdir ~/Videos
Code:
cd ~ ln -s /media/drive2/Documents/ Documents ln -s /media/drive2/Downloads/ Downloads ln -s /media/drive2/Music/ Music ln -s /media/drive2/Pictures/ Pictures ln -s /media/drive2/Public/ Public ln -s /media/drive2/Templates/ Templates ln -s /media/drive2/Videos/ Videos
1. Modify /etc/fstab file:
Code:
gksudo gedit /etc/fstab
Now add noatime to the line for your root partition and /home
but NOT to the line for the swap partition!
Code:
ext4 noatime,errors=remount-ro 0 1 ext4 noatime,defaults 0 1
…......................................................................................
2. Swappiness > Change to 1
Type in the terminal (use copy/paste):
Code:
gksudo gedit /etc/sysctl.conf
Add the following lines, at the very end of the existing text in that file (use copy/paste to avoid errors):
Code:
# Sharply reduce swap inclination vm.swappiness=1
…...........................................................................................
3. Change the Disk I/O scheduler to deadline for the SSD drive.
Code:
gksudo gedit /etc/default/grub
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=deadline"
Then:
Code:
sudo update-grub
1. There is no need to move /var, /tmp and others to the HDD.
2. As of Ubuntu 14.04, scheduled TRIM is enabled by default for Intel, Samsung, OCZ, Patriot and Sandisk SSDs, so there is no need to use discard.
NB For some Linux distros and other SSD manufacturers it may be necessary to manually run fstrim occasionally.
Here are three articles about using fstrim, which may be useful:
How to enable TRIM:
http://askubuntu.com/questions/18903/how-to-enable-trim
Optimise your Solid State Drive for Linux Mint 18.1, Ubuntu 16.04 and Debian:
https://sites.google.com/site/easylinuxtipsproject/ssd
Enable TRIM on SSD:
http://www.webupd8.org/2013/01/enabl...te-drives.html
Total Comments 0