Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-14-2016, 10:23 PM   #1
Registered: Jul 2016
Location: Bumblefuck
Distribution: Windows7 Windows10 Ubuntu16 KaliRolling
Posts: 60

Rep: Reputation: Disabled
Preparing SSD for Linux installation

Whats up guys....I recently picked up an SSD for my new laptop and was wondering what to do when preparing it for new installation of linux? I know that I should limit the read/write as much as possible so was seeing if anyone has any experience with them and what should be done.

What I got so far is to update firmware, use EXT4, deff kill the swap, reduce time stamps, and move /tmp on the RAM? Also, is it better to install everything on a single partition or break it down a little?

Any help would be great
Old 11-14-2016, 11:19 PM   #2
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
You just do it like with a HDD. After you have the operating system installed you can update the firmware, but that is usually not necessary. Only update the firmware if you know why you are doing it.
Old 11-14-2016, 11:53 PM   #3
Registered: Nov 2015
Distribution: Debian Sid
Posts: 119

Rep: Reputation: 51
I've heard that SSDs are degrading a lot slower than they predicted, as far as I know most people don't worry too much about limiting the writes. My current one has lasted four years just fine with pretty heavy use.

If you want to squeeze out every last write, though, here are some tips:

- I'd guess the most important thing for the average user is to disable browser caching. For Chromium I think the way to do this is to launch it with the --disk-cache-dir=null option.
- It also couldn't hurt to add noatime to the drive's fstab entry.
- As for swap, I never need it, but you might if you're doing a lot of fancy video games or movie editing or something. A better option than totally nixing it might be to adjust your swapiness, so it uses it as infrequently as possible. I'm not sure if all distros do swappiness the same way, so you should google it for yours.
- Assuming systemd, check your /etc/systemd/journald.conf file and set Storage=volatile, or none.
- Your filesystem keeps tracks of its lifetime writes. You can check with, for example:
dumpe2fs /dev/sda4 | grep "write"
Mine shows over a terabyte for the currently installed OSes, and there have been three or four others that I've clobbered.

I'm not sure how much use /tmp actually sees for the average user, I'd guess not all that much. Upgrading frequently increases the writes a lot though, I'd limit it to monthly upgrades.

How many partitions you use shouldn't directly effect anything. I only use about 8 gigs per Linux, and I like to have three or four Linuxes, so my 120 gig hard drive has four partitions with OSes, twenty gigs each, and a 40 gig data partition that they all mount, for music and such. Having multiple partitions per OS tends to be more trouble that it's worth, for me anyways.

Edit: Note some interesting math here: 1 tb / 120 gb = 8.33 writes per byte. SSDs distribute writes evenly across the drive. If I remember correctly, they last for 100,000 writes or more. So unless you're running a server or something, you should be fine.

Last edited by crazy-yiuf; 11-14-2016 at 11:58 PM.
Old 11-15-2016, 07:49 AM   #4
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
you can also set up your system within fstab or by a cron job to trim or do something called "discard" with your sdd to keep it 'fresh.'

which is up to you to do either or not at all. It seems everyone has their own take on which is better, trim or discard.

I use trim via cron

userx@voided1.what~>> ls /etc/cron.weekly

userx@voided1.what~>> cat /etc/cron.weekly/trim
echo "*** $(date -R) (root)***" >> $LOG
fstrim -v / >> $LOG
echo "*** $(date -R)-(data) ***" >> $LOG
fstrim -v /media/data >> $LOG
Log looks like this
userx@voided1.what~>> cat /var/log/trim.log
*** Thu, 03 Nov 2016 07:05:01 -0500 (root)***
/: 22 GiB (23576133632 bytes) trimmed
*** Thu, 03 Nov 2016 07:05:02 -0500-(data) ***
/media/data: 179.4 GiB (192636121088 bytes) trimmed
*** Thu, 10 Nov 2016 06:13:01 -0600 (root)***
/: 19.2 GiB (20584620032 bytes) trimmed
*** Thu, 10 Nov 2016 06:13:02 -0600-(data) ***
/media/data: 170.2 GiB (182745985024 bytes) trimmed
as far as breaking it down.
I separate root / and /home period, for the purpose of ease to re-install the system without worry of loss of user data.

as far as swap I just added a swap file on my sdd, and keep it there that I turn on only when needed.

it is a faster swap being sdd only started up if and when needed, which is not very often.

the rest I keep the entire OS on /
/home is on a hybrid 750GB HDD 7200rpm

Last edited by BW-userx; 11-15-2016 at 08:00 AM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to use a SSD for installation of 2 Linuxes ? droid.c3p0 Linux - Newbie 4 09-10-2016 11:35 AM
Install Linux in Toshiba u940 series with 32gb ssd and 750gb hdd I would like to have boot code in ssd only cvkchary Linux - Laptop and Netbook 4 08-31-2016 04:26 PM
Preparing for Glibc installation yougene Slackware 14 12-02-2005 03:54 PM
RPM Installation - Preparing, then exit CeleronXL Linux - Software 2 10-06-2003 07:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration