LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing Programs to usb external HDD? (https://www.linuxquestions.org/questions/linux-newbie-8/installing-programs-to-usb-external-hdd-775840/)

Crashogre 12-15-2009 12:45 PM

Installing Programs to usb external HDD?
 
Is there a way to install programs to an external usb hdd? What I would like to do is to install those programs that are nonessential on the Usb drive while keep those I use most often on the internal laptop drive. Thus if I were to install a game in Linux it would be on the external drive while Openoffice and such would be installed to the laptop hard drive.
I have no problems mounting the USB drive, however I am unsure if my scheme is possible.

I am using Ubuntu 9.10 with Gnome and Linux Mint. is there perhaps a switch in apt?

Thanks.

David the H. 12-15-2009 01:44 PM

It's not something that's easily done. The apt packages are programmed to install their files to specified locations. In addition, these files are often scattered around the file tree, rather than a single directory.

You would probably have to manually rebuild the programs from source with different configuration options; which makes integration with the packaging system more complicated. It's not impossible, but it's probably more trouble than it's worth.

Crashogre 12-19-2009 09:40 PM

Thanks, I guess I will just use it to hold datat and the windows programs I run under wine.

CoderMan 12-20-2009 03:02 AM

Quote:

Originally Posted by David the H. (Post 3792623)
It's not something that's easily done. The apt packages are programmed to install their files to specified locations. In addition, these files are often scattered around the file tree, rather than a single directory.

You would probably have to manually rebuild the programs from source with different configuration options; which makes integration with the packaging system more complicated. It's not impossible, but it's probably more trouble than it's worth.

Actually, there is another approach you could take, which would be to have space on your external hard drive map to certain directories on your system. For example, you could have two file-systems on your external hard-drive: one could be mounted as /usr/games and /usr/share/games. Once they are mounted, your package manager can't tell the difference, and will install files to these locations as though they were on your regular drive. This could be automated too through fstab. And thus a lot of game binaries and data would reside on the external hard drive, though possibly not everything, such as some back-end libraries.

This actually isn't very difficult at all, though you would need to learn about mounting filesystems and about fstab.


All times are GMT -5. The time now is 06:21 PM.