Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to boot on gentoo: GRUB2 - xfs - NVME SSD
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
BCPianist
n00b
n00b


Joined: 01 Jun 2019
Posts: 1
Location: Montreal

PostPosted: Sat Jun 01, 2019 7:37 pm    Post subject: Unable to boot on gentoo: GRUB2 - xfs - NVME SSD Reply with quote

I am currently configuring gentoo on a new machine using an NVME 500Gb SSD.

I reboot my computer, select the disk I want to boot off of, grub2 initializes, and then, the error I get is the following:

Code:

    !!Block device UUID="9a89bdb4-8f36-4aa6-a4c7-831943b0985c" is not a valid root device...
    !!Could not find the root block device in UUID="9a89bdb4-8f36-4aa6-a4c7-831943b0985c"
    Please specify another value or: Press Enter for the same, type "shell" for a shell, or q to skip..."
    root block device() ::


Here is my current partition scheme:

Code:

    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    nvme0n1     259:0    0 465.8G  0 disk
    ├─nvme0n1p1 259:1    0     2M  0 part /boot/efi
    ├─nvme0n1p2 259:2    0   128M  0 part /boot
    ├─nvme0n1p3 259:3    0     5G  0 part [SWAP]
    ├─nvme0n1p4 259:4    0   200G  0 part /
    └─nvme0n1p5 259:5    0 260.6G  0 part /home


Here is my blkid:

Code:

    /dev/nvme0n1p1: SEC_TYPE="msdos" UUID="DC09-2FD7" TYPE="vfat" PARTLABEL="grub" PARTUUID="2d5991fd-18ac-1148-a4d8-deb02f744ecb"
    /dev/nvme0n1p2: UUID="6070-07C6" TYPE="vfat" PARTLABEL="boot" PARTUUID="5dba49e5-03cc-744e-bd47-a7570e83b08c"
    /dev/nvme0n1p3: UUID="db229aaf-ddb4-4a86-8075-e7f035bfbf19" TYPE="swap" PARTLABEL="swap" PARTUUID="fdc303cc-e54e-c049-899a-e26286b5ec47"
    /dev/nvme0n1p4: UUID="9a89bdb4-8f36-4aa6-a4c7-831943b0985c" TYPE="xfs" PARTLABEL="root" PARTUUID="da6232eb-58ab-9948-a3f6-8a7f14eebde4"
    /dev/nvme0n1p5: UUID="e3237966-1b71-44b3-9d96-1ed7cc6f4d84" TYPE="xfs" PARTLABEL="home" PARTUUID="5b294354-fc3b-3148-bba2-418acfbb32bc"


This is part of my config in /etc/default/grub

Code:

    GRUB_CMDLINE_LINUX="rootfstype=xfs init=/usr/lib/systemd/systemd"


And this is my /boot/grub/grub.cfg

