Web lists-archives.com

Re: Need help making new boot vol




Le 16/01/2019 à 01:59, Andy Smith a écrit :

On Tue, Jan 15, 2019 at 04:56:31PM -0600, Dennis Wicks wrote:
I have copied my boot, root and home partitions to a larger
device but I think I need to run grub to actually make the
disk boot.

# dpkg-reconfigure grub-pc

will normally take care of that.

I think this answer need to be developped. This command can be run either in the original system before the copy (so that the configuration is copied to the new system) or in the new system after the copy.

When the command is run in the original system, the new boot partition must be mounted on /boot before.

Running the command in the new system means either a chroot or booting directly on the new system. You can install GRUB on the new disk with the following command in the original system :

grub-install --boot-directory=/path/to/new/boot /dev/xxx

where /dev/xxx is the new disk device node and /path/to/new/boot is the mount point of the new boot partition.

If the original and new partitions have different UUIDs, then the new /etc/fstab and /boot/grub/grub.cfg must be updated with the new UUIDs. If you want to update grub.cfg with update-grub, you must run it in the new system (chroot).

Note : running update-grub in the original system with the two disks to add the new system in the GRUB menu won't work until the new grub.cfg has been updated properly.