Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Could not mount specified ROOT! (No such device)
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Fri Sep 22, 2023 12:37 pm    Post subject: [SOLVED] Could not mount specified ROOT! (No such device) Reply with quote

When GRUB just started working fine I'm encountering another error for the first time:

Code:
mount: mounting /dev/nvme0n1p4 on /newroot failed: No such device
!! Could not mount specified ROOT!
!! Block device /dev/nvme0n1p4 is not a valid root device ...
!! Could not find the root block device in /dev/nvme0n1p4.
!! Please specify another value or:
!! - press Enter for the same
!! - type "shell" for a shell
!! - type "q" to skip ...
root block device(/dev/nvme0n1p4) ::


I've no idea what's happening... am I having something missing again?

I'll post anything needed :wink:
_________________
Illegitimi non carborundum.


Last edited by Torpus on Fri Sep 22, 2023 6:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 10006
Location: almost Mile High in the USA

PostPosted: Fri Sep 22, 2023 2:53 pm    Post subject: Reply with quote

So now you're using an initramfs, were you using such before?
Apparently it can no longer find your nvme device, are you using the same kernel as before?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5612
Location: Bavaria

PostPosted: Fri Sep 22, 2023 3:02 pm    Post subject: Reply with quote

This is a message from your initramfs (means: grub has successfully started your kernel; your kernel has started your intramfs) and says it is unable to mount /dev/nvme0n1p4 (which would be your correct root partition). From your other thread I can see you have XFS on it:
Code:
 4      8858MB  512GB   503GB   xfs             rootfs

So, the next question is: How you have generated your initramfs ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Sep 22, 2023 3:55 pm    Post subject: Reply with quote

Torpus,

Go into the shell.
Code:
!! - type "shell" for a shell
atd check that /dev/nvme0n1 and its partitions exist.

Code:
ls /dev/nvme0n1*
If not we need to discover why not. That's a kernel or initrd thing.
If that's ok. make a directory at say
Code:
mkdir /test

Now try
Code:
mount -o ro /dev/nvme0n1p4 /test
that should fail.
The error message will be useful.
The last few lines of dmesg may be useful too.

Wild guess. Run
Code:
lsmod
. In the xfs filesystem driver listed?
Can you modprobe it?
Does the mount work now?

All these changes are in RAM only.
_________________
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Fri Sep 22, 2023 4:36 pm    Post subject: Reply with quote

NeddySeagoon,

These outputs should answer everything:

Code:
root block device(/dev/nvme0n1p4) :: shell
** To leave and try again just press <Ctrl>+D

Generating "/run/initramfs/gksosreport.txt" ...
>> You might want to save "/run/initramfs/gksosreport.txt" to a USB stick or /boot
>> after mounting them and attach it to a bug report.

>> Welcome to Genkernel 4.3.6 (2023-09-14 14:43:24 UTC) rescue shell!
>> ...running Linux kernel 6.5.2-gentoo

rescueshell ~ # ls /dev/nvme0n1*
/dev/nvme0n1    /dev/nvme0n1p1  /dev/nvme0n1p2  /dev/nvme0n1p3  /dev/nvme0n1p4
rescueshell ~ # mkdir /test
rescueshell ~ # mount -o ro /dev/nvme0n1p4 /test
mount: mounting /dev/nvme0n1p4 on /test failed: Invalid argument
rescueshell ~ # lsmod
Module                  Size  Used by


Here you see no disks displayed by lsmod. Some parameter seems to be missing maybe.

And as you can see pietinger I made the initramfs using Genkernel (but the kernel itself is made by me :wink: )

EDIT: after attempting to mount the root partition to /test this line was added to dmesg (I ignored the numbers in the brackets because who cares):

Code:
udevd (813) used greatest stack depth: 13416 bytes left

_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 2114

PostPosted: Fri Sep 22, 2023 4:57 pm    Post subject: Reply with quote

Torpus wrote:
Code:
root block device(/dev/nvme0n1p4) :: shell
** To leave and try again just press <Ctrl>+D

Generating "/run/initramfs/gksosreport.txt" ...
>> You might want to save "/run/initramfs/gksosreport.txt" to a USB stick or /boot
>> after mounting them and attach it to a bug report.

>> Welcome to Genkernel 4.3.6 (2023-09-14 14:43:24 UTC) rescue shell!
>> ...running Linux kernel 6.5.2-gentoo

rescueshell ~ # ls /dev/nvme0n1*
/dev/nvme0n1    /dev/nvme0n1p1  /dev/nvme0n1p2  /dev/nvme0n1p3  /dev/nvme0n1p4
rescueshell ~ # mkdir /test
rescueshell ~ # mount -o ro /dev/nvme0n1p4 /test
mount: mounting /dev/nvme0n1p4 on /test failed: Invalid argument
rescueshell ~ # lsmod
Module                  Size  Used by


This means that your system is so fast, the kernel is in a race condition to discover the devices.
If you add rootdelay=2 to the end of the kernel command-line (like in grub or other loader), then the script should pause 2 seconds before looking for the device.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5612
Location: Bavaria

PostPosted: Fri Sep 22, 2023 5:22 pm    Post subject: Reply with quote

grknight wrote:
Torpus wrote:
Code:

rescueshell ~ # mount -o ro /dev/nvme0n1p4 /test
mount: mounting /dev/nvme0n1p4 on /test failed: Invalid argument
...


This means that your system is so fast, the kernel is in a race condition to discover the devices.
If you add rootdelay=2 to the end of the kernel command-line (like in grub or other loader), then the script should pause 2 seconds before looking for the device.

For me it looks like this mount was also not possible ... maybe Torpus forgot to enable XFS filesystem in the kernel ? (NVME itself is looking good)

@Torpus: If you need more help, we would need your kernel .config.
Back to top
View user's profile Send private message
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Fri Sep 22, 2023 5:38 pm    Post subject: Reply with quote

pietinger,

Yes you're right :lol: I missed XFS support in my kernel config :lol:

Just wait a sec and I'll see if that works.
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Sep 22, 2023 5:49 pm    Post subject: Reply with quote

It looks like the real mount command is missing from the initrd and the busybox mount command is in use.

That may well not accept options, or only a restricted subset.
_________________
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Fri Sep 22, 2023 6:56 pm    Post subject: Reply with quote

NeddySeagoon,

Don't worry about it. It was all nothing more than a kernel configuration error. Everything works fine now! :lol:
_________________
Illegitimi non carborundum.
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