# installing Gentoo Linux on an SSD (no HDD available) - help?

## indietrash

I'll be getting a Zenbook with SSD. I have no clues on what I need to do with SSDs, and the wiki seems a bit outdated as well as targeted at people with HDDs. the Zenbook only has a 128GB SSD, and only 4GB RAM.

so. what do I need to do to ensure the life of my drive? I also want to encrypt it, and have a swap partition (also encrypted). I don't really know how to do that with gentoo either, so help on that would be appreciated as well.

----------

## bjlockie

Do NOT have a swap partition on an SSD.

Add ,noatime,discard to your /etc/fstab

Make /tmp a ram disk with tmpfs.

/var/tmp can also be a ram disk.

I'd use lxde or something else light.

I probably wouldn't use Gentoo on an SSD-only system, something with less frequent updates.

I have an SSD but also hard drives.

----------

## albright

 *Quote:*   

> Do NOT have a swap partition on an SSD. 
> 
> Add ,noatime,discard to your /etc/fstab 
> 
> Make /tmp a ram disk with tmpfs. 
> ...

 

The top suggestions are v. good ideas.

But I wouldn't worry too much.

I've had gentoo on a thinkpad x300 since 2009 with no problems. And the samsung ssd

does not even support trim but still runs as fast as ever.

----------

## indietrash

why not swap?

I definitely need swap. also, according to <https://wiki.archlinux.org/index.php/Solid_State_Drives#Swap_Space_on_SSDs> it should work.

----------

## immudium

 *indietrash wrote:*   

> why not swap?
> 
> I definitely need swap. also, according to <https://wiki.archlinux.org/index.php/Solid_State_Drives#Swap_Space_on_SSDs> it should work.

 

I think the main idea with not having swap is, again, to reduce frequent writes to the SSD.  I don't think it's really a problem with newer SSDs but you can also use swap and reduce the kernel's swappiness as well.  I don't remember the exact kernel parameter but it's easily googled as "ssd swappiness".

----------

## 1clue

Sorry about the interruption, but could one of you ssd old-timers take a look here and give some input?

https://forums.gentoo.org/viewtopic-t-932974-highlight-.html

Thanks.

----------

## eccerr0r

YES swap to SSD for a laptop/notebook/netbook/...

Just try not to use it - reduce swappiness...

The swap isn't for swap, but rather you should have it for hibernation to save battery.

----------

## drescherjm

I just plug the SSD in and pretty much use it as a normal drive. My intel 80 G1 drive that is over 3 years old in my gentoo Mythtv box still has 99% life in it if I am to believe the SMART attribute. Although by now I am using btrfs with the ssd option for the first 2 years of its usage I used ext4. I did turn off access time updates for files and folders however but I usually do that for hard drives as well.

----------

## indietrash

 *eccerr0r wrote:*   

> YES swap to SSD for a laptop/notebook/netbook/...
> 
> Just try not to use it - reduce swappiness...
> 
> The swap isn't for swap, but rather you should have it for hibernation to save battery.

 

I was thinking to reduce swappiness. and yes, I will be needing it primarily (almost exclusively) for hiberate-ram.

 *drescherjm wrote:*   

> I just plug the SSD in and pretty much use it as a normal drive.

 

this is the attitude most people present me with.

----------

## drescherjm

 *Quote:*   

> this is the attitude most people present me with.

 

Most of the guides and tweaks that were talked about years ago when SSDs first became affordable as OS drive replacements were based on the idea that under normal usage that a user could easily wear out a drive if not tweaked. Now that years later we know this to be a totally false premise. I have yet to see a single instance of a user wearing out a SSD at work or on any forum that did not deliberately try to do so. One really has to try hard to wear out a SSD (at least one larger than 16GB) as a result most of these tweaks are totally unnecessary and may just reduce performance.

----------

## asturm

Lately, at € 300,- for a Crucial m4 512 GB I couldn't resist anymore, it is now being delivered and will skyrocket my X200s' performance, extending its life at that.

I've read several more or less outdated guides already, some of with seemed to be more serious:

http://superuser.com/questions/228657/which-linux-filesystem-works-best-with-ssd

http://www.zdnet.com/blog/perlow/geek-sheet-a-tweakers-guide-to-solid-state-drives-ssds-and-linux/9190

Do you have any thoughts on partitioning? Right now I'm having a quite split-up scheme, which somewhat fragments free space - even though I must say I've predicted it all quite well. For the SSD however I tend to have one big partition to max out free space, with the exception maybe of /boot and /var. Unless there is another method of making sure /var can't be eaten up by some runaway process/log?

----------

## drescherjm

I recommend considering using btrfs. Between home and work I am moving that way which for the most part does away with needing partitions even though you may have separate mounts for parts of the system. On my home gentoo myth box moved about 1 year ago to this and it has worked out very well. I reformatted my 80 GB OS ssd with a ~1 GB boot, a small swap (I also have swap on spinners) and the rest for btrfs. Inside btrfs I have subvolumes for my kernel sources, portage and for the OS. I have distfiles on a spinner. This way I can create weekly snapshots for the OS and not have to include the kernel sources, portage and distfiles. I keep at least 3 snapshots so if anything breaks I can go back to a previous working system without much fuss. This was a big need for testing MythTV updates since this is a an application that always must work or at least must be working when I need to record programming for my wife.

----------

## asturm

btrfs as of 3.6 is still EXPERIMENTAL (Unstable disk format) so out of question for a serious system.

ext4 is the fs of choice, maybe with a few tweaks for SSD use.

----------

