Answer the question
In order to leave comments, you need to log in
How to copy operating system from one hdd to another?
Hello! I must say right away that I’m doing Google, but the disk on which the operating system is about to fall apart, so I can’t experiment and practice using recipes from all sorts of unreliable sources. I used the first available resource and there they advised the following command "dd if=/dev/sda of=/dev/sdb". As a result, the bootloader does not start, there is a suspicion that it is not in the zero sector! What do you think?
Answer the question
In order to leave comments, you need to log in
In principle, everything is simple:
1) connect the disk
2) partition it by analogy with the existing one (parted)
3) format the partitions (XXX.mkfs)
4) copy each partition separately (cp -a /from /to)
5) install the bootloader
6) edit /to/etc/fstab and loader scripts
But! It would be nice to know:
- what partitions and type of partition table
- what file systems
- what bootloader
- are there any ZFS / LVM / RAID and other things ..
And here for each item there are options ...
Yes, you can try using https:// clonezilla.org/
First of all, with a dying disk. We make a complete image.
The same clonezilla works wonderfully. Or any other software. Akronis, paragon And so on.
Well, then we roll onto a new working disk
What happens when you try to boot from sdb?
You can make a copy via dump. Then boot from livedvd and restore
After copying via dd, it is usually necessary to update the initramfs.
If the console appears, dracut:/$_
then we update the data.
dracut --regenerate-all -f
This is for RHEL-like ones. For others, it's a little different.
Why bother if you can make a backup via TimeShift and restore it to a new partition. Moreover, when restoring, he updates and installs the GRUB bootloader on the new partition. No need to use the command line, everything is done in a couple of mouse clicks.
Not Linux, really, but theoretically it should work.
Transferring Windows from HDD to SSD without reinstalling...
>at "dd if=/dev/sda of=/dev/sdb". As a result, the bootloader does not start, there is a suspicion that it is not in the zero sector! What do you think?
the bootloader is restored separately. if you have done dd and rolled it onto a new disk, there is no need to further torment the old one. just restore the bootloader, for example here:
https://help.ubuntu.ru/wiki/%D0%B2%D0%BE%D1%81%D1%...
perform the most reliable, second way - Recovery using chroot
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question