Web lists-archives.com

Re: Creating a bootable (non-UEFI) backup copy of a bootable (non-UEFI) Debian hard disk




On 11/3/18, Pascal Hambourg <pascal@xxxxxxxxxxxxxxx> wrote:
> Le 03/11/2018 à 09:45, local10 a écrit :
>>
>> Am looking for an (easy) way to create a backup copy of working bootable
>> Debian Buster HD. The idea here is to have a second bootable
>> fully-functional HD which is normally offline but updated from time to
>> time, including all user data and installed packages.
>>
>> So for that purpose I have two HDs (working and backup), both are the same
>> model, the same size, both are partitioned exactly the same way (three
>> partitions: /boot, /, swap). Rsync-ing "/" partitions is not a problem and
>> coping boot partition files from "working /boot" to "backup /boot" could
>> be easily done too. However, I'm having issues making the backup HD
>> bootable. Either I'm doing something wrong with grub-install and/or
>> perhaps just coping files from "working /boot" to "backup /boot" isn't a
>> good idea?
>
> Copying files is not enough.
> 1) You must properly install GRUB on the backup disk :
>
> grub-install --boot-directory=/backup-boot-partition-mount-point \
>   /dev/backup-disk
>
> 2) The partitions on the backup disk have different UUIDs but config
> files such as /etc/fstab, /etc/initramfs-tools/conf.d/resume and
> /boot/grub/grub.cfg reference UUIDs of the original disk partitions and
> must be adjusted.


Pascal's is the method I used. Mine is simpler since it's all in one
place, e.g. I:

grub-install /dev/sdk

Being reminded about the additional boot-directory step is
handy/bookmarkable. "man grub-install" gets us that and so much more.
:)

What I wanted to add about the fstab, etc, is OMG!!!

/etc/initramfs-tools/conf.d/resume

HOW MANY bug threads here about resume not resuming would be fixed
with that right there?

I never heard it before, at least not where it cognitively took a
foothold. I fully understand its effect. I change fstab ALL THE TIME.
/boot/grub/grub.cfg, too, via running update-grub where appropriate
specifically because of UUIDs and now lately PARTUUIDs**..

Resume has NEVER hit my radar like those others. I wonder how many
people that tip will help now.....

OR not.... :)

Cindy :)

** PARTUUIDs (in fstab) are an accidental find that have been helping
boot 3TB gpt hard drives when boot errors were saying *correct*,
*properly identified* UUIDs did not exist.
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *