You are not logged in.
Pages: 1
Hi guys,
I've just made backup of root and home partitions using rsync. I didn't backup /boot partition.
Let's consider scenario when I would like to use my backup. Say I formatted root, home, boot and swap partitions and set the exact UUID as these had before formatting.
What should I do to have Arch up and running? Will it be enough if I reinstall GRUB in chroot environment the following way?
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch
grub-mkconfig -o /boot/grub/grub.cfg
Or is it possible to reinstall GRUB without having to chroot before? That would be quicker and hassle-free.
Thanks!
Last edited by menteith (2022-02-27 12:00:31)
Long time Debian user who switched to Arch.
Offline
Will it be enough if I reinstall GRUB in chroot environment the following way?
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch grub-mkconfig -o /boot/grub/grub.cfg
No. You also need to install the kernel package again to place the kernel & initramfs images under /boot. The same applies for the CPU microcode package.
Or is it possible to reinstall GRUB without having to chroot before?
You could use the --boot-directory option to run grub-install without using (arch-)chroot but grub-mkconfig wouldn't work. If the (filesystem) UUIDs are the same then you could probably just copy the old /boot/grub/grub.cfg over to the new system.
If you backup /boot as well then just restoring the system with the same UUIDs for the root, /home & swap partitions and the same PARTUUID for the EFI system partition (/boot) would be enough. No need to run grub-install or grub-mkconfig at all.
Offline
Thanks for this. I need to backup /boot partition as well then.
Reinstalling kernel requires Internet access, which is a scenario I'd like to avoid. Is there an offline solution?
Last edited by menteith (2022-02-27 11:59:21)
Long time Debian user who switched to Arch.
Offline
If you backup /boot then you won't need to reinstall the kernel. Given the frequent regressions encountered with Linux I would think that would be the preferred option anyway.
Offline
Thanks. I will then use dd to backup /boot.
Long time Debian user who switched to Arch.
Offline
Why not just use rsync for /boot as well?
Offline
Will Arch boot if I format /boot and then copy (using rsync) backup files onto /boot partition?
Last edited by menteith (2022-02-27 12:12:02)
Long time Debian user who switched to Arch.
Offline
Offline
Thanks for explanation. You've been very helpful!
Long time Debian user who switched to Arch.
Offline
Pages: 1