Attempting to install GRUB to a disk with multiple partition labels

stick_to_disk Let’s assume the following scenario. A Linux administrator called Bob, as many fictive persons have that name, got the task to get a Linux system ready for a backup server that a client has ordered. Unfortunately he has no hard drive available so he decided to install Linux on a usb stick which he would migrate to a hard drive later because as an experienced Linux user he already knew the steps that would be required for the migration.

Two days after Bob ordered a new hard drive from an online store he immediately started to migrate. Firstly he downloaded his favourite Arch Linux Live ISO and booted it. With the dd tool he cloned the usb stick. Then he resized the root partition with an ext file system.

Now it was time to install the Grub2 boot loader so he mounted the cloned root directory and chrooted to it.

mount /dev/sdb1 /mnt
arch-chroot /mnt

The chroot is necessary to let the current running processes and their children work on the new environment and not on the environment from the ISO itself.

As an exact clone of the usb stick was made the cloned partitions have the same universally unique identifier (UUID) as the original partitions, so there’s no need to update /boot/grub/grub.cfg and /etc/fstab.

To make the new disk usable the boot loader must be installed on this disk by executing grub-install /dev/sdb. Instead of installing the boot loader an error message showed up unexpectedly.

Attempting to install GRUB to a disk with multiple partition labels.
This is not supported yet..

Bob was then checking all the configuration files for the correct UUIDs but whatever he tried to fix it, it didn’t work. Although Bob was sure that the Grub configuration file was correct he finally just recreated it.

grub-mkconfig -o /boot/grub/grub.cfg

Right after Bob ran grub-install again, his face color changed back to normal.


1 Comment

  1. However, whatever ready made bait you favour,
    it is a fact that you can create even more potent baits using a totally new level
    of knowledge and the reasons for you being able to
    defeat any ready made bait are endless. Presently there are lots
    of stunning places which includes the Wroxham Boat Hire that is the top sailing
    region. So, you will be guided accordingly and will learn better and

    My web blog: Cockpit Commercial Freezer Compressor

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>