Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Bootproblem: Could not mount specified ROOT !
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
linux_os2
n00b
n00b


Joined: 29 Aug 2018
Posts: 67
Location: Zedelgem Belgium

PostPosted: Mon May 03, 2021 10:24 am    Post subject: [Solved] Bootproblem: Could not mount specified ROOT ! Reply with quote

During Boot::

Quote:
Genkernel 4.2.1 (2021-04-26 22:13:33 UTC). Linux kernel 5.10.27-gentoo-x86_64
Activating udev ...
Determinig root device (trying UUID=18ef6c97-e2ac-465f-88af-4343daf7e6be)
Root device detected as /dev/sda5 !
Mounting /dev/sda5 as root ...
Using mount -t auto -o ro /dev/sda5 /newroot
mount: mounting /dev/sda5 on /newroot failed: No such file or device
Could not mount specified ROOT !
Block device /dev/sda5 is not a valid root device ...
Please specify another value or
-press enter for the same
-type shell for a shell
- type q to skip ...
root block device(/dev/sda5) ::


Pressing enter: boot continues normally.

fstab:

Quote:
# Root
UUID=18ef6c97-e2ac-465f-88af-4343daf7e6be / ext4 noatime 0 1

# /boot/efi was on /dev/sda2 during installation
UUID=CC79-78A1 /boot/efi vfat umask=0077 0 1

# /home was on /dev/md127 during installation
#UUID=b718d51d-3f1a-4c18-91f6-44bbe431b213 /oldhome ext4 defaults,noatime 0 2
UUID=92c9dbbc-0f40-405c-a954-b0801e235346 /home ext4 defaults,noatime 0 2

# swap was on /dev/sde2 during installation
UUID=ead82ea6-4947-4831-bbd0-e2cfcdef071d none swap sw 0 0


grub.cfg

Quote:
#
# 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 ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 18ef6c97-e2ac-465f-88af-4343daf7e6be
else
search --no-floppy --fs-uuid --set=root 18ef6c97-e2ac-465f-88af-4343daf7e6be
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=C
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-18ef6c97-e2ac-465f-88af-4343daf7e6be' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 18ef6c97-e2ac-465f-88af-4343daf7e6be
else
search --no-floppy --fs-uuid --set=root 18ef6c97-e2ac-465f-88af-4343daf7e6be
fi
echo 'Loading Linux 5.10.27-gentoo-x86_64 ...'
linux /boot/vmlinuz-5.10.27-gentoo-x86_64 root=UUID=18ef6c97-e2ac-465f-88af-4343daf7e6be ro
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-5.10.27-gentoo-x86_64.img
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-18ef6c97-e2ac-465f-88af-4343daf7e6be' {
menuentry 'Gentoo GNU/Linux, with Linux 5.10.27-gentoo-x86_64' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.27-gentoo-x86_64-advanced-18ef6c97-e2ac-465f-88af-4343daf7e6be' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 18ef6c97-e2ac-465f-88af-4343daf7e6be
else
search --no-floppy --fs-uuid --set=root 18ef6c97-e2ac-465f-88af-4343daf7e6be
fi
echo 'Loading Linux 5.10.27-gentoo-x86_64 ...'
linux /boot/vmlinuz-5.10.27-gentoo-x86_64 root=UUID=18ef6c97-e2ac-465f-88af-4343daf7e6be ro
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-5.10.27-gentoo-x86_64.img
}
menuentry 'Gentoo GNU/Linux, with Linux 5.10.27-gentoo-x86_64 (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.27-gentoo-x86_64-recovery-18ef6c97-e2ac-465f-88af-4343daf7e6be' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 18ef6c97-e2ac-465f-88af-4343daf7e6be
else
search --no-floppy --fs-uuid --set=root 18ef6c97-e2ac-465f-88af-4343daf7e6be
fi
echo 'Loading Linux 5.10.27-gentoo-x86_64 ...'
linux /boot/vmlinuz-5.10.27-gentoo-x86_64 root=UUID=18ef6c97-e2ac-465f-88af-4343daf7e6be ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-5.10.27-gentoo-x86_64.img
}
menuentry 'Gentoo GNU/Linux, with Linux 5.10.27-gentoo-x86_64.old' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.27-gentoo-x86_64.old-advanced-18ef6c97-e2ac-465f-88af-4343daf7e6be' {
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 18ef6c97-e2ac-465f-88af-4343daf7e6be
else
search --no-floppy --fs-uuid --set=root 18ef6c97-e2ac-465f-88af-4343daf7e6be
fi
echo 'Loading Linux 5.10.27-gentoo-x86_64.old ...'
linux /boot/vmlinuz-5.10.27-gentoo-x86_64.old root=UUID=18ef6c97-e2ac-465f-88af-4343daf7e6be ro
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-5.10.27-gentoo-x86_64.img
}
menuentry 'Gentoo GNU/Linux, with Linux 5.10.27-gentoo-x86_64.old (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.27-gentoo-x86_64.old-recovery-18ef6c97-e2ac-465f-88af-4343daf7e6be' {
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 18ef6c97-e2ac-465f-88af-4343daf7e6be
else
search --no-floppy --fs-uuid --set=root 18ef6c97-e2ac-465f-88af-4343daf7e6be
fi
echo 'Loading Linux 5.10.27-gentoo-x86_64.old ...'
linux /boot/vmlinuz-5.10.27-gentoo-x86_64.old root=UUID=18ef6c97-e2ac-465f-88af-4343daf7e6be ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-5.10.27-gentoo-x86_64.img
}
}

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

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


