clone-ubuntu icon indicating copy to clipboard operation
clone-ubuntu copied to clipboard

Update grub on $Source - maybe

Open henry88g opened this issue 1 year ago • 3 comments

Hello

Mine is probably a way-out-there scenario, but may be worth mentioning.

I have a second disk in my Ubuntu desktop system which I keep updated as an 'emergency backup.' This is easy, thanks very much to your script. My grub entries on the main disk ($Source) include one for the cloned Ubuntu ($Target), and so I can boot the clone and check that all is well - without having to go to the bios to change boot drive.

After I update a kernel on $Source, I use clone-ubuntu-thiggy. It copies the new kernels to /boot on $Target and the new grub it creates there lists the new kernels from both $Source and $Target - which are both the new ones.

However, grub on $Source still has the old kernels for $Target listed in its grub.cfg, and so $Target won't boot from its entry in the $Source boot menu.

This is easily fixed by running grub-update on $Source, and I've added a line in the script to do that. I don't know if this would be useful for anyone else.

henry88g avatar May 31 '23 09:05 henry88g

Hello

Mine is probably a way-out-there scenario, but may be worth mentioning.

I have a second disk in my Ubuntu desktop system which I keep updated as an 'emergency backup.' This is easy, thanks very much to your script.

Curious, are you running this by hand or have you created a custom script to run every so often from cron (which is what I want to do).

bdwilson avatar Jul 09 '23 03:07 bdwilson

I do it by hand, for now.

henry88g avatar Jul 09 '23 09:07 henry88g

I do it by hand, for now.

Same. This is what I'd like to eventually have, but for Ubuntu.

bdwilson avatar Jul 09 '23 13:07 bdwilson