Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Kernel panic - not syncing: VFS: Unable to mount root fs

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
18 posts • Page 1 of 1
Author
Message
zyzy078
n00b
n00b
Posts: 14
Joined: Mon Jan 30, 2023 11:51 pm

Kernel panic - not syncing: VFS: Unable to mount root fs

  • Quote

Post by zyzy078 » Sun Feb 05, 2023 5:31 am

Hi,
I'm new here so I hope Ive posted this in the right place.

Id used Gentoo for a little while on my previous laptop using the gentoo-dist kernel which worked all well and good.
When switching to my new laptop I used the gentoo-dist kernel again and had no sound. I have been pointed towards building a kernel from the gentoo-sources to build in my sound components to get them working. After I followed various guides, I could never get the system to boot with a self compiled kernel.

Not sure why this is, I thought it may have to do with my initramfs which I created using dracut so I tried making it with genkernel which gave me a different error, all having to do with being unable to mount my "root device", which I think is my root partition?

I keep getting "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---"


Im unsure of what information I should be showing for help, but here is my lspci output.

Code: Select all

0000:00:00.0 Host bridge: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers (rev 05)
0000:00:01.0 PCI bridge: Intel Corporation 11th Gen Core Processor PCIe Controller #1 (rev 05)
0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
0000:00:06.0 System peripheral: Intel Corporation Device 09ab
0000:00:07.0 PCI bridge: Intel Corporation Tiger Lake-H Thunderbolt 4 PCI Express Root Port #0 (rev 05)
0000:00:07.2 PCI bridge: Intel Corporation Tiger Lake-H Thunderbolt 4 PCI Express Root Port #2 (rev 05)
0000:00:08.0 System peripheral: Intel Corporation GNA Scoring Accelerator module (rev 05)
0000:00:0d.0 USB controller: Intel Corporation Tiger Lake-H Thunderbolt 4 USB Controller (rev 05)
0000:00:0d.2 USB controller: Intel Corporation Tiger Lake-H Thunderbolt 4 NHI #0 (rev 05)
0000:00:0d.3 USB controller: Intel Corporation Tiger Lake-H Thunderbolt 4 NHI #1 (rev 05)
0000:00:0e.0 RAID bus controller: Intel Corporation Volume Management Device NVMe RAID Controller
0000:00:14.0 USB controller: Intel Corporation Tiger Lake-H USB 3.2 Gen 2x1 xHCI Host Controller (rev 11)
0000:00:14.2 RAM memory: Intel Corporation Tiger Lake-H Shared SRAM (rev 11)
0000:00:14.3 Network controller: Intel Corporation Tiger Lake PCH CNVi WiFi (rev 11)
0000:00:15.0 Serial bus controller: Intel Corporation Tiger Lake-H Serial IO I2C Controller #0 (rev 11)
0000:00:16.0 Communication controller: Intel Corporation Tiger Lake-H Management Engine Interface (rev 11)
0000:00:1d.0 PCI bridge: Intel Corporation Device 43b7 (rev 11)
0000:00:1f.0 ISA bridge: Intel Corporation Tiger Lake-H LPC/eSPI Controller (rev 11)
0000:00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-H HD Audio Controller (rev 11)
0000:00:1f.4 SMBus: Intel Corporation Tiger Lake-H SMBus Controller (rev 11)
0000:00:1f.5 Serial bus controller: Intel Corporation Tiger Lake-H SPI Controller (rev 11)
0000:01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
0000:01:00.1 Audio device: NVIDIA Corporation Device 228e (rev a1)
0000:58:00.0 SD Host controller: Genesys Logic, Inc GL9750 SD Host Controller (rev 01)
10000:e0:06.0 PCI bridge: Intel Corporation 11th Gen Core Processor PCIe Controller #0 (rev 05)
10000:e1:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO
Ive recompiled the kernel multiple times trying to get it working, looking at various discussion threads on here and info on the Gentoo wiki.
Its been getting frustrating so I thought id finally make a post about it on here.

Any help would be much appreciated.

[Moderator edit: added [code] tags to preserve output layout. -Hu]
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Feb 05, 2023 5:50 am

zyzy078,

Welcome to Gentoo Forums !

You surely already know that you need all kernel modules which are necessary that the kernel can reach its root partition. (0,0) points not to a parition, so it is the whole harddisk which is not available.

I see you have a very modern notebook ... and you have:

Code: Select all