Last edited by linux_os2 on Tue May 04, 2021 6:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Veteran
Veteran


Joined: 23 Mar 2019
Posts: 1064

PostPosted: Mon May 03, 2021 2:31 pm    Post subject: Reply with quote

Can you please try to create an initrd with dracut this time and also post
Code:

cat /etc/default/grub

Is /dev/sda a usb drive?
_________________
:)
Back to top
View user's profile Send private message
linux_os2
n00b
n00b


Joined: 29 Aug 2018
Posts: 67
Location: Zedelgem Belgium

PostPosted: Tue May 04, 2021 7:51 am    Post subject: Reply with quote

Recreating initramfs with dracut solved the problem :D

/etc/default/grub:
Quote:
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
# 'grub-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values.

GRUB_DISTRIBUTOR="Gentoo"

# Default menu entry
#GRUB_DEFAULT=0

# Boot the default entry this many seconds after the menu is displayed
#GRUB_TIMEOUT=5
#GRUB_TIMEOUT_STYLE=menu

# Append parameters to the linux kernel command line
#GRUB_CMDLINE_LINUX=""
#
# Examples:
#
# Boot with network interface renaming disabled
# GRUB_CMDLINE_LINUX="net.ifnames=0"
#
# Boot with systemd instead of sysvinit (openrc)
# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"

# Append parameters to the linux kernel command line for non-recovery entries
#GRUB_CMDLINE_LINUX_DEFAULT=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
#GRUB_GFXMODE=640x480

# Set to 'text' to force the Linux kernel to boot in normal text
# mode, 'keep' to preserve the graphics mode set using
# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular
# graphics mode, or a sequence of these separated by commas or
# semicolons to try several modes in sequence.
#GRUB_GFXPAYLOAD_LINUX=

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub/mybackground.png"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=true

# Uncomment to disable generation of the submenu and put all choices on
# the top-level menu.
# Besides the visual affect of no sub menu, this makes navigation of the
# menu easier for a user who can't see the screen.
#GRUB_DISABLE_SUBMENU=y

# Uncomment to play a tone when the main menu is displayed.
# This is useful, for example, to allow users who can't see the screen
# to know when they can make a choice on the menu.
#GRUB_INIT_TUNE="60 800 1"
GRUB_DISABLE_OS_PROBER=false


sda is an internal sata-SSD 1TB
Back to top
View user's profile Send private message
alamahant
Veteran
Veteran


Joined: 23 Mar 2019
Posts: 1064

PostPosted: Tue May 04, 2021 12:04 pm    Post subject: Reply with quote

It is good that it works with dracut because dracut is very inteligent and recognizes the / device.
However your above file is missing
Code:

GRUB_CMDLINE_LINUX="root=/dev/sdax <OR root=UUID=<uuid of /dev/sdax>>  rootfstype=ext4"

at a minimum.
Then genkernel would work properly also I suppose.
_________________
:)
Back to top
View user's profile Send private message
linux_os2
n00b
n00b


Joined: 29 Aug 2018
Posts: 67
Location: Zedelgem Belgium

PostPosted: Tue May 04, 2021 12:45 pm    Post subject: Reply with quote

/etc/default/grub contains:
Code:
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
#GRUB_DISABLE_LINUX_UUID=true


as such the mkconfig made:
grub.cfg
Code:
linux /boot/vmlinuz-5.10.27-gentoo-x86_64 root=UUID=18ef6c97-e2ac-465f-88af-4343daf7e6be ro


no : rootfstype=ext4, but maybe that is not so important
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue May 04, 2021 1:39 pm    Post subject: Reply with quote

linux_os2,

The rootfstype= speeds up booting by a few milliseconds as the kenel only tries the given filesystem.
Without rootfstype=, the kernel will try all the filesystems it knows until one works.
_________________
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
linux_os2
n00b
n00b


Joined: 29 Aug 2018
Posts: 67
Location: Zedelgem Belgium

PostPosted: Tue May 04, 2021 8:12 pm    Post subject: Reply with quote

NeddySeagoon wrote:
linux_os2,

The rootfstype= speeds up booting by a few milliseconds as the kenel only tries the given filesystem.
Without rootfstype=, the kernel will try all the filesystems it knows until one works.


Thx Neddy
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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