Ubuntu – Dual Boot with SSD and HDD Storage

boothard drivessd

I currently have a 1TB HDD setup to dual boot Win7 and Ubuntu 12.04. I am purchasing a 256GB SSD and another 1TB HDD. My intentions are as follows:

  1. Setup the SSD as my dual boot device with Adobe CS6 and my other major programs.
  2. Maintain my existing HDD as Storage only.
  3. Install new 1TB HDD as an internal backup.

Is there an article or guide that covers the following:

  1. Backing up all partitions
  2. Migrating all partitions to boot SSD
  3. Formatting and partitioning HDD to facilitate file storage from both Win7 and Ubuntu
  4. Re-pointing Ubuntu Music, Pictures, Documents and Downloads to storage device. I have this covered for Windows.
  5. Restoring personal files from backup

I have a fair idea of what I need to do but I don't want to botch the migration as it is my work machine. Any tips would be much appreciated.

Best Answer

I have a setup similar to yours (Dual boot SSD, storage HDD, but no backup HDD). In order to migrate your partitions to the SSD it would be ideal to simply clone the drive using CloneZilla as detailed in this post. This should enable you to also keep the existing data on your current HDD until you're sure the migration went well. I would also probably clone the drive onto the 2nd HDD first for redundancy.

Once you have the SSD booting correctly, you'll want to format the storage disk as NTFS. This is the windows native filesystem and modern linux can handle read/write with no trouble at all. I tend to keep a partition on the storage drive formatted as ext4 just in case the NTFS partition gets corrupted, but that isn't strictly necessary.

Redirecting Music/Pictures/Documents/Downloads is easy. Once your storage drives are properly configured, you setup Ubuntu to mount those partitions at boot. Then you can remove the default directory structure in your /home directory and replace everything with a symbolic link to the storage device.

In order to get the storage device mounted at boot, you might want to have a mountpoint in /media off the root filesystem, which you could make with:

$ sudo mkdir -p /media/storage

You'll need to know the UUID of your storage partition which you can obtain using the 'blkid' command. For me, the output looks like this:

hawk@orthanc ~ ยป sudo blkid
/dev/sda1: LABEL="System Reserved" UUID="6A9EC15B9EC12085" TYPE="ntfs" 
/dev/sda3: UUID="e346b4e2-8898-4fb7-af41-f7186d0b9e2a" TYPE="ext4" 
/dev/sda4: UUID="cddb292c-5eee-43f1-ae02-3d878a45dea7" TYPE="swap" 
/dev/sdb1: LABEL="storage" UUID="ec0728db-2eee-41d1-9256-88f04169452c" TYPE="ntfs" 

Next you need to add the proper line to /etc/fstab in order to mount on boot. For me, it would be this:

$ echo "UUID=ec0728db-2eee-41d1-9256-88f04169452c /media/storage ntfs rw,nosuid,nodev,noatime,allow_other 0 0

Then you can manually mount the storage partition and comfortably redirect all your important directories:

$ sudo mount -t ntfs /dev/sdb1 /media/storage
$ rm -rf ~/{Desktop,Documents,Downloads,Music,Pictures,Videos}
$ mkdir -p /media/storage/{Desktop,Documents,Downloads,Music,Pictures,Videos}
$ for folder in Desktop Documents Downloads Music Pictures Videos; do ln -s /media/storage/${folder} /home/<username>/${folder}

This will create symbolic links pointing from /home//Desktop to /media/storage/Desktop, etc.

Now, if you want to pull your files back in as though nothing ever happened, you may want to consider a different backup option than what I described before. I use deja-dup (Ubuntu's built in backup tool) to backup my home directory, and it has some decent restoration options. I'm not entirely sure what the best tool is for windows, but you may want to go the old route of compressing and just transferring over to the 2nd HDD before you shrink/wipe the first one.

At the end of the day, only you know whether your windows user folders can be successfully merged with your 'nix ones.

Now, you still need to setup the 2 HDD's to be redundant. If you were only using 'nix, I'd say you could do software raid 0/1 for mirroring or striping. You can still do this, but I have no idea how Windows 7 handles software raid. The alternative is that you can just use the additional HDD to practice good backup hygiene on a regular basis (which can be tricky and requires diligence and good tools).

I did a bit of research, however, and I did find some suggestion that you could make a software raid array play nice across both disks (this post is useful, you'd just install both OS's on the same SSD).

My opinion is that your chances of success at getting software raid to play nice across Windows/Ubuntu are pretty slim, and raid isn't really a good backup strategy anyway. You should install Windows with a sizable chunk of the SSD, then you can put /boot, /, /home and swap on the SSD for Ubuntu (since you don't really plan on doing the bulk of your storage in /home, this shouldn't be a problem).

For backups, I would probably then plan to do those with linux since you can access all of your filesystems that way, and I would have a dedicated backup partition on the 2nd HDD (for more on how to pick a filesystem, see this discussion).

In all, there are really a billion ways to do this, and with 'nix you can always move stuff around without much danger. Really, just make sure you give windows enough room and you should be fine.

Hope this helps

Related Question