You are not logged in.

#1 2018-12-20 05:10:36

FuturisticFume
Member
Registered: 2018-04-12
Posts: 10

[SOLVED] GRUB refuses to start from cloned drive

So, I am trying to copy my current Arch installation on SSD1 to a new SSD2. I followed these steps from the wiki for installing from a Arch host such that I:

  1. created /, /home and swap partitions on SSD2 and mounted them onto my live host on SSD1

  2. installed Arch onto SSD2 with:

    pacstrap -c /mnt base
  3. configured Arch on SSD2 as per the installation guide on the Arch wiki

  4. cloned SSD1 into SSD2 with:

    rsync -PraxX / /mnt 
    rsync -PraxX /home /mnt/home
  5. ran:

    genfstab -U /mnt >> /mnt/etc/fstab
    echo "nzxt" > /mnt/etc/hostname 
    rm /mnt/etc/machine-id
  6. installed grub on SSD2 with:

    grub-install --target=i386-pc /dev/sdb
  7. chroot into SSD2 to generate grub config with:

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

The problem I am running into is that when I disconnect SSD1 and boot from SSD2, I get:

error: no such device: {UUID of SSD1's / partition}.
error: no such filesystem.
Booting into grub rescue
grub rescue>

However when I check SSD2's /boot/grub/grub.cfg, there is no mention of the UUID. On Line 146 of this file, I see:

linux   /boot/vmlinuz-linux root=UUID=82c7a2ef-a680-4300-b9b3-67a9df9c5e5e rw  quiet

where 82c... is the correct UUID for my / partition of SSD2; this same line in SSD1's grub.cfg is different. What am I doing wrong?

Last edited by FuturisticFume (2018-12-20 06:17:01)

Offline

#2 2018-12-20 06:01:41

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] GRUB refuses to start from cloned drive

Did you regenerate your initramfs?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-12-20 06:02:04

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] GRUB refuses to start from cloned drive

The grub rescue shell is there because grub could not detect the disk in the first place, in order to acquire and read the grub.cfg -- this is all happening in the embedded grub executable.

In order to point to the right disk for grub.cfg, grub-install has the option --boot-directory, which if you do not specify this flag, will default to /boot/grub.

Which is what happened, it defaulted to /boot/grub when you ran grub-install outside of the chroot. You're supposed to do it from inside of the chroot. Instead, the autodetection detected the wrong directory.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2018-12-20 06:19:59

FuturisticFume
Member
Registered: 2018-04-12
Posts: 10

Re: [SOLVED] GRUB refuses to start from cloned drive

jasonwryan wrote:

Did you regenerate your initramfs?

I tried:

arch-chroot /mnt
mkinitcpio -p linux

Rebooted and no luck.


eschwartz wrote:

...when you ran grub-install outside of the chroot.

Solved!

Offline

Board footer

Powered by FluxBB