Jeff Hoog Land

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 11 November 2009

HOWTO: Setup a Linux Storage Partition

Posted on 21:43 by Unknown
Anyone who has use a computer for an extended length of time knows that reformatting now and again is inevitable. For a distro hopper such as myself reformats come much more frequently than they do for most others. At any given point it is not uncommon for me to have two or more Linux distros installed on each of my laptops at the same time. While I like testing new things I also enjoy my laptop being fully functional in the processes and for it to be so I need access to my files regardless of whether I am booted into the latest Ubuntu, Sabayon, Fedora, or what ever other new distro I might be trying that week. While it is possible to share a single home directory for these different distros it can get messy to say the least - different versions of different programs all trying to save settings to the same places (You can see where this can cause issue).

The solution I have come to for such a dilemma is partitioning off a section of my hard drive as a "storage" partition. Essentially this is a large section of the hard drive that is not set to a default mount point for any of the installed distros (on my system I have this partition set to the first part of my extended partition, so sda6, that is formatted as ext3). Once you have your distro installed you can setup your storage partition to be the default save location for many things with a few simple commands. The first thing we need to do is create a location to mount your storage partition to, I like to use the point /mnt/storage (but you can use what ever floats your boat) to create such a point run the following in your favorite terminal: sudo mkdir /mnt/storage Next we have to tell your distro what to put at that mount point - to do this we are going to add a line to our /etc/fstab to do so open the file as super user in your favorite text editor by running something like: sudo gedit /etc/fstab Once you have the file open we are going to add a new line that looks something like this: /dev/sda6 /mnt/storage defaults,exec ext3 0 0 Now assuming you used the first partition on your extended partition for your storage space and the mount point you created is located at /mnt/storage upon rebooting your system it will auto mount your partition for you. (If you need to use a different partition, mount point, or file system type scroll down to the second to last section to see the edits you need to make for the above listed fstab entry to work).

Now that we have your partition setup to mount properly lets configure it so it stores (or looks for) your data there! Things I like to keep on my data partition are my Documents, Pictures, Videos, Downloads, and large game installs (namely Steam). Take any folders you want to keep on the storage partition and cut and paste them there. The last step is to make these folders we have now moved to the storage partition point to their original location using a symbolic link or symlink for short. For example to link a your Documents folder from your storage partition back to your home folder run the following: ln -s /mnt/storage/Documents ~/Documents Lets take a look at this command for a moment ln is the link command and the -s argument tells it to make a symbolic link, then the next two arguments are the source of the actual folder and then the destination to place the link. The result of running the above command is the creation of a folder in your user's home directory called "Documents" that when clicked into shows the contents of the Documents folder on the storage partition. You should repeat the above listed symlinking command for each folder you want to keep on the storage partition.

If you used a different hard drive/mount point/file system than the ones I initially suggested, it is easy enough to change you fstab entry so it works for your particular configuration. The syntax for an fstab line is: [file system] [mount point] [type] [options] [dump] [pass] The important ones are the first three [file system] is the location on your hard drive of your storage partition, for example if it is the first primary partition it would be /dev/sda1. The second part [mount point] is where you want to mount your partition to, just replace this with what ever path you created. The last one we care about is [type] this is simply the file system type you have your partition formatted to (ext3, ext4, ect.). What the remaining three arguments do is a bit beyond the scope of this article take a look here for further reading on them.

Personally I find having a storage partition extremely useful in the case of both multiple distros installed and when reformatting (I do not like to reuse a home folder). All in all it cannot hurt to set one up so - give it a try and let me know what you think!

~Jeff Hoogland
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in fedora, howto, linux, open source, sabayon, software, ubuntu | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Ten Linux Distros that use Enlightenment
    In case you haven't noticed I've had a bit of an obsession with the Enlightenment desktop of the late. Even though this desktop is ...
  • Playing Magic the Gathering on Linux with Cockatrice
    If you ask almost anyone that knows me in person they will attest to the fact that I am a huge nerd. Today I would like to give a short tuto...
  • New E17 Stable Snapshot and the First of E18
    You read that title right folks. The first showing of Enlightenment DR18 (or E18 for short) has become a reality. Sure, it is nowhere near w...
  • Twenty Sleek GTK Themes for your Linux Desktop
    Last month I posted about twenty two different icon sets you could use to class up your Linux desktop. Today I would like to share with you...
  • HOWTO: Enable Compiz under Bodhi (Enlightenment)
    One of the reasons I gave for giving the Enlightenment desktop a try was its elegance. While it is true that Enlightenment has a good numbe...
  • HOWTO: Watch Netflix on Bodhi Linux
    Not being able to utilize the Netflix video streaming service has been an issue on the Linux desktop for the past few years. This is due to...
  • Bodhi Linux ARMHF RootFS
    If you've been following my blog (or my updates on Google+ ) then odds are you know I currently have my hands on two ARM devices ( plus ...
  • Linux Out Performs Windows in OpenGL
    Late last year I did a posting detailing how Windows 7 crushed Ubuntu 9.10 in the area of 3D performance. Nine months later I am happy to s...
  • HOWTO: Ubuntu Linux on T101MT
    I wrote a HOWTO for getting Linux working on the T91MT a couple months back and as I mentioned here I ended up changing to the slightly la...
  • OpenGL vs DirectX - Benchmark Comparison
    I've done a few benchmarks to date and today I am going to add another interesting set of numbers to the list. Unigine is a cross-pla...

Categories

  • 3g modem
  • adobe
  • android
  • appeal
  • apple
  • arm
  • art
  • asus tablet
  • benchmark
  • bodhi
  • bordeaux
  • cedega
  • chakra
  • chrome os
  • chromebook
  • cockatrice
  • codeweavers
  • comic
  • cricket wireless
  • crysis
  • cxgames
  • debian
  • dell duo
  • diablo3
  • distro review
  • dtf
  • e18
  • eandora
  • eccess
  • elementary
  • elive
  • enlightenment
  • fedora
  • firefox
  • gaming
  • genesi
  • gnome
  • google
  • google chrome
  • google wave
  • handheld device
  • hardware
  • helios
  • howto
  • html5
  • ideapad
  • interview
  • ipad
  • jolicloud
  • kde
  • l4d2
  • laptops
  • lenovo
  • linux
  • lxde
  • macbook
  • math
  • maxima
  • media
  • meego
  • milestone
  • mint
  • mir
  • mk802
  • moblin
  • n900
  • netflix
  • nexus 7
  • nvidia
  • open pandora
  • open source
  • opengl
  • opera
  • operating systems
  • palm
  • phones
  • promotion
  • python
  • qt
  • rant
  • raspberry pi
  • reviews
  • sabayon
  • software
  • source games
  • spotlight
  • sprint
  • starcraft2
  • steam
  • t-mobile
  • tutorial
  • ubuntu
  • unigine
  • unity
  • wayland
  • web application
  • windows
  • windows 7
  • wine
  • wxmaxima
  • xfce

Blog Archive

  • ►  2014 (1)
    • ►  January (1)
  • ►  2013 (22)
    • ►  December (3)
    • ►  November (1)
    • ►  September (1)
    • ►  June (1)
    • ►  May (2)
    • ►  March (2)
    • ►  February (3)
    • ►  January (9)
  • ►  2012 (57)
    • ►  December (5)
    • ►  November (4)
    • ►  October (2)
    • ►  September (1)
    • ►  August (4)
    • ►  July (9)
    • ►  June (4)
    • ►  May (4)
    • ►  April (1)
    • ►  March (7)
    • ►  February (6)
    • ►  January (10)
  • ►  2011 (107)
    • ►  December (8)
    • ►  November (8)
    • ►  October (5)
    • ►  September (14)
    • ►  August (9)
    • ►  July (8)
    • ►  June (7)
    • ►  May (10)
    • ►  April (9)
    • ►  March (13)
    • ►  February (9)
    • ►  January (7)
  • ►  2010 (122)
    • ►  December (10)
    • ►  November (8)
    • ►  October (10)
    • ►  September (14)
    • ►  August (17)
    • ►  July (10)
    • ►  June (9)
    • ►  May (14)
    • ►  April (8)
    • ►  March (7)
    • ►  February (7)
    • ►  January (8)
  • ▼  2009 (27)
    • ►  December (10)
    • ▼  November (7)
      • CXGames 8.1 (Zombie Mallard) Overview
      • Wine, Cedega, and CXGames Benchmark Comparision
      • HOWTO: Setup a Linux Storage Partition
      • (wx)Maxima - An Open Source CAS
      • My Linux Gaming Experience
      • Riding the Google Wave
      • Jolicloud - Distro Review
    • ►  October (10)
Powered by Blogger.

About Me

Unknown
View my complete profile