18

With lots of guides and setup variations all over the internet, I find it confusing which is which to really follow. Normally, in Windows 8 my setup would be install everything in the HDD and use Intel Smart Response for a speedy setup. However as I am new to Linux I really don't know what to do.

My ideal setup would be something similar to this, but I know for a fact that IRST is not available in Linux so what I intend to do is keep the OS files in the SSD instead and keep my media on the larger HDD. A step by step procedure would be extremely helpful.


Edit: I want a system running solely on Ubuntu, with the SSD to speed things up but setting it in such a way that it does not hasten its lifespan.


# /etc/fstab: static file system information. 
#
# Use 'blkid' to print the universally unique identifier for a 
# device; this may be used with UUID= as a more robust way to name devices 
# that works even if disks are added and removed. See fstab(5). 
# 
# <file system> <mount point> <type> <options> <dump> <pass>

# / was on /dev/sda1 during installation 
UUID=80289460-5983-4349-8afc-6f3119938ee9 / ext4 errors=remount-ro 0 1 

# /files was on /dev/sdb5 during installation 
UUID=c1678c88-5100-41bc-8090-7887f1622c7f /files ext4 defaults 0 2 

# swap was on /dev/sdb6 during installation 
UUID=608e3ec2-c76e-4657-af6d-80793b5f50f6 none swap sw 0 0
Braiam
  • 67,791
  • 32
  • 179
  • 269
Allen
  • 193
  • 2
    Thank you for the link but as I said I am new to Linux, I am not familiar with symlinks etc. Any guide that has no real starting point or just a hint of solution to my confusion is of little help. I just want something like a 10-step list to do it. – Allen Apr 18 '13 at 15:39
  • 1
    Are you planning to dual boot Windows 8 and Ubuntu or delete Windows and make the laptop an Ubuntu only system? – user68186 Apr 18 '13 at 16:10
  • I want a system running solely on Ubuntu, with the SSD to speed things up but setting it in such a way that it does not hasten its lifespan. I know how to clean wipe my drives so step 1 can begin with the actual installation. – Allen Apr 18 '13 at 16:16
  • @user68186, this cannot be done if I need to dual boot Ubuntu and Windows ? – Muhammad Gelbana Nov 17 '13 at 10:28
  • @MuhammadGelbana I am not sure what you asked in the comments to this question. Please use the area for comments under the question for clarifications to the question. And comments under the answer for clarifications to the answer. If you have a new question, please ask a new question after searching to see if that question has been answered already. – user68186 Nov 17 '13 at 21:15

3 Answers3

20

Update

There are other alternatives, bcache, flashcache, dm-cache, EnhanceIO etc. that allow Ubuntu to use a small SSD and a large HDD in ways similar to Windows. See

What are the advantages/disadvantages of different SSD to HDD cacheing options (dm-cache, flashcashe...)? for differences between these.

I have no experience with these tools. See How do I install and use flashcache/bcache to cache HDD to SSD? and ArchLinux Wiki on Bcache for more on some of these methods. Thanks to Fabby for pointing me to these resources.


Original Answer

You are right. The way Windows 8 uses a small SSD and a large HDD is not available to Ubuntu.

Keeping Ubuntu OS in the SSD and the media in HHD makes sense. The /home folder (or partition) usually keeps all the media, documents, for all the users. It also keeps all the user-specific configuration files. So keeping the /home on the SSD will speed up things as the configuration files will be read quickly.

Step 1

Disable Intel Smart Response in BIOS/UEFI. Disable Secure Boot and Fast Boot. Enable Legacy Mode in BIOS if available.

Step 2

Boot from a Live DVD/USB of the version of Ubuntu you want to install and choose "Try Ubuntu." Make sure keyboard, mouse/trackpad, display, sound, Internet connections, webcam and any other things you can think off work in Ubuntu.

Step 3

Install Ubuntu in the SSD. If Legacy Mode in BIOS could not be enabled, see Ubuntu UEFI documentation on how to install. For someone new, it is easier to just have one / ext4 formatted partition with mount point / in the SSD. You can create a second /home partition in the SSD if you want, but that is not essential.

When you get to the point where you have to choose where to install(“Installation Type”),

enter image description here

