tupacsoul
October 7th, 2013, 06:09 PM
Hi guys. After 2 days trying to create the perfect configuration for my Asus K56CM, I want to share a guide done by me with help of another guides like this: http://ubuntuforums.org/showthread.php?t=2117166
My laptop configuration:
- Intel i5
- nVidia 635m Optimus
- 500Gb HD
- 24Gb SSD
- 6Gb Ram
I do this tutorial because my laptop came with Windows 8, and it uses Expresscache for SSD cache of the system. In linux, Expresscache is not supported, so I used Flashcache.
The configuration of this tutorial is going to be:
- Ubuntu 13.04
- Intel Rapid (for quick start)
- Flashcache (for ssd cache)
- Bumblebee (for nVidia Optimus cards)
Step 0: download the Ubuntu image you want to use. In my laptop I used Xubuntu 13.04 (http://xubuntu.org/)
Once downloaded, write it on an USB drive. I used LiLi to do it.
Step 1: Configure BIOS UEFI
- On start, press ESC until boot menu, then select System Setup.
- Go to Advance tab and on SATA operation, mark AHCI
- Go to Boot tab and un boot #1 select UEFI USB.
- Reboot
Step 2: preparing disk partitions.
- With the USB plugged, select Try ubuntu without installing.
This laptop came with 500Gb HDD and 24Gb SSD, so we are going to use HD to host the system and SSD to mount the cache and EFI.
I've used the next partitions for the SDA(HDD):
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 5,9G 0 part [SWAP]
├─sda2 8:2 0 117,2G 0 part /
└─sda3 8:3 0 342,7G 0 part
And in SDB(SSD):
sdb 8:16 0 22,4G 0 disk ├─sdb1 8:17 0 250M 0 part /boot/efi
├─sdb2 8:18 0 5,9G 0 part
└─sdb3 8:19 0 16,3G 0 part
- Open Gparted.
- Delete all partitions (this will erase all your data)
- In SDA make the next partitions:
-- 4Gb for SWAP
-- 120Gb for /
-- The rest for /home
- In SDB make the next partitions:
-- 256mb for EFI
-- 6Gb for Intel Rapid
-- The rest for Flashcache
Of course, you can change sizes as your thought.
- Download Gdisk. Open Terminal and:
sudo apt-get install gdisk
- Now we are going to select the disk to use Intel Rapid:
sudo gdisk /dev/sdb
type P and take the 6Gb disk number
type T and use the number taken before
As HEX CODE, use: D3BFE2DE-3DAF-11DF-BA40-E3A556D89593
Confirm
Type W and confirm again
Step 3: Install Ubuntu
Now, Install Ubuntu. In the installation, you're going to be asked where to install. Select the next partitions:
- SDA1 as Swap
- SDA2 as /
- SDA3 as /home
- SDB1 as EFI
Then, finish the installation.
Step 4: Install flashcache for /home
Flashcache is used to cache any partition to powerboost your laptop, making not to write everytimes on HD. Our SSD is very small to cache all the system, so we are only goint to cache /home
- Install git and dev tools:
apt-get install git-core git build-essential dkms linux-headers-`uname -r` uuid-dev
- Clone the Flashcache git:
git clone https://github.com/facebook/flashcache.git
- Make install
cd flashcache
sudo make -f Makefile.dkms all boot_conf
sudo make install
sudo modprobe flashcache
sudo echo "flashcache" >> /etc/modules
- Verify the installation:
dmesg | tail
- Activate root user for unmount /home
sudo su
passwd (AND SET A PASSWORD)
- Logout from Ubuntu and login as root
- Open Terminal and unmount /home
umount /home
- Create the flashcache for /home
lsblk (and sure which partition is going to be the cache)
blkid (and take the ID of /home partition)
flashcache_create -p back home_cached /dev/sdb3 /dev/disk/by-uuid/THEUUID
- Now set it to FSTAB. Comment the /home mounting and add:
#
FLASHCACHE/dev/mapper/home_cached /home ext4 defaults 0 2
- And now, we make a script to reload flashcache every reboot:
sudo nano /etc/init.d/flashcache.sh
- We put this:
#!/bin/sh#
flashcache_load /dev/sdb3
- Change the permissions:
sudo chmod +x /etc/init.d/flashcache.sh
- And we add to rc.local
sudo nano /etc/rc.local
#!/bin/sh -e#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sh /etc/init.d/flashcache.sh
exit 0
- Now, only reboot. You will be caching.
Step 5: Installing bumblebee for nVidia Optimus
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic
reboot
My laptop configuration:
- Intel i5
- nVidia 635m Optimus
- 500Gb HD
- 24Gb SSD
- 6Gb Ram
I do this tutorial because my laptop came with Windows 8, and it uses Expresscache for SSD cache of the system. In linux, Expresscache is not supported, so I used Flashcache.
The configuration of this tutorial is going to be:
- Ubuntu 13.04
- Intel Rapid (for quick start)
- Flashcache (for ssd cache)
- Bumblebee (for nVidia Optimus cards)
Step 0: download the Ubuntu image you want to use. In my laptop I used Xubuntu 13.04 (http://xubuntu.org/)
Once downloaded, write it on an USB drive. I used LiLi to do it.
Step 1: Configure BIOS UEFI
- On start, press ESC until boot menu, then select System Setup.
- Go to Advance tab and on SATA operation, mark AHCI
- Go to Boot tab and un boot #1 select UEFI USB.
- Reboot
Step 2: preparing disk partitions.
- With the USB plugged, select Try ubuntu without installing.
This laptop came with 500Gb HDD and 24Gb SSD, so we are going to use HD to host the system and SSD to mount the cache and EFI.
I've used the next partitions for the SDA(HDD):
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 5,9G 0 part [SWAP]
├─sda2 8:2 0 117,2G 0 part /
└─sda3 8:3 0 342,7G 0 part
And in SDB(SSD):
sdb 8:16 0 22,4G 0 disk ├─sdb1 8:17 0 250M 0 part /boot/efi
├─sdb2 8:18 0 5,9G 0 part
└─sdb3 8:19 0 16,3G 0 part
- Open Gparted.
- Delete all partitions (this will erase all your data)
- In SDA make the next partitions:
-- 4Gb for SWAP
-- 120Gb for /
-- The rest for /home
- In SDB make the next partitions:
-- 256mb for EFI
-- 6Gb for Intel Rapid
-- The rest for Flashcache
Of course, you can change sizes as your thought.
- Download Gdisk. Open Terminal and:
sudo apt-get install gdisk
- Now we are going to select the disk to use Intel Rapid:
sudo gdisk /dev/sdb
type P and take the 6Gb disk number
type T and use the number taken before
As HEX CODE, use: D3BFE2DE-3DAF-11DF-BA40-E3A556D89593
Confirm
Type W and confirm again
Step 3: Install Ubuntu
Now, Install Ubuntu. In the installation, you're going to be asked where to install. Select the next partitions:
- SDA1 as Swap
- SDA2 as /
- SDA3 as /home
- SDB1 as EFI
Then, finish the installation.
Step 4: Install flashcache for /home
Flashcache is used to cache any partition to powerboost your laptop, making not to write everytimes on HD. Our SSD is very small to cache all the system, so we are only goint to cache /home
- Install git and dev tools:
apt-get install git-core git build-essential dkms linux-headers-`uname -r` uuid-dev
- Clone the Flashcache git:
git clone https://github.com/facebook/flashcache.git
- Make install
cd flashcache
sudo make -f Makefile.dkms all boot_conf
sudo make install
sudo modprobe flashcache
sudo echo "flashcache" >> /etc/modules
- Verify the installation:
dmesg | tail
- Activate root user for unmount /home
sudo su
passwd (AND SET A PASSWORD)
- Logout from Ubuntu and login as root
- Open Terminal and unmount /home
umount /home
- Create the flashcache for /home
lsblk (and sure which partition is going to be the cache)
blkid (and take the ID of /home partition)
flashcache_create -p back home_cached /dev/sdb3 /dev/disk/by-uuid/THEUUID
- Now set it to FSTAB. Comment the /home mounting and add:
#
FLASHCACHE/dev/mapper/home_cached /home ext4 defaults 0 2
- And now, we make a script to reload flashcache every reboot:
sudo nano /etc/init.d/flashcache.sh
- We put this:
#!/bin/sh#
flashcache_load /dev/sdb3
- Change the permissions:
sudo chmod +x /etc/init.d/flashcache.sh
- And we add to rc.local
sudo nano /etc/rc.local
#!/bin/sh -e#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sh /etc/init.d/flashcache.sh
exit 0
- Now, only reboot. You will be caching.
Step 5: Installing bumblebee for nVidia Optimus
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic
reboot