this post was submitted on 06 Oct 2024
50 points (94.6% liked)

Linux

48652 readers
1025 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi everyone,

I’ve been a happy user of Fedora Workstation since Fedora 36 on my Surface Go 1.

I really enjoy Gnome and everything is set up the way I want to.

Since I was really happy with my setup I just wanted to be able to replicate it easily through Clonezilla so that I could port it on any future computer I’d get.

Sadly, even with the help of really helpful and knowledgeable users on Lemmy, it hasn’t worked (https://sh.itjust.works/post/25963065).

So now I’m left wondering if there could be a distribution that I’d enjoy and which would be easy to deploy on another computer as I’d hate to have to configure everything on every computer I’d get.

I love Gnome but I wouldn’t be against trying something else if necessary.

What distribution could meet my needs?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 2 months ago
[–] [email protected] 2 points 2 months ago (1 children)

Ubuntu will boot on either legacy or UEFI.

[–] [email protected] 1 points 2 months ago (1 children)

That's not necessarily the problem here.

Normally, Fedora would boot on both types of systems, too. However, OP wants to copy an already-existing UEFI install or at least the config to a legacy system, not (necessarily) to find a distro that could be installed from a normal live installer on both boot types.

Thus the Nix recommendations, as theoretically, one centralized config could be copied between systems to create a similar environment on different systems.

[–] [email protected] 1 points 2 months ago

@data1701d Ok in that case, boot the os off of a USB and mount all the partitions, start with root on /mnt, then any other partitions relative to /mnt as they would be to root, then mount --bind /dev /mnt/dev, mount --bind /dev/pts /mnt/dev/pts, mount --rbind /sys /mnt/sys, mount --rbind /proc /mnt/proc, and then cp /etc/resolv.conf to /mnt/etc/resolv.conf, now chroot /mnt. Once there remove all existing versions of grub and install grub-pc, which is the bios version, next do grub_install /dev/sda or whatever your primary drive is, then exit chroot and halt the system. Now you should have a bios bootable system you can boot on your bios device.

[–] [email protected] 4 points 2 months ago (1 children)

I just discovered the source of all your problems by reading your previous post.

The Surface Go 1 is a UEFI system. The Acer Aspire 5737z is a legacy BIOS system and thus can't boot UEFI partitions. If your Aspire was a UEFI system, what you did probably would have worked just fine - no need for a special snazzy distro (no offense, NixOS users).

I'm actually extremely surprised no one noticed this before me.

From here, you have a few routes:

  • Flash the install to the drive, and try to downgrade it to a legacy BIOS system.
  • Reinstall Fedora and copy just your Gnome config over - from what I can tell, it's just a few directories.
  • Buy a slightly newer device (maybe 2012/2013-ish at the earlist, probably originally designed for Windows 8.x) that support UEFI so you could just use the image.
    • Honestly, I am a bit conflicted on this option, as I don't exactly like not reusing the Aspire. However, this may be the easiest way out, and maybe you could put the Aspire to use as a server in a home lab instead.
  • Try NixOS like others have been saying. Learning things is fun when you have the time - I don't, and so stick with Debian.
[–] [email protected] 3 points 2 months ago

Oh well thanks for this information. I’ll see what I’ll do but I’m determined to keep using the Aspire for a few things.

[–] [email protected] 3 points 2 months ago

Nixos and mynixos website helps you create your config if you don’t know how or don’t want to

[–] [email protected] 1 points 2 months ago (3 children)

I don't know how clonezilla works, but one thing I've discovered that causes issues when you copy a Linux distro from one machine to another, assuming you do a file system copy and not a raw partition copy so the new file system partition has a different UUID than the old, you need to fix the UUID in both /etc/fstab and /etc/initramfs-tools/resume before it will work properly.

[–] [email protected] 1 points 2 months ago

But when you just copy one partition, do you need to do something special for the system to boot?

[–] [email protected] 2 points 2 months ago

you need to fix the UUID

Don't use UUIDs. They serve a very specific purpose, which you're now trying to defeat (for all the right reasons).

Fix your mounts and then carry on.

[–] [email protected] 2 points 2 months ago

Clonezilla covers this, it regens the partition with the correct uuid.

My guess is some uefi or other boot weirdness, you have to register keys with the new system during install before it will let you boot, that's probably where things went wrong.

[–] [email protected] 0 points 2 months ago (1 children)

I'd happily give technical advice but first I need to understand the actual need.

I don't mean "what would be cool" but rather what's the absolute minimum basic that would make a solution acceptable.

Why do I insist so much? Well because installing a distribution, e.g. Debian, takes less than 1h. Assuming you have a separate /home directory, there is no need to "copy" anything, only mounting correctly. If it is on another physical computer then the speed will depend on the your storage capacity and hardware (e.g. SSD vs HDD). Finally "configuring" each piece of software will take a certain amount of time, especially if you didn't save the configuration (which should be the case).

Anyway, my point being that :

  • installing the OS takes little time
  • copying data across physical devices take a lot more time
  • configuring manually specific software takes a bit of time

So, if you repeat the operation several times a week, investing time to find a solution can be useful. If you do this few times a year or less, it's probably NOT actually efficient.

So, again, is this an intellectual endeavor, for the purpose of knowing what an "ideal' scenario would be or is it a genuine need?

[–] [email protected] 1 points 2 months ago (1 children)

Well I don’t distro hop so I don’t think it would be used more than once a year.

The only thing is that I would want the way I’ve configured Gnome, Joplin, Thunderbird, Gnome Calendar (only for the widget), my Gnome extensions, what program is automatically opened on what workspace, etc to be saved so that it could be reproduced on another computer easily.

My documents, pictures, etc are already taken care of so it ain’t a problem.

I know I could do the same thing by writing a tutorial and just spending a couple of hours every time I reinstall. But I would want to just be able to replicate my install/settings if possible.

Someone kindly mentioned SaveDesktop and for now it seems like the way to go since simply cloning with Clonezilla doesn’t seem to work. I just have to make it work.

[–] [email protected] 1 points 2 months ago

The only thing is that I would want the way I’ve configured Gnome, Joplin, Thunderbird, Gnome Calendar (only for the widget), my Gnome extensions, what program is automatically opened on what workspace, etc to be saved so that it could be reproduced on another computer easily.

These sound like user settings that don't even exist outside ~/ . Rsync is your friend. So is git, gluster, syncthing, resilio, and a good bunch of others depending on how often you want synch to occur and how much time you have to spend.

[–] [email protected] 4 points 2 months ago (2 children)

If you want something simple that does this for you: check out SaveDesktop. I'm not sure if it will meet every need, but it works for me when I need to switch.

[–] [email protected] 2 points 2 months ago (2 children)

Would you know why I'm getting that error? :

I've already allowed access to all system files through Flatseal.

[–] [email protected] 1 points 2 months ago (2 children)

I was not able to reproduce that bug, but I also did not change anything in flatseal, I think you shoulf just reset the permissions and/or reinstall and just try it normally.

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago) (1 children)

