1

I would like to move all my user files, programs, everything that is not the OS.

I'd like to keep Ubuntu on an SSD and put everything I've done on a separate 1TB drive. This includes everything in $HOME, but I'd like to also move /usr to move all my user-installed software.

My thinking is to keep the 180GB SSD as pristine as possible with only the OS in case I need to re-install Ubuntu at any time.

First question: Is this a bad idea?

Second question: Can I follow the same instructions which I used to move my /home to a different disk? As in this post: Move home folder to second drive, or the wiki page about moving /home

wjandrea
  • 14,236
  • 4
  • 48
  • 98
  • I keep everything in / except my data. That is because I have multiple installs and want data in all of them, but not configurations from /home.My 16.04 is my main working install currently. I just converted my 14.04 partition to 18.04, but probably will reinstall once released. LInking data folders into /home: https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting – oldfred Mar 21 '18 at 03:33

1 Answers1

2

First question: is this a bad idea?

The goal is good, and the plan is mostly good...

Moving /home to a different partition is an excellent (in fact, recommended) idea for the very "I need to re-install Ubuntu at any time" reason. I can think why Ubuntu insists on putting /home in the / partition, but it might offend delicate sensibilities.

but I'd like to also move /usr also to move all my user installed software.

Locally installed s/w lives in /usr/local and /opt. Everything else in /usr is (should be) controlled by Ubuntu.

Thus, I'd create a:

  • small partition on the 1TB drive to mount /usr/local,
  • another small partition for /opt, and
  • a "rest of the disk" partition for /home.
RonJohn
  • 679
  • 1
    Please clarify "Dumb Down Syndrome", and please be aware that implying "Down syndrome" is offensive. – wjandrea Mar 21 '18 at 04:45
  • 1
    @wjandrea sigh... – RonJohn Mar 21 '18 at 04:56
  • 1
    I'm not trying to shut you down, just saying you should be more considerate. This is supposed to be a friendly site, and implying that people have mental handicaps doesn't help that. I'm also not sure what you meant in the first place. To me it seems less like dumbing-down and more like simplifying (c.f. swap file becoming the default instead of swap partition), but I'm open to your take on it. – wjandrea Mar 21 '18 at 05:08
  • Couldn't this approach confuse the package manager in case of reinstalling Ubuntu? AFAIK the status of packages (e.g. installed) is not stored in /usr/local, but somewhere in /var (or was it /etc?), so the package manager won't update installed software because it doesn't know it is installed. – danzel Mar 21 '18 at 09:01
  • @danzel no, because programs installed in /usr/local and /opt are explicitly outside of package manager control, and package managers know that. – RonJohn Mar 21 '18 at 15:03
  • @RonJohn it may be a rare case but google chrome, for example, proves you wrong: when installed via the official .deb file, the application is installed in /opt/. BUT a .list file is added to /etc/apt/sources.list.d/ pointing to the online repository for updates. So at least in this case, reinstalling Ubuntu would cause google chrome to not update (unless the repository is added manually, of course). I could imagine that this is not the only application that installs to /opt and uses apt for updates, because that actually is very convenient from the end user perspective. – danzel Mar 21 '18 at 16:00
  • @danzel your comment requires a multi-part response. #1 It's not an official .deb from an Ubuntu repository. #2. 3rd party (and even ppa) packages are supposed to be removed before upgrade. #3 Even though some packages (also LibreOffice and Oracle Java) put their files in /opt, built from source installs also put their files in /usr/local and /opt. Leaving /usr/local and /opt on / would wipe them out in a reinstall or upgrade. – RonJohn Mar 21 '18 at 16:25
  • @RonJohn #1 officially provided by google, of course. #2 Might be obvious when upgrading, but not when reinstalling. You should mention that in your answer. #3 If built from source installs (and manually copied files) are the only software that survive upgrade/reinstall, you should mention that in your answer. Users who stumble upon this answer might think they can keep every application that is "installed by the user", i.e. not preinstalled. They might even run into security issues, e.g. by an outdated web browser. Your answer is perfectly valid for power users who know what they are doing. – danzel Mar 22 '18 at 11:05