Code:

    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #

    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      load_env
    fi
    if [ "${next_entry}" ] ; then
       set default="${next_entry}"
       set next_entry=
       save_env next_entry
       set boot_once=true
    else
       set default="0"
    fi

    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi

    export menuentry_id_option

    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi

    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }

    function load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }

    if [ x$feature_default_font_path = xy ] ; then
       font=unicode
    else
    insmod part_gpt
    insmod xfs
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  9a89bdb4-8f36-4aa6-a4c7-831943b0985c
    else
      search --no-floppy --fs-uuid --set=root 9a89bdb4-8f36-4aa6-a4c7-831943b0985c
    fi
        font="/usr/share/grub/unicode.pf2"
    fi

    if loadfont $font ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=en_CA
      insmod gettext
    fi
    terminal_output gfxterm
    if [ x$feature_timeout_style = xy ] ; then
      set timeout_style=menu
      set timeout=5
    # Fallback normal timeout code in case the timeout_style feature is
    # unavailable.
    else
      set timeout=5
    fi
    ### END /etc/grub.d/00_header ###

    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9a89bdb4-8f36-4aa6-a4c7-831943b0985c' {
        load_video
        if [ "x$grub_platform" = xefi ]; then
            set gfxpayload=keep
        fi
        insmod gzio
        insmod part_gpt
        insmod fat
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  6070-07C6
        else
          search --no-floppy --fs-uuid --set=root 6070-07C6
        fi
        echo   'Loading Linux x86_64-4.19.44-gentoo ...'
        linux   /kernel-genkernel-x86_64-4.19.44-gentoo root=/dev/nvme0n1p4 ro rootfstype=xfs init=/usr/lib/systemd/systemd
        echo   'Loading initial ramdisk ...'
        initrd   /initramfs-genkernel-x86_64-4.19.44-gentoo
    }
    submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-9a89bdb4-8f36-4aa6-a4c7-831943b0985c' {
        menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.19.44-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.19.44-gentoo-advanced-9a89bdb4-8f36-4aa6-a4c7-831943b0985c' {
            load_video
            if [ "x$grub_platform" = xefi ]; then
                set gfxpayload=keep
            fi
            insmod gzio
            insmod part_gpt
            insmod fat
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root  6070-07C6
            else
              search --no-floppy --fs-uuid --set=root 6070-07C6
            fi
            echo   'Loading Linux x86_64-4.19.44-gentoo ...'
            linux   /kernel-genkernel-x86_64-4.19.44-gentoo root=/dev/nvme0n1p4 ro rootfstype=xfs init=/usr/lib/systemd/systemd
            echo   'Loading initial ramdisk ...'
            initrd   /initramfs-genkernel-x86_64-4.19.44-gentoo
        }
        menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.19.44-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.19.44-gentoo-recovery-9a89bdb4-8f36-4aa6-a4c7-831943b0985c' {
            load_video
            if [ "x$grub_platform" = xefi ]; then
                set gfxpayload=keep
            fi
            insmod gzio
            insmod part_gpt
            insmod fat
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root  6070-07C6
            else
              search --no-floppy --fs-uuid --set=root 6070-07C6
            fi
            echo   'Loading Linux x86_64-4.19.44-gentoo ...'
            linux   /kernel-genkernel-x86_64-4.19.44-gentoo root=/dev/nvme0n1p4 ro single rootfstype=xfs init=/usr/lib/systemd/systemd
            echo   'Loading initial ramdisk ...'
            initrd   /initramfs-genkernel-x86_64-4.19.44-gentoo
        }
        menuentry 'Gentoo GNU/Linux, with Linux 4.19.44-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.44-gentoo-advanced-9a89bdb4-8f36-4aa6-a4c7-831943b0985c' {
            load_video
            if [ "x$grub_platform" = xefi ]; then
                set gfxpayload=keep
            fi
            insmod gzio
            insmod part_gpt
            insmod fat
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root  6070-07C6
            else
              search --no-floppy --fs-uuid --set=root 6070-07C6
            fi
            echo   'Loading Linux 4.19.44-gentoo ...'
            linux   /vmlinuz-4.19.44-gentoo root=/dev/nvme0n1p4 ro rootfstype=xfs init=/usr/lib/systemd/systemd
            echo   'Loading initial ramdisk ...'
            initrd   /initramfs-genkernel-x86_64-4.19.44-gentoo
        }
        menuentry 'Gentoo GNU/Linux, with Linux 4.19.44-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.44-gentoo-recovery-9a89bdb4-8f36-4aa6-a4c7-831943b0985c' {
            load_video
            if [ "x$grub_platform" = xefi ]; then
                set gfxpayload=keep
            fi
            insmod gzio
            insmod part_gpt
            insmod fat
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root  6070-07C6
            else
              search --no-floppy --fs-uuid --set=root 6070-07C6
            fi
            echo   'Loading Linux 4.19.44-gentoo ...'
            linux   /vmlinuz-4.19.44-gentoo root=/dev/nvme0n1p4 ro single rootfstype=xfs init=/usr/lib/systemd/systemd
            echo   'Loading initial ramdisk ...'
            initrd   /initramfs-genkernel-x86_64-4.19.44-gentoo
        }
    }

    ### END /etc/grub.d/10_linux ###

    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###

    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###

    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###

    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###


Finally, here is the content of my `etc/fstab`:

