• Grub error: no such device after install


    I installed Antergos on my Dell XPS 13, and after rebooting, the usual “Welcome to GRUB!” shows up, followed by an error - no such device: [a5cc04fd…]. Secure boot is turned off, booting is set to legacy only, and RAID is turned off in the BIOS

    Running ls in grub rescue prints (hd0).

    I have the default /boot, /, and swap partitions created by the installer (from lsblk -f):
    /dev/nvme0n1p1 AntergosBoot a5cc04fd…
    /dev/nvme0n1p2 AntergosRoot 319593a9…
    /dev/nvme0n1p5 AntergosSwap c9ef4943…

    So how come GRUB can’t find the boot partition on the SSD?

  • Have you tried to rerun grub setup?
    Boot from the iso, open a terminal and run this commands:

    sudo mount /dev/nvme0n1p2 /mnt
    sudo mount /dev/nvme0n1p1 /mnt/boot
    sudo arch-chroot /mnt
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    

    When you run grub-mkconfig check that everything is ok.

    P.S. I have no experience whatsoever with /nvme devices, but I think it should work the same way…

  • Thanks for the help :)

    grub-mkconfig does error, mostly with the message “ERROR: mkdir /var/lock/dmraid”, and then that it can’t connect to /run/lvm/lvmetad.socket. The only other thing that looks wrong is grub-probe errors because it cannot find a GRUB drive for /dev/sda1, but that is the USB device I’m running the live image from. Does it just assume that /dev/sda1 is the boot partition (unfortunately you can’t specify a disk here)?

  • @mcnutty You can ignore those dmraid/lvm errors.

    About /dev/sda1, that’s a problem, it should not install there. Maybe Cnchi installed your grub in /dev/sda?

    I’d try to reinstall grub in /dev/nvme0n1 this way:

    sudo mount /dev/nvme0n1p2 /mnt
    sudo mount /dev/nvme0n1p1 /mnt/boot
    sudo arch-chroot /mnt
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    sudo grub-install /dev/nvme0n1
    
  • Reinstalling grub as above doesn’t change the error (and completes with no errors).

  • OK.

    Boot with grub, and when you see the boot menu press ‘e’ (without the quotes).

    Then, replace all [a5cc04fd…] occurrences with /dev/nvme0n1p1 and all 319593a9… with /dev/nvme0n1p2

    Does it help? If it does, I’ll explain how to make this permanent.

  • Hi,

    Thanks for the reply, but there isn’t am opportunity for me to edit the options - grub goes straight into rescue mode (there is no countdown). If I run ls (hd0,2)/ then I just get ‘no such partition’. The set command reveals the prefix as (hd0)/grub - strange that grub doesn’t seem to be able to read the partitions from the hard disk. I was under the impression that one would expect to see partitions listed under ls, and that the root should be a partition and not a drive.

  • Probably relevant: https://bugs.archlinux.org/task/47447
    "The grub (2.02.beta2) we have does not include the later patch added for proper NVMe support, without it grub-install will appear to run fine but grub will be drop to rescue shell when boot, as long as --boot-directory (by default /boot) is on a partition of a NVMe drive. Since NVMe drive is getting common it is necessary to include this"

  • Problem “solved” by using systemd-boot instead of GRUB.

  • Hi @mcnutty , could you please elaborate on how you solved the issue? How to make systemd-boot the default?

  • Nevermind, I just used the option in the GUI installer and selected systemd-boot instead of grub. Everything working beautifully, thanks!

booting22 booting problem16 grub72 Posts 11Views 3127
Log in to reply