I’ve managed to create an archive with SaveDesktop, but only on my internal disk drive as I think the external drive was what was creating the problem.

Do you know what would be the difference if I backup or don’t my home file? I’d have to find a way to back it up outside of home, but it’s complicated since it doesn’t work with an external drive.

I mean I don’t think I can backup home with Savedesktop inside home, so I’ll have to look at my file structure once I can get back in front of my computer.

[–] [email protected] 1 points 2 months ago (1 children)

I think the reason why it didn’t work on your external drive is that is a different permission to system files. Something to do with usb stuff.

When it comes to backing up your home files, I’m not sure what you mean by home file? Do you mean the home folder? Cause if so I don’t think SaveDesktop can do that as that includes all your files, not just your configs. You’d have to use another tool to move those folders.

[–] [email protected] 2 points 2 months ago

Sorry as I’m struggling to express clearly.

SaveDesktop has the option to backup your home folder.

I was thinking that the save destination had to be outside of the home folder if I wanted to also backup my home folder. Otherwise it could end up in some kind of loop where the archive would contain itself and get bigger and bigger. That’s why I thought the SaveDesktop archive with the home folder shouldn’t be saved inside home.

I hope It nakes more sense 😅

[–] [email protected] 1 points 2 months ago

I tried it normally but then it had another problem so that’s why I tried to gove it more access through Flatseal as recommended on the SaveDesktoo Github page.

I’ll have a deeper look when I get the time. Thanks

[–] [email protected] 2 points 2 months ago

I think it needs access to all your host files as well, let me see if I can replicate that error.

[–] [email protected] 2 points 2 months ago

Oh from reading what’s in the link, it looks like it’s exactly what I need.

I’ll go deeper into it.

[–] [email protected] 2 points 2 months ago

If you want to actually replicate one to one - any distro, and use dd or netcat to transfer the root partition. Reinstall the bootloader, update BLKIDs and you're done. Worked for me multiple times.

[–] [email protected] 1 points 2 months ago (1 children)

Can you just make a base image and then clone the image across. You would need to change the machine ID but that's pretty easy to do.

Alternatively you could use Ansible pull on a fresh install to set everything up

[–] [email protected] 0 points 2 months ago (1 children)

How can you just make a base image and change the machine ID?

[–] [email protected] 1 points 2 months ago

You install it and then save a copy of the disk. This is very similar to a VM template so I will just link instructions for that. The difference is you are using physical hardware.

https://unix.stackexchange.com/questions/704084/deleting-etc-machine-id-in-ubuntu-minimal-cloudimg-for-proxmox-template

[–] [email protected] 16 points 2 months ago* (last edited 2 months ago) (1 children)

I'm going to mention Ansible as I haven't seen it mentioned, and it can be used to locally manage a reproducible build.

It has already been mentioned, but as a minimum to replicate your system you need two things:

  • Transfer/copy your entire /home directory as there is where the majority of the configuration files of your system pertaining the software you use (there could be configs you could need on /etc and on /usr/local or other dir), that is why it is recommended to partition your disk on installation of your distro, so the /home directory is already separated, as if you reinstall in the same machine you don't lose any configuration in addition to your personal documents/pictures/etc
  • Have a way to automatically install a list of programs/apps/drivers/libraries, and that is what something like a bash script, Ansible, nixOs, etc. could help you with.

The truth is that using any of the tools in the second point requires learning a bunch, so if your skill level is still not there, there is some work to do to get there.

[–] [email protected] 1 points 2 months ago (1 children)

I’m going to mention Ansible

Oh for the love of god, don't. Ansible is 2002 technology used in 2024. It's so clunky and janky that I'm relieved I can get chatgpt to boilerplate my stuff and save me time actually staring at fucking YAML all day. Use Anything Else before your brain rots.

source: it's like half my day job now and I should've charged more.

[–] [email protected] 2 points 2 months ago

What would you recommend that is not NixOS or a Bash script and can be used agnostic of distro?

[–] [email protected] 26 points 2 months ago (1 children)

I'd jump on the bandwagon of nixos, I use it myself and love it, does exactly what you're asking for

However judging on some of your other comments it might be a better idea to just suck up having to manually rebuild until you understand the basics of Linux a little better

(nixos more or less requires you understand programming syntax for writing your system config)

[–] [email protected] 2 points 2 months ago (1 children)

(nixos more or less requires you understand programming syntax for writing your system config)

It's technically not a real programming language but an expression language. The difference is that the former is a series of commands to execute in the specified order to produce arbitrary effects while the latter is a declaration of a set of data. You can think of it like writing a config file i.e. in JSON format.

The syntax isn't really the hard part here. You can learn the basics that comprise 99% of Nix code in a few minutes.
The actually hard part is first figuring out what you even want to do and then second how the NixOS-specific interface for that thing is intended to be used. The former requires general Linux experience and the latter research and problem solving skills.

[–] [email protected] 3 points 2 months ago (1 children)

It's hard to say whether it's difficult or not coming into it already knowing how to program

More people than not struggle to come to terms with what a variable is let alone all the stuff you can do in nix

There are definitely other hard parts, but I didn't want to write a wall of text lol

[–] [email protected] 1 points 2 months ago

While that's certainly true, using NixOS usually does not involve many advanced concepts or requires you to understand them.

You can set foo = bar in a .conf file without knowing what a variable is either.

[–] [email protected] 1 points 2 months ago

So the question is this: Do you want to be able to reproduce the system exactly, or are you fine taking a few hours to reinstall software. If you're just wanting to keep settings and data for apps rather than the apps themselves, you can cut down on your storage requirements a lot.

If it's the latter, all of your user settings should be in your home directory ("/home/username" or just "~"). If you back that up, you should be able to recover your settings and data on a fresh install of your distro of choice.

[–] [email protected] 9 points 2 months ago* (last edited 2 months ago) (1 children)

Personally, I use Fedora Silverblue and use bash scripts for reproducibility. To set up a new system, all I need to to is install, reboot, run my bash script, reboot, and my system is 90% configured. With bash scripts, I am able to reproduce more of my system than I could when I used NixOS.

A lot of people recommend Nix, but the thing about Nix is that you're only declaring how the system is configured. Not your home folder. You need to rely on third party tools for that.

Bash scripts can configure system and home folder. They can also be used on any distro, whereas a Nix configuration file only works on NixOS.

Though the worst part about any new install is just signing back into everything, especially an annoyance when you have proper 2FA setup. Bash scripts or Nix can't solve that unless you migrate data over.

[–] [email protected] 2 points 2 months ago* (last edited 2 months ago) (2 children)

What is a bash script? Is it something I'd have to write mysel using the terminal? Sorry but my skills are quite limited for now.

[–] [email protected] 2 points 2 months ago* (last edited 2 months ago)

What is a bash script?

At this point in time, I need to stop you.

There's a massively-increased risk of you being misled by someone else's agenda without knowing it's not the simplest and most effective solution to your problem because there's a lot of technical stuff you may not know and can't pick from available options based on their nuances. So:

  1. find a real person you trust who knows this
  2. ask them

Whatever they tell you, they'll be able to support. Ensure you're the one typing so you learn things, and ask every question you think of all the time.

Stop asking random strangers which solution is best, because you're going to get a lot of short-sighted clique answers that DO NOT HELP YOU.

[–] [email protected] 7 points 2 months ago* (last edited 2 months ago)

Yes, it's something you write yourself. Bash is the language you use when you use the terminal. A bash script is just many lines of bash commands.

A bash script could be as simple as

dnf install package1 package2 package3
dnf remove package4 package5 package6

This script automates installing some packages and removing some packages. The bash script I use does a lot more, such as running commands to configure Gnome how I like it.

If you're not comfortable with the terminal, I would definitely recommend staying away from NixOS. To declaratively/reproducibly set up the system, it uses a language called Nix that is a fair bit more complicated than bash. It's also just very different from traditional Linux systems like Fedora or Ubuntu.

[–] [email protected] 3 points 2 months ago

Seperate home is a must imho. Fedora had kickstart but alas a little old. This may help. https://discussion.fedoraproject.org/t/here-is-how-to-easily-create-a-bootable-clone-of-your-fedora-system-disk/111308

load more comments
view more: next ›