Code:

    # /etc/fstab: static file system information.
    #
    # noatime turns off atimes for increased performance (atimes normally aren't
    # needed); notail increases performance of ReiserFS (at the expense of storage
    # efficiency).  It's safe to drop the noatime options if you want and to
    # switch between notail / tail freely.
    #
    # The root filesystem should have a pass number of either 0 or 1.
    # All other filesystems should have a pass number of 0 or greater than 1.
    #
    # See the manpage fstab(5) for more information.
    #

    # <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

    # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
    #
    # NOTE: Even though we list ext4 as the type here, it will work with ext2/ext3
    #       filesystems.  This just tells the kernel to use the ext4 driver.
    #
    # NOTE: You can use full paths to devices like /dev/sda3, but it is often
    #       more reliable to use filesystem labels or UUIDs. See your filesystem
    #       documentation for details on setting a label. To obtain the UUID, use
    #       the blkid(8) command.

    #LABEL=boot             /boot           ext4            noauto,noatime  1 2
    #UUID=58e72203-57d1-4497-81ad-97655bd56494              /               ext4            noatime         0 1
    #LABEL=swap             none            swap            sw              0 0
    #/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0

    # /dev/nvme0n1p4
    UUID=9a89bdb4-8f36-4aa6-a4c7-831943b0985c       /               xfs             rw,relatime,attr2,inode64,noquota       0 1

    # /dev/nvme0n1p2
    UUID=6070-07C6          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro  0 2

    # /dev/nvme0n1p1
    UUID=DC09-2FD7          /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro  0 2

    # /dev/nvme0n1p5
    UUID=e3237966-1b71-44b3-9d96-1ed7cc6f4d84       /home           xfs             rw,relatime,attr2,inode64,noquota       0 2

    # /dev/nvme0n1p3
    UUID=3128bf96-71f7-4a95-a81c-f82788c37f4f       none            swap            defaults        0 0



I also did the following for troubleshooting:


  • enable nvme support in the kernel
  • enable xfs filesystem support in the kernel
  • load grub without the rootfstype=xfs
  • substitute the UUID with `/dev/nvme0n1p4` in my fstab file
  • drown my sorrows in liquor


This issue does not apply as it was a USB driver problem.
And this one was not of any help either.
_________________
"Unix is simple. It just takes a genius to understand its simplicity." - Dennis Ritchie
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45383
Location: 56N 3W

PostPosted: Sat Jun 01, 2019 9:00 pm    Post subject: Reply with quote

BCPianist,

Code:
    !!Block device UUID="9a89bdb4-8f36-4aa6-a4c7-831943b0985c" is not a valid root device...
    !!Could not find the root block device in UUID="9a89bdb4-8f36-4aa6-a4c7-831943b0985c"
    Please specify another value or: Press Enter for the same, type "shell" for a shell, or q to skip..."
    root block device() ::


When you get to that point, type shell.
You will be in the initrd provided shell, Look into /dev. Are all of your /dev/nvme* entries present?

If you need a pager, more works, less does not.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6480

PostPosted: Sat Jun 01, 2019 9:35 pm    Post subject: Reply with quote

The grub.cfg file seems to look correct, it's loading the right drivers...

Regardless, you might have more luck using PARTUUID instead of UUID here.
Back to top
View user's profile Send private message
alamahant
Apprentice
Apprentice


Joined: 23 Mar 2019
Posts: 262

PostPosted: Tue Jun 04, 2019 6:18 pm    Post subject: Reply with quote

Hi,
Is your ESP created properly with the esp flag etc?
Your /boot partition does not need to be vfat...A simple ext4 or xfs would do.
Maybe you need to install dosfstools.
Did you install x86_64-efi?
Before emerging grub I think you may need to append
Code:
GRUB_PLATFORMS="efi-64"
in your make.conf.
And for installing grub maybe
Code:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=gentoo --recheck

My main suspect though is your boot partition being vfat..
Also do you have efibootmgr installed?
If yes then at grub-install time it should automatically create an entry for your gentoo in the efivars of your machine.
If not maybe install it now and manually add an entry thus:I
Code:

efibootmgr -c -l \\EFI\\gentoo\\grubx64.efi -L "Gentoo" -p <partition number of the ESP> -d /name/of/disk

or simply rerun grub-install
Also you mention
Quote:

I reboot my computer, select the disk I want to boot off of, grub2 initializes, and then, the error I get is the following:

What do you mean "select the disk"?
Through the bios?
If grub is properly configured your machine should automatically boot at a grub menu @reboot,either Gentoos' own grub menu or some other distro's if you multiboot
Do you mean selecting Gentoo from your grub menu?
If indeed you multiboot and the grub menu that appears @reboot is NOT Gentoo's then you either change the boot order from bios or using efibootmgr -o OR you boot at your other distro and run grub-mkconfig from there so as to get the grub entries updated to also include your new Gentoo installation(you need os-prober).

Regards,

:D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum