1

I want to install Linux on a Chromebook. However, the Chromebook which I'am thinking of purchasing comes with only a 16 GB SSD. This seems to be very little hard drive space to work with.

Searching the Internet, I've found two ways to expand the hard drive storage space:

  1. Opening the hard drive, removing the existing hard drive and replacing it with a larger hard drive
  2. Attaching a USB flash drive (such as a 64 GB drive)

Method #2 above seems simpler and is what I want to try.

My question is how can I make the USB flash drive part of the filesystem, so that if I install additional software packages (e.g. eclipse, LaTeX), these packages are installed to the flash drive rather than to the existing hard drive which is very small?

1 Answer 1

2

With Unix and Linux, any device can be mounted at just about any directory path in the filesystem. Once there, it will be used for all files stored under that directory. Additional mounts can be made under that directory, but that's beyond your need.

The problem with installing system software packages to such a device is that most packages use the standard /etc, /usr, /lib, and related directories to store their files. Moving the base system directories to such a device is possible, but tricky and error prone. Consider what would happen if the external drive is not connected at boot time when the O/S needs those files to start.

If you want to go that route, it's possible to mount the drive at a temporary location, such at /mnt, copy the existing files from the hard drive, change the /etc/fstab file to mount the new drive over the existing location, and reboot the system.

Another comment here - don't use the external drive with a FAT/VFAT filesystem (the default for most USB devices). Reformat it with a Linux filesystem. Otherwise, you'll run into problems with permissions and filename handling (linux filenames are case-sensitive while FAT/VFAT are case-insensitive).

Simpler, and perhaps a better use of such a setup, would be to place the user home directories on the device. One nice thing about such a setup is that the core O/S is decoupled from user files, making it much simpler to upgrade the O/S without fear of losing important data files.

If you have the time, inclination, and a means to recover the system to a working state shoud it become unsuable, play with it. It can be a great learning experience.

One final tip on managing space. Symbolic links are a great way to relocate files to manage space while keeping the original paths accessible. Note that this is managing file space "the hard way", but it's very effective. I've used it many times.

2
  • And whatever you do, don't try to relocate /bin or /sbin. Probably not /usr/bin, /usr/sbin, or /lib either. Commented Jan 5, 2014 at 16:47
  • But for large non-OS software like eclipse and latex (which the OP mentioned), there's absolutely no downside to mounting them on a volume that might sometimes be absent. In fact I'd rather do that than put all of /home there. You can always add symlinks from inside your home directory to the USB drive, for things that need a lot of space. But your rc files and desktop should always be available. Commented Mar 22, 2014 at 15:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.