Announcement

Collapse
No announcement yet.

Change install and program base directory to separate drive

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Change install and program base directory to separate drive

    Hey all, I just got up and running with 17.10.1, and I installed it on a small thumb drive I have (my hdd is slow, and I can't upgrade to SSD yet). So I was wondering if I could change the default location for where all my programs are installed/stored, so that it's in my HDD, rather than taking up the precious 6GB of space I have left on my usb?

    Any help would be appreciated. I understand I can just get the tar.gz files for whatever, and put them where I want them to run from and reference them that way, but I'd like a more permanent/automatic option is possible.

    Thanks!

    #2
    I have a hard time believing your HD is slower than your USB and this:
    I understand I can just get the tar.gz files for whatever, and put them where I want them to run from and reference them that way,
    I don't understand. A tar.gz is a compressed container file like a zip file. I don't know of any programs that run from a tarball like that.

    One way you can do this is to relocate an entire directory to another device and mount it there. This is often done with tmp, var, and opt. var contains log files and a few other things, opt is where many programs install themselves (typically not ones supplied by Kubuntu), and tmp is obviously temporary files. You can do this with other folders as well, but these three shouldn't cause any issues. Most of your programs will install themselves into usr but moving that folder can be more difficult.

    Frankly, I doubt the trouble to do all this will help you much. You will be able to free up some space of the USB drive, but if you're going to have half your OS on the HD, why not just install the whole thing there? May I suggest you re-install Kubuntu to your HD and try running it before you go ahead and go through all the work to put half your install there?

    Please Read Me

    Comment


      #3
      Originally posted by nieminen View Post
      (my hdd is slow, and I can't upgrade to SSD yet).
      Can't be any slower than 5400 RPMs, as that is the slowest 'most common' HDD spin rate. Faster HDDs operate at 7200 RPMs. Slowness, in the way I think you are referring to, is the time it takes the program and/or data to be read into memory from the HDD. If the program or data are HUGE, HUGE, HUGE, the time to load might be longer, but even then, it would most likely be imperceptible to the normal user. Once the program/data are in memory, speed isn't an issue anymore.
      Last edited by Snowhog; Feb 02, 2018, 02:04 PM.
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        7200 RPM is the standard, not the fast speed. Anyway, yes you should be able to put /usr (most programs) on a seperate drive. The *.tar.gz files contain statically linked binaries & not to many projects distribute those; there are also appimages & orbital apps, they can be moved anywhere. Flatpacks install in /var or ~/var

        Before I had a large SSD, I had a Seagate 1TB SSHD & before that I had /home and swap on an HDD, but everything else on a small SSD

        I would recommend a SSHD if you need a new boot drive on the cheap
        For most desktop computers https://www.amazon.com/dp/B01IEKG484..._Bv1DAbGGYFCWX

        For laptops and NUCs https://www.amazon.com/dp/B01LWRTRZU..._eP1DAbA0G73JA
        Last edited by jpenguin; Feb 04, 2018, 01:12 PM.
        Registered Linux User 545823

        Comment


          #5
          Flash storage will always be faster than hdd won't it? Granted it's through USB, and not SATA, but it still reads and writes faster than my hdd.

          That said, it's an older machine. And it's likely the hdd is on its way out the door.

          The reason I did the usb install, is because I'm coming from an hdd install, and now I boot faster, and the entire ui is more responsive, and I never hit any gui lag. While running off the hdd, boot takes minutes, and there is frequent ui lag.

          My ultimate goal is to get an SSD, it's not that far down the road, I was just looking for a solution I could use until then, without having to install on the disk again. If that's the only realistic option, then that's fine, I'll do that.

          Thank you for your response!

          Comment


            #6
            Originally posted by nieminen View Post
            Flash storage will always be faster than hdd won't it? Granted it's through USB, and not SATA, but it still reads and writes faster than my hdd.
            Of course, this depends on the whole system, not just the device. If your USB is 3.0 then, yes, it's likely faster than your hard drive. Here's result from a quick test here:

            Timing buffered disk reads:
            SDD 1164 MB in 3.00 seconds 387.36 MB/sec
            USB 3.0 346 MB in 3.00 seconds 115.24 MB/sec
            Hard drive 250 MB in 3.01 seconds 82.95 MB/sec
            USB 2.0 70 MB in 3.00 seconds 23.31 MB/sec
            This is on a basically new and powerful system but all the drives are old. Easy to test yours:

            sudo hdparm -t /dev/sdX

            replace X with each of your drive letters. The results aren't comprehensive, but usable as a comparison tool. If your hard drive is actually dying, it may have larger problems than just being slow. You might consider a larger USB drive if you don't want to buy your SSD anytime soon. At least you'll be able to keep your entire OS on one device. You should be able to get a 32GB USB drive for $20 or less.

            EDIT: Actually, I just looked . You can get a Sandisk Ultrafit 3.1 USB drive - one of the fastest on the market - 32gb for $13 on Amazon.
            Last edited by oshunluvr; Feb 07, 2018, 09:02 AM.

            Please Read Me

            Comment

            Working...
            X