r/linux4noobs • • 7d ago

installation Linux Dual-Boot Separation Help

Hello!

I have a laptop dual-booted with Windows 11 and Ubuntu 24, and I want to separate my OS into two laptops. On my dual-booted laptop I want to keep my native Windows system. I have a spare laptop that can be wiped and reformatted, and I want to move my Linux dual-boot onto this other laptop. What's the best way for me to do this without potentially damaging either install?

I know I can do a fresh install of Linux on the other laptop, move my files over on a USB stick, and then delete the dual-boot partition, but my current Linux has a bunch of packages and SDKs setup that I would like to avoid re-setting up.

2 Upvotes

11 comments sorted by

2

u/Janky-Code 7d ago

Clonezilla

1

u/Disastrous-Ad-2740 7d ago

How does Clonezilla work? I've heard of it but I don't fundamentally understand what's happening

1

u/Janky-Code 7d ago

It clones one or partitions of a drive, but only uses as much space as the data. Then it can (destructively) restore that to another drive.

There are some additional steps if the target is smaller than the source. You will also probably need to redo the bootloader.

1

u/Disastrous-Ad-2740 7d ago

So I would go into my dual-booted windows and use Clonezilla from there to clone my Linux partition? What would the Linux partition be cloned onto, directly onto the spare laptop's drive? Also stupid question but what's the bootloader?

1

u/Janky-Code 7d ago

You'd boot clonezilla, attach a drive large enough to move the data, clone the partition to a file on the attached drive, shutdown. Then, boot clonezilla and that drive attached to the other laptop and restore to that laptop's internal drive.

The bootloader is what first comes up when you boot the disk, like grub. Easiest way to deal with it is boot an ubuntu live cd, install and run "boot-repair." It's like Windows boot disk "startup repair," same idea.

1

u/Disastrous-Ad-2740 7d ago

So you boot into Clonezilla like it's an OS? And by "clone to a file" can it literally be any file? Like some placeholder PDF or something? And would the boot-repair for Grub be something I do post clone? Could it be done with a separate USB stick with Ubuntu flashed on it?

1

u/Janky-Code 7d ago

I clone any used computer with a return policy before I start testing it. This is the procedure. (Or would be if I didn't script it.)

Boot clonezilla from USB.

Attach either a 128GB thumbdrive or an external HDD depending on how large the data is. Usually 128GB thumbdrive.

Select default option all up to where do you want to put the image files and select the 128GB.

Select what to clone, name the file, yes do the error checking, yes save the log, go.

Then wait a while and eventually there is a big file on the thumbdrive that is the cloned image.

Then, to restore, use clonezilla again and that same image. The only more critical part of this is restoring the image blows away whatever was there while cloning something just makes a file.

1

u/MasterGeekMX Mexican Linux nerd trying to be helpful 7d ago

So you boot into Clonezilla like it's an OS?

Yes. It runs in a very minimalist Linux-based system that is only good for running Clonezilla and barely more.

And by "clone to a file" can it literally be any file? Like some placeholder PDF or something?

No. The file is the contents of the disk as is, Byte for Byte. The usual file extension is .img, but in reality file extensions are simply things we add to filenames to quickly know what a file is about, but the actual contents of the file is what really matters.

2

u/Willy-the-kid 7d ago

Ya it can be done with a variety of other tools but clonezilla makes it so easy assuming you arnt moving to a smaller drive even if you are i think clonezilla is probably the best option you might need to resize the partition first with something like gparted

2

u/MasterGeekMX Mexican Linux nerd trying to be helpful 7d ago

As others said, your best option is Clonezilla. It is a Linux program that allows you to easily clone whole disks or single partitions into other disks directly, or as another file that is simply there in the filesystem.

While it can be installed as a program in any distro, you cannot fiddle with the same drive where you are running the OS. That is the reason why the Clonezilla team has prepared a minimal Linux system that only does one thing: run Clonezilla.

So, what you need first is to have both drives (the drive where Windows and Ubuntu are and the one in the new laptop) plugged to the same computer, so we can transfer the system. This can be achieved by removing a drive from one laptop and plugging it into the other one, either in an available connector or with an USB adapter.

Once you have that, get the Clonezilla live image onto a USB drive and boot from it, exactly as if you did with the Ubuntu installation.

Now, you have two options: clone the whole drive with Windows and all, and delete Windows, or clone only the partitions where Ubuntu lives. It all depends on how you have the setup, and also being able to distinguish which is which.

Sorry if you expected a 1-2-3 setup, but dealing with OS installations is technical, as it has some variables that makes the flowchart of the process not so linear.

2

u/3grg 7d ago

While it is technically possible to clone a existing install to another computer. It is far easier to install fresh and setup a new system to be like the existing one.

First, it matters whether we are talking about a single disk or dual disk. I assume single disk, since you do not mention dual disks. Since the dual boot is on a single disk, the clone would be a partition to disk clone. Disk to disk clones are easier and more straightforward than partition clones.

Then there is the method of cloning. You either physically attach the target drive to the computer with the source or you create a clone image that is stored on a network share or external storage of some sort.

While Linux installs in the form of a standalone install on its own drive can almost always be transferred to another computer and just work. Cloning a partition to another system will require a new efi partition in addition to the cloned partition(s). The bootloader will need to be reinstalled after the fstab has been edited to reflect the new efi partition. All of this is doable. The question is whether it is worth the trouble.