0000:00:0e.0 RAID bus controller: Intel Corporation Volume Management Device
... so ... maybe ... you are missing only one option ... ;-) take a look to number 6 of this article:
https://wiki.gentoo.org/wiki/User:Pieti ... at_minimum
Top
zyzy078
n00b
n00b
Posts: 14
Joined: Mon Jan 30, 2023 11:51 pm

  • Quote

Post by zyzy078 » Sun Feb 05, 2023 11:25 am

pietinger,

Thank you for your response, I deleted my old config and started again, enabling the option you showed, and it seems to be picking up the partitions on the drive now. The message has changed.
Also, I forgot to mention that I am dual booting Windows 10 and Gentoo on my laptop with nvme0n1p8 being my root partition.

Here is it trying to boot.
https://pasteboard.co/kW7jA1KyDeHm.jpg

Here is my kernel config.
https://pastebin.com/W7egtfTQ

Here is my fstab.
https://pastebin.com/NDySDRyX

Here is my grub config.
https://pastebin.com/fCdaZVvi

Is there something else I could be missing?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56108
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Feb 05, 2023 11:51 am

zyzy078,

There is something very odd there.

Your boot image shows the kernel detecting nvme0n1 ... p1, p3, p4, p6 and p7.
Having gaps in the partition table is ok.
That at least tells that the kernel can see the drive and read the partition table.

Your fstab says

Code: Select all

# UUID=28542e2e-f20e-4be5-8273-02b4516ef0e6
/dev/nvme0n1p8      	/         	ext4      	rw,relatime	0 1
and the kernel command line in grub.cfg uses UUID=28542e2e-f20e-4be5-8273-02b4516ef0e6 too, so that's good.

So why is /dev/nvme0n1p8 not shown in the boot image?

Boot with your install media and post the output of

Code: Select all

blkid
please.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
zyzy078
n00b
n00b
Posts: 14
Joined: Mon Jan 30, 2023 11:51 pm

  • Quote

Post by zyzy078 » Mon Feb 06, 2023 12:19 am

NeddySeagoon,

Thank you for your response.

Here is my blkid
https://pastebin.com/R7AEqMCQ

It has 2 UUIDs?

Also it seems in the last photo of it booting had the root drive glitched out in the image as when I booted again it was there.
https://pasteboard.co/7aiaAHT3LAmU.jpg

What could this mean?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56108
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Feb 06, 2023 12:38 am

zyzy078,

Code: Select all

/dev/nvme0n1p8: UUID="28542e2e-f20e-4be5-8273-02b4516ef0e6" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="7c36a8cd-0c5f-4944-9965-e8c188c52081"
There are lots of UUID all different that are uses for related objects. Its important to be able to tell them apart.

Code: Select all

PARTUUID="7c36a8cd-0c5f-4944-9965-e8c188c52081"
This is the UUID of the partition /dev/nvme0n1p8. Its stored in the partition table and is fixed until the partition table entry is removed.
That is, it does not change if you make a new filesystem there. The kernel understands PARTUUID too, so

Code: Select all

root=PARTUUID=7c36a8cd-0c5f-4944-9965-e8c188c52081
is preferred over

Code: Select all

root=/dev/nvme0n1p8
If you add another nvme card, the one you have may change its number but the kernel will find the PARTUUID regardless.

UUID="28542e2e-f20e-4be5-8273-02b4516ef0e6" is a property of the filesystem on /dev/nvme0n1p8. It is changed whenever a new filesystem is created there.
The kernel does not understand filesystem UUIDs, that need the mount command.
UUIDs are preferred in /etc/fstab as they still work if devices are moved around.

There are three or four other UUIDs associated with other block devices.

It all looks good.

I'll post more in the morning.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Feb 06, 2023 12:00 pm

zyzy078,