choose “Something Else”. A new screen will pop out letting you choose where to install Ubuntu, format, make partitions, etc. Follow carefully the bellow:

  1. Choose and format the smaller disk (SSD) as ext4 and mount point / to install Ubuntu
  2. Choose and format the bigger disk (HDD) ext4 to just store media. Assign it a mount point /bigdrive. Alternately assign mount point /mnt/bigdriveor /media/bigdrive. See Why have both /mnt and /media? for more explanations on these alternates. If you use either of the alternates, modify following steps accordingly.
  3. Create a Swap partition at the end of the HDD and assign it the Swap format. It does not need any mount-point.
  4. Finish install and reboot.

Step 4

Verify:

  1. Ubuntu boots correctly.
  2. Everything works as they did when you tried Ubuntu from the Live DVD/USB.
  3. Open Nautilus, the file manager (similar to Windows Explorer) and navigate to File Systems. Verify the folder bigdrive exists. If you can't find bigdrive then it did not get mounted at startup. See mount two hard drives on start up how to fix that.
  4. Create a new folder and a new file in it to see you can actually write in the bigdrive. Delete these.

If you cannot create folders and files in the bigdrive follow these steps to fix the write permission.

  • Open terminal by pressing Ctrl+Alt+T and type

    gksudo nautilus

If this does not work, see How do I start Nautilus as root?

  • Enter your password at the prompt.

  • Within Nautilus, go to File System and find the bigdrive folder icon.

  • Right click on and choose Properties.

  • Go to the Permissions tab.

  • Make sure the Group and Others can Create and Delete Files.

enter image description here

Step 5

  1. Move the big folders in your /home/$USER folder to /bigdrive/$USER. You can do this in Nautilus using "Create New Folder" (for creating the user folder), "Cut" and "Paste" (for the directories). Let's say these folders are:

    ~/bin, ~/Desktop, ~/Documents, ~/Downloads, ~/Music, ~/Pictures, ~/Public, ~/Templates and ~/Videos

  2. Make symbolic links. Open a Terminal by pressing Ctrl+Alt+T and type each line and press Enter: (replace "$USER" by your user name)

    ln -s /bigdrive/$USER/bin/ bin

    ln -s /bigdrive/$USER/Desktop/ Desktop

    ln -s /bigdrive/$USER/Documents/ Documents

    ln -s /bigdrive/$USER/Downloads/ Downloads

    ln -s /bigdrive/$USER/Music/ Music

    ln -s /bigdrive/$USER/Pictures/ Pictures

    ln -s /bigdrive/$USER/Public/ Public

    ln -s /bigdrive/$USER/Templates/ Templates

    ln -s /bigdrive/$USER/Videos/ Videos

More details are at Installing Ubuntu on Samsung 5 (SSD+HDD)

Hope this helps

