LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-27-2021, 06:05 AM   #31
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled

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!

Greetings.
 
Old 09-27-2021, 07:16 AM   #32
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
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.
 
Old 09-27-2021, 02:36 PM   #33
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
A couple things that have not been mentioned.

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.
 
Old 09-27-2021, 05:39 PM   #34
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
/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.

Last edited by Brains; 09-27-2021 at 05:45 PM.
 
Old 09-27-2021, 06:36 PM   #35
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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,
Code:
                New UUID
tune2fs -U new_uuid /dev/sdaX

Last edited by Brains; 09-27-2021 at 07:02 PM.
 
Old 09-27-2021, 06:58 PM   #36
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
Thank you all of you ... but it's still ...

Would not it be more convenient for the least trained than someone to facilitate how to install this application in Debian: MX-Snapshot-Main

https://github.com/mx-linux/mx-snapshot.
 
Old 09-27-2021, 07:01 PM   #37
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by Camello View Post
Thank you all of you ... but it's still ...

Would not it be more convenient for the least trained than someone to facilitate how to install this application in Debian: MX-Snapshot-Main

https://github.com/mx-linux/mx-snapshot.
Quote:
README.md
mx-snapshot

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.
Not advisable.
 
Old 09-27-2021, 07:11 PM   #38
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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.
 
Old 09-27-2021, 08:35 PM   #39
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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.
 
Old 09-28-2021, 03:32 AM   #40
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
This issue has been much discussed before, please if you wish to see that there are possibilities read the entire following thread:

https://forums.debian.net/viewtopic.php?f=16&t=146083

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
 
Old 09-28-2021, 04:22 AM   #41
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by Camello View Post
This issue has been much discussed before, please if you wish to see that there are possibilities read the entire following thread:

https://forums.debian.net/viewtopic.php?f=16&t=146083

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.
 
1 members found this post helpful.
Old 09-28-2021, 04:50 AM   #42
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,004

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
Quote:
Originally Posted by Camello View Post

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....
 
Old 09-28-2021, 07:46 AM   #43
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
Good, i will try it again but ... i should open a new thread.
 
Old 09-28-2021, 06:45 PM   #44
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 141

Rep: Reputation: 29
Quote:
Originally Posted by Camello View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can I make a copy of an existing operating system? Brant Linux - Software 8 03-31-2016 06:41 PM
problem operating command with DUAL operating system with ubuntu & windows 7 gne Linux - Newbie 2 02-01-2015 08:12 AM
LXer: The non-operating system operating system LXer Syndicated Linux News 0 06-26-2010 05:42 PM
'Operating system not found' Any operating system installed wont work. TechniSlave Linux - Newbie 55 02-09-2009 11:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration