Setting up Ubuntu

Key points/notes on how I did it:

Ubuntu and Windows Dual Boot - Partitioning Definitions

  • Since Windows eats memory like a cookie monster, I wanted to allocate more memory to it. Accordingly, I created an ample - way more ample than required, 150 GB devoted to Ubuntu, and the rest to Windows.

  • I did not create a separate partition for the /home directory (because all my work is secured on GitHub anyways, and secondly Ubuntu is pretty good at managing upgrades so it’s not like I’ll have to back up all my stuff there). In addition I’ve got a separate HDD where I’ll be storing anything which requires huge amounts of read/write cycles. I decided upon adding a swap partition only after getting through the successful installation seeing I have a massive 32 GB of RAM to play with.

  • I wanted swap to be on a different disk to the SDD. Can it be done? According to this post, it can! This post was quite helpful in creating the swap partition on the HDD: https://askubuntu.com/questions/180730/how-do-i-restore-a-swap-partition-i-accidentally-deleted
  • I then had to edit /etc/fstb in order to tell linux about this partition and to load it and use it if necessary. Also seeing that I could not add the swap directory as an extended partition I realised that since I am booting in EFI mode.

  • You don’t want to defragment your SDD. Let me say again, if you defrag your SSD you will be severly handicapping its lifespan. But when you are creating a partition there will be some very minor writes to it as it’s being formatted (distinct from defragementing).

Mounting:

  • Create paritions for the external HDD. Then set permissions for for a mount point under the home directory. This post was inordinately helpful:
  • https://ubuntuforums.org/showthread.php?t=1935435
  • https://help.ubuntu.com/community/Fstab

And this helped with finding the UUID (which is an ID attached to the UbuntuHDD partition which I created):

  • https://askubuntu.com/questions/386536/how-to-find-the-attached-devices-uuid-through-terminal

  • Because I’m using a SDD I could afford to dump my swap partition onto a HDD, that was in the unlikely event of RAM overflowing, then it could be dumped in that slow and expensive virtual memory.

  • I will now hack out a separate partition within the massive UbuntuHDD partition which I can use as a swap drive.

Optimizing for SDD Operations: do-s and don’t-s

  • UEFI: set it to AHCI. Why? Because it is better. Here’s one such post
  • Ample overprovisioning undertaken.
  • TRIM supported.
  • Trimming is probably best done daily rather than weekly, because you don’t have to wait that long to utilize recoverable storage space. But in my particular circumstances, I have plenty of memory, so I can afford to wait a little more.
  • Reduce the inclination to swap.
  • Leave at least 20% of each linux partition free!! (It helps preserve your SSD).

Other Tips

Please refer to this article:

  • Don’t defrag.
  • Don’t wipe (i.e. you’ll never need to wipe/overwrite considering Ubuntu 18.04 will support TRIM). But there’s no need for it on an SSD where TRIM is supported.
  • Don’t store large things there.
  • Avoid constant writes - i.e. log writes etc.

Other Problems

  • We’ve got a subscription to Kaspersky (terrible program btw). I wonder if they actually do anything at all. The second I install it things stop working. I keep getting these: “The application was unable to start correctly (0xc0000005)” errors. And it all turned pear shaped when I installed Kaspersky. Ugh. If I don’t get a solution quick enough then the only other solution is to get rid of Kaspersky. I’d just use the Windows Defender instead.

  • I followed these instructions here and blindly edited the registry: http://www.eassos.com/how-to/fix-error-code-0xc0000005.php

Written on July 26, 2018