Jump to content

Distro Hopping

I love testing out new distrosbut i dont like having to reinstall all my programs. in the video below they talk about how you can copy your usr file and home folder and be on your way. is that real will that keep my programs. or what is that script that the guy created and where can i get it?

Thanks

 

https://www.youtube.com/watch?v=mAFMJ1LnQu8

Link to comment
Share on other sites

Link to post
Share on other sites

Why not use a VM to test out new distros?

Link to comment
Share on other sites

Link to post
Share on other sites

because its not the same as fully imursing yourself and trying it. you dont know if you like it till you use it all the time

 

Link to comment
Share on other sites

Link to post
Share on other sites

Copying the /usr directory is not portable.

The /usr dir contains the bulk of the system programs and libraries and those will vary between different distros. Copying over the /usr dir is not recommended even with installations of the same distro let alone onto a different distro.

The /home directory is slightly more portable but I'd still be uncomfortable copying it unless I'm sure of various other parameters.

Also, the same programs often need to be compiled slightly differently based on what environment it's going to run under. Various missing libraries or difference in naming conventions need to be accounted for. Not all programs are binary portable.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, randombobawesome said:

I love testing out new distrosbut i dont like having to reinstall all my programs. in the video below they talk about how you can copy your usr file and home folder and be on your way. is that real will that keep my programs. or what is that script that the guy created and where can i get it?

Thanks

 

https://www.youtube.com/watch?v=mAFMJ1LnQu8

You would need to setup the /usr directory as its own mount point during install then when you "hop" you can simply setup the same mount point in the new distro and everything will be there.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

You can export your programs list from different package managers and reinstall them this way.

 

for instance, in Ubuntu I believe you can do:

dpkg --get-selections

 

You can use the > command to send this to a text file like:

 

dpkg --get-selections > installedPrograms.txt


Do not just copy your /home or /usr dirs.  These have many config files mixed in that can break your new install.

You would need to know what files can be safely moved over.

 

For instance, if I'm running conky on both installs, perhaps I'd copy my .conky folder over, but if I were also moving to a new distro with a different version of kde, the .kd5 folder could break the other system.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Chunchunmaru_ said:

Why not use Timeshift making full file level backups, then move your /home?

Timeshift is basically a frontend for rsync.  It will backup everything including your configs.  If someone does this it can break their new system.

Link to comment
Share on other sites

Link to post
Share on other sites

This is an easy headache to remedy, though the methods are yours to choose.

 

On 2/26/2020 at 10:51 AM, randombobawesome said:

in the video ... they talk about how you can copy your usr file and home folder and be on your way.

 

I watched the video too, and as far as I know Linus never mentioned specifically the usr directory, just the vague term, 'User,' and I'm assuming that you are talking about the part where he mentioned a user that had a Github repository where all he had to do was let that do its job and he'd be up and running on any computer. This is likely a custom set of scripts (probably using automation software such as Ansible) that either automatically installs the programs and pulls configuration files from the Github page, or pulls information from a remote server much like a traditional zip/tar download and then unpacks in a specific way to redistribute files and installation mediums accordingly.

 

Any situation where there is data being redeployed in a foreign environment ('Foreign' being the word for a device where the files were not originally created/used) is often tricky, especially between Distros and Package Managers. One way to get around this with software are AppImage binaries, which almost always run akin to a standalone executable (Almost always, as some might still require specific software to already be compiled). Another way are through pre-packaged Containers, such as those provided by Flatpak and Snap. These can be automated using a variety of methods.

 

As a note: Do not copy & paste your home directory backup to a new computer environment; there are a few exceptions out there, but the main reason are something called "dotfiles". To the uninitiated, dotfiles are the Linux version of a hidden file or folder. Often programs will create a user-configurable file in a dotfile folder such as /home/$USER/.config ($USER is a global env variable -- it always points to the active logged in user). What happens if a new installation sees these files, and tries to load them? Ninety percent of the time, it might work with some errors. It's the other percentage that can cause complications (I won't say "damage to the OS", but it could be) further down the line with things such as graphics settings and file paths.

 

You are otherwise safe to copy and paste files and folders from visibly listed files and folders onto another installation if required.

 

[That Moment when you suddenly realize you over-complicated the answer significantly and went full-lecture mode]

 

On 2/26/2020 at 11:05 AM, fuzz0r said:

Why not use a VM to test out new distros?

 

Fuzz0r has a point, and I suggest you (or anyone else currently reading this thread) do not discount the strength and versatility of a Virtual Machine Environment. They are endlessly customizable and easier to delete and swap than a complete reinstall over and over. Additionally, the VMs can be remotely accessed using RDP/VNC natively using either the Virtualization software or through significant tweaking in the VM itself. In a situation you can run Virtualbox on a separate computer, for example, you can have a quick and easy way to test OSes (Distro Hop) without leaving the comfort of your own desktop workstation, and without playing around with backups of full configurations if you don't want to.

 

------

Addendum: Another option for testing Distros with fair tradeoffs

 

Install the Distro you want on an external USB flash drive, and boot from that while keeping your current/prefferred configuration on your home desktop untouched. This way, you can still use the desktop as you would normally, but all of your files stay securely on your desktop Hard Drive (Or SSD, if you have it) and can still access it from the USB Boot Drive; on top of that, the USB external boot medium could act as an emergency backup/recovery device if something happens.

 

Assuming sda is your computer (single hard-drive computer), sdb is the Linux Installation Medium, and sdc is the "Distro Hopper" flash drive, the install could play out in this manner:

 

sda (Hard Drive) | sdb (Install) | sdc (Distro Hopper)

sda0 - Desktop   | sdb0 - Linux | sdc0 - Linux Install

   installation       |           Live    |             ( / )               .

sda1 - swap        |                     | sdc1 - Linux Swap

      (LINUX)        |                     |  (No more than 2GB*)

 

* Since a Flash drive is much slower than a SATA interface, no matter the device, Swap will always crawl slower than basic I/O to and from a normal computer. Turn swap off after install by running  sudo swappoff -a . Some Linux nerd can probably tell you to ignore the swap warning on the install, but it might be worth holding for emergencies. Don't ask me what though.

 

_Note:__________________________________

|Swap sdb and sdc if using a cd/dvd tray, since    |

|the Linux Install will instead be sr0, cdrom0, etc. |

|______________________________________ |

 

You'll need at least 16GB of storage on your USB stick, though an External Hard Disk would work just as well. The downside to this method is that you are running your system on whatever the USB specs are, so if you're using a USB 2.0 port, you're going to notice significant slowdowns, but USB 3.0+ would be much faster if only you have a USB 3.0+ flash drive. Additionally, you're limited to whatever space the flash drive has. Note that an external SSD running through USB 3.0+ would negate these tradeoffs (mostly).

 

Spoiler

Edit; grammatical error and quote modification

 

Edited by Gamer115x
Grammatical error fixed; quote given textual reclassification

LTT fan and hardcore hobbyist/enthusiast computer guy. More familiar with Linux than Windows.

Specs on personal PC: i3-6100 (3.7 GHz) | Asrock H170M-ITX/DL | Sapphire Dual-X HD 6970 2GB 256-bit (Discontinued) | 2x8GB GSkill DDR4 RAM | Corsair RM750 | 1TB Seagate | 120GB ADATA SSD | Logitech Server Case | More noisy fans than necessary | [Manjaro with Windows VM]

Secondary Devices: Dell Inspiron 6000 (2GB DDR2) [Debian 10 Buster]

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×