user68186
  • 33,360
  • Thanks for the straightforward instructions, will definitely test this as soon as my Ubuntu installer download is complete. – Allen Apr 18 '13 at 17:30
  • You are welcome. Feel free to comment if something does not work as expected. I will edit the answer accordingly. – user68186 Apr 18 '13 at 17:33
  • Great everything is working as it should except the big drive. There seems to be permission conflicts, how do I set it? By default read and write are restricted to my account and the option to manage this through GUI is disabled. – Allen Apr 19 '13 at 00:54
  • Can you paste the contents of the file fstab under /etc in the file system in pastebin.ubuntu.com and post the link here? It seems bigdrive is mounted read only. I will edit the answer with the fix. – user68186 Apr 19 '13 at 13:57
  • /etc/fstab: static file system information.

    Use 'blkid' to print the universally unique identifier for a

    device; this may be used with UUID= as a more robust way to name devices

    that works even if disks are added and removed. See fstab(5).

    – Allen Apr 21 '13 at 17:30
  • / was on /dev/sda1 during installation

    UUID=80289460-5983-4349-8afc-6f3119938ee9 / ext4 errors=remount-ro 0 1

    /files was on /dev/sdb5 during installation

    UUID=c1678c88-5100-41bc-8090-7887f1622c7f /files ext4 defaults 0 2

    swap was on /dev/sdb6 during installation

    UUID=608e3ec2-c76e-4657-af6d-80793b5f50f6 none swap sw 0 0

    – Allen Apr 21 '13 at 17:31
  • Note that instead of /bigdrive I used /files Note that I have not deleted a partition also named files in NTFS format, which gets mounted at startup. I also want to disable this. – Allen Apr 21 '13 at 17:33
  • This looks fine. Did you try the change in permission I edited above? Did it work? Does it still work after a reboot? Thanks. – user68186 Apr 21 '13 at 17:34
  • I cannot change anything in permissions for /files as it is owned by root and everything else is greyed out. – Allen Apr 21 '13 at 17:36
  • open nautilus from terminus using gksudo nautilus as described in the answer. Then you will have root access to files. – user68186 Apr 21 '13 at 17:38
  • Hey it works I can edit permissions now, should I choose my username as owner? – Allen Apr 21 '13 at 17:40
  • Keep the user name as root as in the screeshot above. In case you need to create more users for this system. Just change the group and others permission. Then all users will be able to access the /files. Also in Execute allow "executing file as program". – user68186 Apr 21 '13 at 17:42
  • It works thanks, last one how do I disable my NTFS partition also named files from Windows from mounting at startup? This has been lengthy but maybe someone can clean up the thread after this. – Allen Apr 21 '13 at 17:47
  • You are welcome. Please ask a separate question about the NTFS partition. I don't see it in the fstab file. – user68186 Apr 22 '13 at 01:09
  • Why creating swap partition on HDD and not SSD? – umpirsky Jun 24 '13 at 20:24
  • @umpirsky SSD was considered to be more prone to damage by repeated writing as compared with HDD. Thus, the conventional wisdom is to put the swap in the HDD. Newer SSDs are sturdier and can withstand more writes and reads. For a typical desktop user with a computer with 4GB or more RAM, swap may not be needed much and it may not matter. – user68186 Jun 24 '13 at 22:08
  • 1
    +1, excellent answer. Make use of linux's mount points and symlinks. It would require slight setup and maintenance (maybe as new root folders are added), but the whole setup process could be scripted for automated deployment in the future, another bonus. – MDMoore313 Sep 18 '13 at 14:01
  • There is a way to use something similar to "The way Windows 8 uses a small SSD and a large HDD: https://wiki.archlinux.org/index.php/Bcache and http://askubuntu.com/a/340059/344926 – Fabby Feb 05 '15 at 17:06
  • 1
    @Fabby Thanks. I updated the answer with your information. – user68186 Feb 05 '15 at 18:43
3

Short answer: just put the entire filesystem, including home directories, on the SSD, and just mount the HDD somewhere that you can get to it easily, for big files (movies/music/photos, etc).

SSD life

Firstly, you don't need to worry about lifespan with a modern SSD. It'll have a much higher lifetime than an HDD. Even if you write to it heavily, gigabytes or millions of files per day, it'll last decades. Its heads won't crash and it won't be affected by vibration, change in temperature etc like hard drives are. Wear-levelling ensures that you can write to it heavily for many years. (That said, don't do something silly and go without backups.)

What benefits most from an SSD

For ensuring a fast system, the most important parts of your filesystem are, in order:

  • Home directories. This is where your browser caches, thumbnail caches, desktop configuration and so on is stored. This is very frequently read from and written to, so it should be on the SSD - in fact this is the most important part of the system to be on an SSD.

  • /tmp and /var directory. These are fairly frequently written to, but less so than the above. You can use tmpfs for /tmp if you like, but I put both of them on the SSD.

  • /etc and /usr. These are rarely written to but fairly often read from, and will contribute to a faster boot, among other things, if they're on the SSD.

My advice

What I do is simply put the entire root filesystem on the SSD, and mount the HDD under a mount point like /drives/BIGDRIVE (you can use /mnt/BIGDRIVE if you like as many people do; I prefer to use a non-standard directory like /drives over using a standard directory like /mnt for other than its intended purpose).

Then, I symlink into directories on /drives/BIGDRIVE from my home directory. For example, /home/myuser/Data is a symlink into /drives/BIGDRIVE/Data/myuser and /home/myuser/Media is a symlink into /drives/BIGDRIVE/Media. The symlinks to a separate location allow me to later modify the directory structures of the mount points (say, if I wanted to separate media onto a new drive) but keep the same directory structure in my home directory. I use all-caps for the name of the drive's mount point, don't ask me why.

P.S. I do this on Windows (including Windows 8) too. It is still superior to have the SSD as the system drive and just mount the HDD as D:, instead of using Intel Smart Response or similar.

thomasrutter
  • 36,774
2

IRST is not available in Linux

There are alternatives such as bcache. See How do I install and use flashcache/bcache to cache HDD to SSD?

Gabriel
  • 719
  • 7
  • 9