Install ubuntu
From CSBLwiki
<html> <style type="text/css">
.basic {
font-family : helvetica; font-size : 12pt;
}
pre {
font-size : 12pt; padding: 10pt; margin: 5pt 0; border: 2px solid #abcdef; background-color: #f9f9f9; font-family:sans-serif; line-height: 160%;
}
</style> </html>
|
Clean installation of ubuntu in the SSD with HDD being used /home folder.
1. Installation of ubuntu
- Boot with live ubuntu CD
caution : disconnect internet, otherwise you will get retrieving error (stop at 43 of 53)
- Select erase and install ubuntu (second option)
- File system: ext4 or btrfs
- Complete installing ubuntu
- Boot with live ubuntu cd and select 'try ubuntu'
- Execute gparted partition editor
Remove linux-swap (It occupies too much space) Remove Exteend Extend /dev/sda1 to full capacity leaving 1 GB (1000 MB) Create Extended partition to allocate (1 GB) (partition type: Extended) Create linux-swap space occupying 1 GB 'Apply'
- Restart
2. Optimization to SSD
- turn on Trim
Edit /etc/fstab UUID=ac39c463-fe88-45ea-a4dd-f4eb6117141c / ext4 discard,noatime,errors=remount-ro 0 1
- tunr off swap
Edit /etc/sysctl.conf vm.swappiness=1 vm.vfs_cache_pressure=50
3. Mounting HDD to home folder
In case, mounting HDD containing home folder files, create all users before mounting to prevent overwritting.
To get more information, go https://help.ubuntu.com/community/Partitioning/Home/Moving
- Find the uuid of the Partition
$ sudo blkid
take note (copy&paste into a text-file) the uuid of the partition that you have set-up ready to be the new /home partition.
- Setup fstab
Duplicate your fstab file: $ sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d) Compare the two files to confirm the backup matches the original:
$ cmp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
Open the original fstab in a text editor:
$ sudo vim /etc/fstab
And add these lines into it
(identifier) (location, eg sda5) (format, eg ext3 or ext4) (some settings) UUID=???????? /home ext3 nodev,nosuid 0 2and replace the "????????" with the UUID number of the intended /home partition.