linux:system:disk:clone-system
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:system:disk:clone-system [2023/09/08 12:28] – [Create Targte Disk] oscar | linux:system:disk:clone-system [2023/09/08 12:33] (current) – [Write Target System] oscar | ||
|---|---|---|---|
| Line 53: | Line 53: | ||
| # gzip -dc efi-image.gz | dd bs=4M of=/ | # gzip -dc efi-image.gz | dd bs=4M of=/ | ||
| # sync | # sync | ||
| - | < | + | </code> |
| ==== Write Root Partition ==== | ==== Write Root Partition ==== | ||
| Empty and create a fresh filesystem on the root partition of the target disk: | Empty and create a fresh filesystem on the root partition of the target disk: | ||
| Line 99: | Line 99: | ||
| Run grub-install against the drive you installed to. In my case that’s /dev/sdb, but this may be different on your machine. Next we install grub to our drive, thereby making it bootable. Be careful to install grub to a drive and not to a partition. | Run grub-install against the drive you installed to. In my case that’s /dev/sdb, but this may be different on your machine. Next we install grub to our drive, thereby making it bootable. Be careful to install grub to a drive and not to a partition. | ||
| - | # grub-install /dev/sdb | + | # grub-install /dev/sdX |
| + | # grub-install --recheck /dev/sdX | ||
| + | | ||
| # update-grub | # update-grub | ||
| Line 148: | Line 150: | ||
| </ | </ | ||
| - | Alternatively, | ||
| - | < | ||
| - | apt-get remove --purge grub-pc grub-common | ||
| - | apt-get install grub-pc | ||
| - | grub-mkconfig | ||
| - | update-grub | ||
| - | grub-install /dev/sda | ||
| - | </ | ||
| - | |||
| - | Now grub is back, all that is left is to exit the chrooted system and unmount everything: | ||
| - | < | ||
| - | # exit | ||
| - | # umount /mnt/sys | ||
| - | # umount /mnt/proc | ||
| - | # umount /mnt/dev/pt | ||
| - | # umount /mnt/dev | ||
| - | # umount /mnt | ||
| - | </ | ||
| Shut down and turn your computer back on, and you will be met with the default Grub2 screen. | Shut down and turn your computer back on, and you will be met with the default Grub2 screen. | ||
linux/system/disk/clone-system.1694176116.txt.gz · Last modified: by oscar