you can use root=UUID=... ONLY when using an initramfs which understand this ...
(see more here: https://wiki.gentoo.org/wiki/User:Pieti ... s_Overview)
... kernel DONT understand this ... kernel understand only root=/dev/... or root=PARTUUID=... (and rarely used major/minor-number)
(see more here: https://wiki.gentoo.org/wiki/User:Pieti ... _Parameter)

It seems to me you are NOT using an initramfs and because I dont know if you do boot with grub or do an UEFI boot I would try this:

Code: Select all

Processor type and features  --->
    [*] Built-in kernel command line
    (root=PARTUUID=7c36a8cd-0c5f-4944-9965-e8c188c52081 ro)
    [*]     Built-in command line overrides boot loader arguments
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56108
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Feb 06, 2023 12:19 pm

pietinger,

Code: Select all

menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-28542e2e-f20e-4be5-8273-02b4516ef0e6' {
	load_video
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root 28542e2e-f20e-4be5-8273-02b4516ef0e6
	echo	'Loading Linux 5.15.88-gentoo ...'
	linux	/boot/vmlinuz-5.15.88-gentoo root=UUID=28542e2e-f20e-4be5-8273-02b4516ef0e6 ro  
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-5.15.88-gentoo.img
}

That says that grub is going to load an initramfs or give an error.
We know nothing of the initramfs content.

The unknown-block(0,0) is the photo normally means that the kernel cannot see the drive at all.
Its normally unknown-block(major,minor) when the kernel can see the drive and the partition.
In this case, the kernel lists the partitions, which is inconsistent with the above.

Having written that ... the boot ends with a kernel panic. That suggests that the iniramfs is missing or broken.
Normally, the failure to mount root ends with being dropped to the rescue shell and that's not happening.

Lots of contradictions ...


zyzy078,

Please pastebin the kernel .config file you are trying to boot now, we will need to do this by analysis. (Educated guesswork) :)
Explain how you build your kernel and initrd. If you don't have an initrd now, we need your new grub.cfg too.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Feb 06, 2023 12:29 pm

Neddy,

you can give your kernel as much as you want an "initrd=.." - parameter ... IF there is NO initramfs file ... THEN kernel:
1. ignores "initrd=.." and
2. does what it always does: kernel trys to mount the root partition by itself. You see the output: THIS error comes FROM kernel ... AND ... because kernel have gotten the parm "root=UUID=.." kernel CANNOT mount root partition with this statement (because kernel dont understand this).

Let OP try my recommendation and we look further.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56108
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Feb 06, 2023 1:46 pm

pietinger,

Correct.
If the initramfs is missing, grub will shout at you for trying to load it, so the kernel will not be started.

We don't have a self consistent data set to work from, hence we see several contradictions.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
zyzy078
n00b
n00b
Posts: 14
Joined: Mon Jan 30, 2023 11:51 pm

  • Quote

Post by zyzy078 » Wed Feb 08, 2023 11:14 am

Hi,
Apologies for the late response, been busy with school.

When I was trying to setup the kernel, I followed the Gentoo handbook on how to set it up by installing firmware, downloading the sources, selecting the kernel, running make menuconfig, configuring and building. Im pretty sure this is the standard way of doing it.

I created an initramfs with Dracut as shown in this guide. Not sure if this is the right way to do it or not but I just thought id follow the guide.
https://wiki.gentoo.org/wiki/Handbook:A ... _initramfs

I thought that I needed an initramfs for a working system? Was this the correct way to do it?
I also tried using Genkernel to build an initramfs before which showed a similar disk error.

Im using grub to boot.

Here is my kernel config.
https://pastebin.com/W7egtfTQ

Here is my grub config.
https://pastebin.com/fCdaZVvi

Haven't touched either of them since last post.

This is the first time ive heard of an initrd, is this something I need to set up? Or is initrd the initramfs? I'm new to all this.
Should I still try pietingers suggestion? I can recompile tomorrow.

Thank you for your assistance, I really appreciate it.
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Feb 08, 2023 12:08 pm

zyzy078 wrote:Apologies for the late response, been busy with school.
Dont worry. We are also not always online ;-)
zyzy078 wrote:When I was trying to setup the kernel, I followed the Gentoo handbook on how to set it up by installing firmware, downloading the sources, selecting the kernel, running make menuconfig, configuring and building. Im pretty sure this is the standard way of doing it.
Yes. As you can see in our AMD64 handbook Gentoo offers 3 ways for building your kernel:
1. You do all by yourself and build a kernel WITHOUT an initramfs.
2. You build a kernel with genkernel using an initramfs.
3. You copy a pre-built kernel (binkernel) to your system.
zyzy078 wrote:I created an initramfs with Dracut as shown in this guide. Not sure if this is the right way to do it or not but I just thought id follow the guide.
https://wiki.gentoo.org/wiki/Handbook:A ... _initramfs
Dracut creates an initramfs for you - compare it to genkernel (which is even more powerful) ... so the question is: Do you really need an initramfs ? 8)
zyzy078 wrote:I thought that I needed an initramfs for a working system? Was this the correct way to do it?
I also tried using Genkernel to build an initramfs before which showed a similar disk error.
You need an initramfs IF you dont want configure your kernel yourself (option 2) OR if you want some special operations a kernel is not able to do (e.g. mounting an encrypted root partition).

