I have a netbook with a tiny hard drive, and an external drive to go with it. It's running Ubuntu. I want to be able to install some packages to that external hard drive, so that when the hard drive is not plugged in the netbook still functions, just with out some functionality. It doesn't have to be this way exactly, I just want the effect of offloading some of my installed libraries and programs onto the portable hard drive. In other words, just mounting some directories from the external drive wont work because I at least need some basic programs to run normally.
Here are some things I was thinking about but wasn't able to find enough information to actually understand if they are feasible, or how to go about doing them. Comments on how to do any of these or on alternate methods are greatly appreciated.
- Can I do something like this if I use the --root=/media/external switch of dpkg install and then add /media/external/ to my system path?
- What if I create some kind of wrapper for dpkg that will install the package into an alternate root (--root=/media/external) and then create a symlink in the internal file system to every file that was just installed on the external file system?
- How about something where I chroot into the external drive?
- How about something using LVM?