|
I understand that the OP intends to reload the backed up OS to the same machine. Then a backup might work, as long as the hardware is completely unchanged.
Usually, the binary OS running on a machine is closely tailored to the hardware, e.g. the selection of drivers. It doesn't carry drivers it doesn't need. Say that a lightening hit your internet line (presumably a metallic one, not a fiber); the high voltage made it all the way to your network interface and blew it. So you replace the broken interface with a new one, of a different model. Your OS doesn't have a driver for it, preventing you from retrieving the correct driver from internet.
Or if the lightening spike went through your power supply and hit your disk, and you replace it with a newer model, requiring a different driver. The OS lacks the driver to boot itself from the disk, even if the complete OS (but with the old disk driver) is available.
Fortunately, hardware interfaces have become much more standardized today than 20 years ago. E.g. no USB memory stick requires any special driver. Yet our PCs run numerous hardware dependent drivers. Even though your PC may boot, some essential equipment may fail to operate with the backup OS.
Years ago, after buying a new mainboard for my PC (transferring a lot of stuff from the old one - this was in the days when you had plug-in cards for everything), I tried to take a shortcut, loading the total backup I had made before throwing out the old mainboard. It "sort of" booted, but lots of stuff didn't work (even though it was unchanged; it probably had been assigned other interrupts something of that kind), and the OS bluescreened several times before I gave up and went through a complete OS installation from scratch.
There are also those software packages (OS or other) that reads some machine identification, such as a CPU ID or a hash of the IDs of peripheral IDs, and refuse to run if you try to install the backup on another CPU or configuration. A couple of Windows versions did this. If you added another hard disk to your PC, you had to call Microsoft service to receive another activation code for the new configuration. This was so annoying that it was first loosened a lot, then removed completely.
I don't expect anything of that kind with Linux, though. But even if the OS core is free, there is a lot of commercial software running on Linux, and the vendors may use such mechanisms to prevent unauthorized use of their software.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
If you have the drives and your concern is just having backups/never really having the machine down, just slap three in there in RAID0+1 and call it awesome.
You could just go RAID 1, but you'll get a slight performance bonus the first way.
|
|
|
|
|
Thanks for all constructive suggestions.
I need to add - I have NEVER figured out how Ubuntu works as multi OS system.
I believe it starts with UEFI (hardware) setup which shows multiple "Ubuntu" boot entries.
They are all named same -"Ubuntu" - and I have FOUR of them.
I believe these "Ubuntu" actually points /links with corresponding "grub" files.
Unfortunately there is no way to identify WHERE, in which HD these "grub" files are.
At least to my knowledge.
My past experience doing "DD" created another "grub" totally unrelated to "grub" I was trying to duplicate.
I have another fish to fry, software issue, but I will give RAID another try.
|
|
|
|
|
Haha I've only recently even started to touch Linux again. Prior to that, I'm not even sure it was Linux I was messing with but def *nix something. (ISP shells and SLIP)
The general idea of "ain't nobody got time fo dat" = RAID.
The plug n play of pi was pretty nice and I managed to get remoting from my windows box into it to work as well as some other stuff.
|
|
|
|
|
If I may, I like to change the OP.
I believe that the idea of duplicating OS is too risky.
I attempted to load long unused version of Ubuntu, update/upgrade it and then try to duplicate that instead of my WORKING version.
Run into big setback - had to use grub "recovery" and found out that the grub entry identified by /dev has several versions - nether one won't run unless in recovery mode.
So my next task
find a real document covering
UEFI -> Ubuntu "boot files "
Ubuntu "grub" file
ubuntu /dev/xxx version schemes
each individual grub option "normal" recovery etc.
and mainly
how does Ubuntu actually name each version
and how the
obsolete / failing to boot version can be
safely identified and removed
So any RTFM to cover above ?
I am not looking for "list of Ubuntu commands " book...
AND IF THIS IS WRONG PLACE TO POST THIS REQUEST
I GIVE UP
This post was not build with an aid of AI.
pps I will not "Ask Ubuntu" or elsewhere governed by AI management.
|
|
|
|
|
doesn't apply too much to me these days, but if possible I'd move into VMs. Keep your base iron as simple and as clean as possible.
Before I started using VMs a lot, early 2000s, I was working one morning from home, shut my laptop down, went into the lab and begun starting at a dead laptop. Lost the hard drive (spinner) with zero warning. One week later of non-billable time, I had the laptop back in operation where I wedded a disk duplicator. I had a Dell Inspiron at the time, so popping out the SATA drive was trivial, popped it into my disk duplicator - which created pure images - and I've never lost a drive since. The duplicators have finally advanced to support nvme. I don't want my OS back, I want ALL of the s/w as well.
As for software, I've tried a number of packages, and the problem I've had is that:
a) slow. I can image a full drive in under 20 minutes. I've seen software run for many, many hours.
b) the live backup, I've lost files due to some being in use. I lost confidence.
Now that I've moved on to virtual machines, backups are trivial. Stop the machine, copy the folder to my USB drive, start the machine. I use VMWare Workstation which has been quite stable for me with the one exception when an upgrade confused my machines (silly error on VMware's part, took me months to find).
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I always use GParted and copy paste all partitions to another disk. Just remember to edit the flags of EFI system partition after the copy.
For some reason the flags change when you copy.
jhaga
|
|
|
|
|
Gparted ?? That seems to be dead , abandoned tool.
I have several HD and if the drive is larger than 1TB Gparted takes its sweet time to recognize ALL partitions.
The most annoying - after every executed change - GParted scans ALL again...
Just by comparison - fdisk is Mach 5 speed to Gparted turtle.
Ah yah, you can "dismount" but you cannot get back on the horse...
Enough for rude comments....
|
|
|
|
|
GParted Stable release: 1.6.0 / 26 February 2024 so not dead.
I usually boot with a usb nvme disk and then copy partitions that normally are less than 500GB. I have not tested with partition larger than 1 TB
jhaga
|
|
|
|
|
Hey everyone,
I've been diving into C# .NET recently and I couldn't help but notice some similarities with C programming. I'm curious about how much C programming principles influence C# .NET and how understanding C might help in mastering C#.
Key Points of Discussion:
Syntax and Basic Constructs:
C# shares many basic syntax elements with C, such as data types (int, char, float), control structures (if, for, while), and operators (+, -, *, /). How much does familiarity with these elements in C help when learning C#?
Memory Management:
C provides manual memory management using malloc and free, whereas C# handles memory through garbage collection. How does this difference impact the way we write and optimize code in C# compared to C?
Pointers and References:
While C heavily relies on pointers, C# abstracts memory management but still allows the use of pointers in an unsafe context. How relevant are C pointers when dealing with C# programming, especially in performance-critical applications?
Object-Oriented Programming:
C# is inherently object-oriented, unlike C. For those coming from a C background, how challenging is it to grasp the object-oriented concepts in C#? How can C principles aid in understanding these concepts?
Platform Independence:
C# through .NET Core aims to be platform-independent, much like C programs can be compiled on various platforms. What are the key differences in achieving platform independence between the two languages?
Use Cases and Applications:
C is often used for system-level programming and embedded systems, while C# is popular for web applications, desktop applications, and game development using Unity. How do these different use cases affect the choice of language and the transition from C to C#?
Your Experiences and Insights:
I’d love to hear from those of you who have experience in both C and C#. How did your knowledge of C help (or not help) you when learning C#? Are there specific areas where you felt a strong correlation or significant differences? Any tips for someone coming from a C background and looking to excel in C# .NET?
Looking forward to an engaging discussion!
Cheers,
Tejaswini
modified 6-Jun-24 20:14pm.
|
|
|
|
|
...this feels like a test. Are you trying to get us to do your homework?
|
|
|
|
|
C# is merely VB.NET with some steroids added...
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
Perhaps surprisingly, C# and C share very little, other than some superficial similarities in syntax - and it's not until you understand both languages pretty well that you can appreciate (or even notice!) many of them!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
C# is part of the C like programming language family. (like C++, rust, ...)
They all share some syntactic similarities, but they quickly diverge into their own specific language.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
My opinion is that if you learn any programming language at all then you have learned 50% of all of them, arbitrary percentages notwithstanding. It's more "true" if we subdivide into things like functional vs OOP languages.
A loop is a loop, the core of just about every data structure tend be an array, a hashmap is a hashmap, race conditions, resource contention, thread safety, cyclomatic complexity, atomicity... All these concepts and a great many more are going to exist no matter what language you are working in.
This is part of the argument I think I have read before which posits that multilingual people tend to pick up programming a bit easier and already have the neurons knocking around upstairs in much an order suitable. This makes sense because programming is just the language we use to command machines.
There are/can be vast differences and the nuances do often matter. But the concepts - those bits that help you understand what matters and what does not? These are very universal.
|
|
|
|
|
I agree.
Having been through a Fortran, Cobol, PL/I, C cycle, the baby steps for each were fewer and fewer as one transitioned.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Well except for pure Lisp maybe. That one always seemed way different to me.
|
|
|
|
|
Yeah, Lisp was way different. I remember a time when it was really being pushed hard as an application language for expert systems, etc.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Once you've learned one of the "curly brace languages", you've learned nearly all of them because you've learned the concepts behind them. All the same concepts apply to all languages. After you learn the concepts, it's just a matter of semantics in describing what you want the code to do.
|
|
|
|
|
Seems like you asked ChatGPT to create questions for you to ask here nice try. NEXT !!!
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
I don't think of them as much the same. They're both C family so the syntax is similar, but that's about where the similarities end.
The datatypes for example, appear the same but they are not. A C int is not equivalent to a C# concept of an int as C's word size is not fixed, but varies by machine. Floats and doubles are the same but that probably has as much to do with IEEE as anything.
Using pointers in C# raises the question of why not use C? More importantly, the unsafe context only works on code that is fully trusted, greatly limiting where and how it can be deployed. There's almost nothing you can do with unsafe that you can't do with the marshalling infrastructure. Finally, using pointers often harms GC performance because you have to pin memory addresses so they don't get relocated during a collection.
I don't know how hard it is to grasp OOP. I picked it up in the 1980s. It has been too long, but I don't remember it being especially difficult - particularly once you understand how C++ implements classes and that you can make virtually the same constructs in C, just more verbose.
C is cross compatible source code. C# is cross compatible binary code. C# requires a VM. C does not. C runs in far more places - places where C# will never run.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Agree, except: C# requires a VM ... unless I misunderstood your statement
|
|
|
|
|
C# requires a VM. C does not.
I wrote that. I can defend it. The CLI is a virtual machine. Its instruction set is IL. Its runtimes are the CLR.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
But it will compile finally to the target machine native processor code
|
|
|
|
|
It's JIT compiled, which is an implementation detail of the VM, similar to javascript on a modern browser.
Furthermore, setting aside that, it still cannot manage memory without the CLI, even compiled to native code. It requires the virtual machine in order to do basic operations. That machine is not simply part of the run time library like C's heap stuff. It's garbage collected - a process.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|