There exists more than 6 ways to build an initramfs:
- genkernel
- dracut
- and 4 manually buildings: https://wiki.gentoo.org/wiki/User:Pieti ... _initramfs
- some other I dont know
zyzy078 wrote:Im using grub to boot.
This is fine. You can switch to a stub kernel later if you want.
zyzy078 wrote:This is the first time ive heard of an initrd, is this something I need to set up? Or is initrd the initramfs? I'm new to all this.
initrd is similar to initramfs. It is older; initramfs is the "new" solution; initrd has an other format than initramfs AND - most important - the difference what happens after all work is done in it:

- After an initrd is finished it will return to kernel.
- After an initrmafs has finished its work, there will be no way back to kernel AND initramfs must a) mount root partition itself AND b) must start your init system itself
zyzy078 wrote:Should I still try pietingers suggestion? I can recompile tomorrow.
YES
Look: You had/have 2 problems: First one was the missing module for your intel controller (vmd). Here you see a main problem when using an initramfs -> If it is NOT build in your initramfs YOU must configure your kernel manually anyway ...
Second problem you still have: Kernel (or your initramfs if you are using it) MUST KNOW which is your root partition (to be able to mount it). Here we have a funny situation:

Kernel understand only: root=/dev/... OR root=PARTUUID=...
(most) initramfs understand only. root=/dev/... OR root=UUID=...

I recommend you not using an initramfs IF you dont have an encrpted root partition AND you are able to do your kernel configuration yourself ... because you dont need it ... go with option 1 ! 8)
zyzy078 wrote:Thank you for your assistance, I really appreciate it.
You are very welcome ! :D
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Feb 08, 2023 1:19 pm

P.S.: When you are doing your kernel configuration THEN please look again into my article ... especially nr. 3 ... because ... I have seen in your .config you dont have FRAMEBUFFER enabled ... this could become your third problem .... :lol:

https://wiki.gentoo.org/wiki/User:Pieti ... at_minimum

(nr. 3 will direct you to: https://wiki.gentoo.org/wiki/Framebuffe ... er_drivers )
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56108
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Feb 09, 2023 8:14 pm

zyzy078,

The PC Boot Process may help you understand what's happening as your PC boots.

If the autoblackmagic suits your use case, it just works.

The terms initrd and initramfs are used interchangeably.
Both do the same thing but differ in internal structure. They are both temporary root filesystem in a file.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
zyzy078
n00b
n00b
Posts: 14
Joined: Mon Jan 30, 2023 11:51 pm

  • Quote

Post by zyzy078 » Sat Feb 11, 2023 12:15 am

IT BOOTS!!

Thank you both so much for your help, its booting now that felt amazing!

Got a issues with audio and touchpad still but ill keep working on it, might make another post if I can't fix it.

I appreciate your assistance,
Have a good day/night!
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Feb 11, 2023 12:45 am

zyzy078 wrote:IT BOOTS!!

Thank you both so much for your help, its booting now that felt amazing!

Got a issues with audio and touchpad still but ill keep working on it, might make another post if I can't fix it.
Great ! :lol:

You are very welcome ! :D

As you have a very modern notebook I assume your touchpad uses i2c. This is tricky. I wrote a (german) guide for this:
viewtopic-p-8692426.html#8692426
(I hope you will see the kernel options; maybe translate with google?)
Best is always: Boot with a LiveCD where it works and do a "lsmod". So you will see all loaded modules. This can help a lot ... ;-)

For your sound problem ... more than tricky with new notebooks ... Neddy is the master for this ... just open a new post.

Have fun with Gentoo ! 8)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56108
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Feb 11, 2023 10:44 am

zyzy078,

dmesg from a random live media where your touchpad and sound both work. will be helpful.
So will the output of

Code: Select all

lspci -nnk
i2c devices are things you have to know.

Newish ... notebook ... you probably need the Sound Open Firmware (sof) driver set sot the well known tried and tested one.
If you do have sof hardware, it needs firmware too.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
zyzy078
n00b
n00b
Posts: 14
Joined: Mon Jan 30, 2023 11:51 pm

  • Quote

Post by zyzy078 » Fri Feb 17, 2023 9:18 am

Hi sorry for the late response,

I somehow managed to get it all working!

pietinger, the trackpad guide helped a lot thanks.

Thank you both for your assistance.
Top
Post Reply

18 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic