Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I should have installed the grub on the USB?. So, what serves clonezilla? I always thought it was an annoyance but now I think it's useless -- at least for a rookie is totally useless.
As I said, the solution is in something like Mxlinux-Snapshot!
I faced something like this before, and it was a moderate pain for me. You want to clone the OS, but there are other partitions which you do not wish to clone.
I ended up installing grub onto a thumbstick and making the remainder of that stick a general Linux (type 83) partition type, and like an ext2 filesystem, that made it like /dev/sd<something>2 where the first partition was the grub boot partition.
Then cloned the OS using the dd command and the of= was that second partition. Then I had to edit the grub.cfg to point to that partition (sorry it was a long time ago and I do not know how I accomplished that), from there I had a master disk for that Linux which would be bootable. To duplicate it became a worse problem because that was when I learned that not all 8G sticks are identical, some are larger or smaller than others. I'll skip the solution there, that first solution above seems what you need. Maybe read up on grub configuration to figure out how to control it so it can see or detect the OS copied to the other partition on the media.
OP, you are likely booting from a live clonezilla image, which is exactly as has been mentioned in that you should never copy (clone or dd) from a mounted active file system to prevent corruption. In my use of clonezilla it refuses to clone from a mounted device
Secondly, clonezilla copies the data and the partition information, but does not copy the entire partition byte by byte. Using dd, OTOH, copies the entire partition byte by byte and the output image will be exactly the size of the input device.
I did a clone of my install SSD (250 GB) using clonezilla and the output was ~36 GB. There is a major difference in the way the copy is made when comparing clonezilla and dd.
The clone will not be bootable, but can be restored and make a bootable restore IIF you clone a full bootable device and not just one partition from that device. Clonezilla is also able to do a restore of a clone it has created only to a device that is equal to or larger than the source device.
/dev/nvme0n1p1 2048 526335 524288 256M Microsoft basic data
/dev/nvme0n1p2 526336 72937471 72411136 34.5G Linux root (x86)
/dev/nvme0n1p3 72937472 89714687 16777216 8G Linux swap
/dev/nvme0n1p4 89714688 159483903 69769216 33.3G Linux filesystem
/dev/nvme0n1p5 159483904 231698431 72214528 34.4G Linux filesystem
/dev/nvme0n1p6 231698432 304171007 72472576 34.6G Linux filesystem
/dev/nvme0n1p7 304171008 386467839 82296832 39.2G Linux filesystem
/dev/nvme0n1p8 386467840 500117503 113649664 54.2G Linux filesystem
The red entry above appears appropriate for a EFI system partition...
Formatted Fat32, around the recommended 300MB in size.
To do this properly, the USB key should have a partition of same size or larger than the partition being cloned over.
Then the dd command should be: sudo dd if=/dev/nvme0n1p7 of=/dev/sdb1
Then boot into the OS on the computer drive that has os-prober installed and run command: sudo update-grub (for Debian based distro) sudo grub2-mkconfig -o /boot/grub/grub.cfg (for Fedora, Centos, OpenMandriva etc.) sudo grub-mkconfig -o /boot/grub/grub.cfg (for most any other more recent distro)
This should add the key's grub.cfg entries to it's menu, and you boot it from there.
If you want a UEFI boot entry for the key, you would need to chroot into the key with internet from another live Linux or the installed OS and install grub.
Once in the chroot, mount the EFI system partition (/dev/nvmeon1p1) to the key's /boot/efi directory and install grub: sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi sudo dnf reinstall grub2-efi shim ---> Can use this for Fedora, Centos, OpenMandriva etc. sudo grub-install /dev/nvme0n1p1 ---> Debian base
Since it is a clone of the installed OS, there is no need to reinstall grub in the key to add it to the UEFI boot menu, the installed OS already has that covered and you boot it from it's menu, if you reinstall grub-efi in the key, it will need to be plugged in if you want to boot the installed OS because the last OS you use to install grub is the menu you need to use to boot the other.
I do this every day...
It's that easy with either UEFI or Legacy BIOS "primary" partitions. Rearrange partition order, copy an OS partition to a Virtual drive and boot it as a VM, move VM's to hard drive etc.
However, there may be an issue with two Identical partitions with same UUID, it may be necessary to change the UUID of the key partition and run update-grub in the key in a chroot prior to adding it to the other's boot menu,
Program for creating a live-CD from MX Linux and antiX running system
JUST TO CLARIFY, this program is meant for MX Linux and antiX it won't work on another other system without considerable modifications because other systems don't have the infrastructure needed to run this program. Don't try to install the deb it won't work and might ruin your system.
Here's how I would install that in Debian:
Fire up VMWare-Player, use my generic Linux that don't have anything installed yet. All I do with this VM is change the Live CD and boot it. Can be Fedora, 2 minutes later it's Ubutu etc.
Then you can use MX-Live CD in Debian. You can run a thousand different Linux and their "special" programs in Debian.
If Cloning Debian is your goal, likely won't be able to do it with MX-Live CD.
If you want a custom Debian Live, something like what you've got running, you should use live-build, and build it to your liking.
I'm still holding on to my last one because it's so awesome, Buster, when it was the Testing branch.
I tried to install it by myself but my poor understanding didn't make it easy to follow the correct path, I couldn't follow the directions and got glitches ...
I tried to install it by myself but my poor understanding didn't make it easy to follow the correct path, I couldn't follow the directions and got glitches ...
Thanks
Been running Debian since Woody.
When you do something like that, you end up creating a new LQ member and start asking questions from around the other side of the curve of the road and eventually come to ask why your Debian is broken.
I tried to install it by myself but my poor understanding didn't make it easy to follow the correct path, I couldn't follow the directions and got glitches ...
In that case probably you need to document all the steps you made and all the responses. And we can give you better help to keep on the right track....
I don't understand, too complex for me, too technical, I will have to keep reinstalling the system every time it gets damaged until someone decides in the future to facilitate the installation of MXLinux-Snapshot on any Debian distro.
.
I do understand there's a challenge with language translation here.
Maybe you should consider focusing on this - "every time it gets damaged" What the [BEEP] are you doing so often to have your system get damaged every time, so frequently? I have Debian on 2 systems and antiX (Debian derivative) on another 2 and haven't had to reinstall them since I installed them -- when Buster was in testing, now running Bullseyes.
But that's me and my systems. If my systems needed frequent repairing, I'd try to figure out how to stop the damage as a priority. If you can't maintain a system, cloning and restoration might be a challenge.
Obviously an adequate backup is tantamount to system maintenance.
Quote:
Originally Posted by Camello
Would not it be more convenient for the least trained than someone to facilitate how to install this application in Debian: MX-Snapshot-Main
Debian has extensive documentation in different languages https://www.debian.org/doc/user-manuals
From basics to admin reference to securing your system, maybe not as convenient... but more practical.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.