# Kernel Panic - not syncing: VFS: Unable to mount root fs

## tobstone

So i changed my kernel to add realtek audio support, did 

```
make && make modules_install
```

and then 

```
make install
```

and i rebooted. on boot i was met with

```
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
```

i found an old forum post about recovering a kernel from livecd with this in it:

```
/mnt/gentoo, and copy it:

mount /dev/hda3 /mnt/gentoo

copy /proc/config /mnt/gentoo/usr/src/linux/.config

(chroot as in the documentation)

cd /usr/src/

rm linux

ln -s linux-2.6.0-whatever linux

cd linux

make clean all && modules_install

mount /boot

cp arch/i386/boot/bzImage /boot/kernel-2.6.0-whatever

umount /boot

shutdown -r now
```

i didnt copy the livecd .config.gz as i already had a .config.old in my /usr/src/linux so i just renamed that one to the .config, but i followed everything else up to the point of running mount /boot. when i run the command i am met with 

```
mount: /boot: special device /devnvme0n1p1 does not exist
```

blkid gives me no output and lsblk gives me 

```
lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory
```

here is my /etc/fstab:

```

/dev/nvme0n1p1      /boot      vfat      defaults,noatime   0 2

/dev/nvme0n1p2      none      swap      sw           0 0

/dev/nvme0n1p3      /      ext4      noatime           0 1

/dev/sda1      /sda      ext4      noatime         0 2

/dev/sdb1      /sdb      ext4      noatime         0 2

```

any help is appreciated thx guy

----------

## mike155

Do you know SystemRescue? You could copy the SystemRescue image to an USB stick, boot from the USB stick and select 'Boot installed system'. This is the simplest way to get back into your system.  :Smile: 

A wild guess: CONFIG_BLK_DEV_NVME is missing in your kernel config.

Please post your kernel config using wgetpaste.

----------

## tobstone

the contents of /dev, im not sure if this means anything but nvme is missing here entirely:

http://dpaste.com/7CMFN56N5

.config.old which is now the main one: 

http://dpaste.com/3KQ5MRMS5

original .config that broke it: 

http://dpaste.com/BYETZ6KEG

----------

## tobstone

multipath fc and tcp are the only nvme not set in both configs, everything else is y

----------

## mike155

There's only a small difference between the two kernel configs. It does not explain why your kernel doesn't boot.

Something else is wrong.

How did you build the kernel that works? Did you build and install it exactly in the same way as the kernel that doesn't work? Or is there a difference in the build and install process?

What about the kernel image? Did you copy both kernels (working and not working) to exactly the same file in /boot? Do you use the same boot entry in GRUB to boot both kernels? Or are there different entries in GRUB with different kernel command line parameters?

Are you sure that the kernel config you posted for the working kernel is really the config of the working kernel? Please verify with /proc/config.gz, which contains the config of the running kernel.

----------

## NeddySeagoon

tobstone,

Are you sure you are running the kernel you think you are?

What is the timestamp on the .config file?

It all starts there. This should be the oldest file in the chain.

What is the timestamp of the bzImage file in the kernel build location?

This must be newer that the .config file above or it was not genorated by that .confiig file.

Now look in /boot

There may be sever kernel there. One should have the same timestamp as the bzImage above.

That's the one you need to boot. Make a note of that kernel name.

Now look in /boot/grub/grub.cfg 

Is that the default kernel, or one of the others, or is it missing altogether?

----------

## tobstone

the one im using currently is nov 17 and the other one is nov 30

/boot is empty. im on the livecd right now so maybe its the /boot of the livecd but i chrooted already so it shouldn't be

i just followed the install handbook instructions for installing the kernel, doesnt it just take the one named .config?

the commands i did for installing the kernel after i made changes were 

```
make && make modules_install

make install
```

----------

## NeddySeagoon

tobstone,

Did you mount boot inside the chroot?

If not /boot should be empty. When you mount the boot partition, what does 

```
ls -l /boot
```

show?

```
make && make modules_install

make install
```

is OK if the kernel version did not change.

When the kernel version changes, grub.cfg must be updated too.

----------

## tobstone

whenever i mount /boot it gives me an error saying nvme0n1p1 (boot partition) does not exist. could my nvme drive have failed? ive only been using it for a few months

----------

## mike155

Unlikely.

Please post the output of the commands below:

```
fdisk -l
```

```
lsblk
```

```
blkid
```

----------

## tobstone

fdisk -l gives me 

```
fdisk: cannot open /proc/partitions: No such file or directory
```

the other 2 are in the op

----------

## mike155

It's difficult to help you if you don't tell us what you do.

How did you boot to get this result? 

Did you boot from your system with the working kernel? Or did you you boot from an installation medium? Did you switch to your system with chroot?

If you did the latter, you forgot to run the mount commands that must be run before running the chroot command. See: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Mounting_the_necessary_filesystems

----------

## NeddySeagoon

tobstone,

You must mount /proc, /sys and /dev inside the chroot before performing the chroot. 

```
fdisk: cannot open /proc/partitions: No such file or directory
```

suggests that /proc is not mounted.

----------

## tobstone

 *mike155 wrote:*   

> It's difficult to help you if you don't tell us what you do.
> 
> How did you boot to get this result? 
> 
> Did you boot from your system with the working kernel? Or did you you boot from an installation medium? Did you switch to your system with chroot?
> ...

 

i started on a system with a working kernel, the only thing i did of note on that system was i changed my users home directory and added realtek audio support in the kernel, reinstalled the kernel, rebooted, and was met with the kernel panic on boot. everything else is on the livecd trying to fix it. the chroot was back into my original filesystem which is on the partition /dev/nvme0n1p3.

 *NeddySeagoon wrote:*   

> You must mount /proc, /sys and /dev inside the chroot before performing the chroot. 

 

thank u this is what i was missing.

here is the ls -l of /boot:

```
total 28830

drwxr-xr-x 4 root root     512 Oct 28 15:07 EFI

-rwxr-xr-x 1 root root 5264394 Nov 29 21:34 System.map-5.10.61-gentoo

-rwxr-xr-x 1 root root 5264394 Nov 29 21:33 System.map-5.10.61-gentoo.old

-rwxr-xr-x 1 root root  126528 Nov 29 21:34 config-5.10.61-gentoo

-rwxr-xr-x 1 root root  126528 Nov 29 21:33 config-5.10.61-gentoo.old

drwxr-xr-x 6 root root     512 Oct 28 15:08 grub

-rwxr-xr-x 1 root root 9368288 Nov 29 21:34 vmlinuz-5.10.61-gentoo

-rwxr-xr-x 1 root root 9368288 Nov 29 21:33 vmlinuz-5.10.61-gentoo.old

```

it's definitely running the old one still, all i have to do to switch out kernels is make sure the config file i want to use ends with .config  and run 

```
make && make modules_install

make install
```

right?

----------

## tobstone

 *NeddySeagoon wrote:*   

> tobstone,
> 
> Are you sure you are running the kernel you think you are?
> 
> What is the timestamp on the .config file?
> ...

 

ok looking back at this, i have only .config files. there is no bzImage file in /usr/src/linux, which is where i built the kernel from.

here is a dpaste of my grub.cfg: http://dpaste.com/BB489GVYY

it contains a kernel that is in my /boot, not sure if it js the default

```
### BEGIN /etc/grub.d/10_linux ###

menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5b04550d-8109-4aef-85c0-d58efe2cd5d4' {

   load_video

   insmod gzio

   insmod part_gpt

   insmod fat

   search --no-floppy --fs-uuid --set=root 8267-3472

   echo   'Loading Linux 5.10.61-gentoo ...'

   linux   /vmlinuz-5.10.61-gentoo root=/dev/nvme0n1p3 ro  

}

```

----------

## NeddySeagoon

tobstone,

The kernels

```
-rwxr-xr-x 1 root root 9368288 Nov 29 21:34 vmlinuz-5.10.61-gentoo

-rwxr-xr-x 1 root root 9368288 Nov 29 21:33 vmlinuz-5.10.61-gentoo.old 
```

have identical sizes and are only timestamped one minute apart, so they are probably identical kernels.

In was made on 29-Nov-21

bzImage is at 

```
/usr/src/linux/arch/x86/boot/bzImage
```

I was expecting to see a lost+found directory in /boot as its its own partition. Are you sure that's boot with /boot mounted?

It looks like it might be /boot on the root partition with /boot not mounted, in which case all those files are correctly installed to the wrong place.

What does 

```
uname -a
```

say when you run the old kernel?

----------

## tobstone

/usr/src/linux/arch/x86/boot/bzImage is dec 2 12:07

/usr/src/linux/arch/x86_64/boot/bzImage is nov 30 16:40

not sure if it changes depending on cpu arch but i am running x86_64. /usr/src/linux/arch/x86_64/boot is empty except for the bzimage, this seems like it might be wrong considering i am on x86_64 but i am unsure.

current kernel uname -a output:

```
Linux livecd 5.10.61-gentoo-x86_64 #1 SMP Sun Oct 10 17:46:52 UTC 2021 x86_64 AMD Ryzen 5 1400 Quad-Core Processor AuthenticAMD GNU/Linux
```

old kernel uname -a output:

```
Linux livecd 5.10.61-gentoo-x86_64 #1 SMP Sun Oct 10 17:46:52 UTC 2021 AMD Ryzen 5 1400 Quad-Core Processor AuthenticAMD GNU/Linux
```

----------

## NeddySeagoon

tobstone,

```
#1 SMP Sun Oct 10 17:46:52 UTC 2021 
```

is the build number and build date of the running kernel.

usr/src/linux/arch/x86/boot/bzImage should have been installed in /boot but isn't  as its build time is 

```
dec 2 12:07 
```

The files in the boot that you showed are dated

```
Nov 29 21:34
```

which does not match either. 

The kernel you are using came from the liveCD either because you booted the boot media or you copied the liveCD kernel to your HDD.

Boot with the live media and mount your root filesystem at /mnt/gentoo. Don't mount anything else yet.

What does 

```
ls -al  /mnt/gento/boot
```

output? 

Post it.

Mount your boot at /mnt/gento/boot

What does 

```
ls -al  /mnt/gento/boot
```

output now? 

Post that too please.

```
/usr/src/linux/arch/x86/boot/bzImage
```

is the correct location fro the compressed kernel binary.

There is only one arch in the kernel for 32 bit or 64 bit Intel/AMD systems. Which one is built is a kernel option

----------

## tobstone

i just made a new kernel config, removed the old ones from /usr/src/linux entirely. it updated the vmlinuz file in /boot but the bzImage is still from Nov 30. 

just root mounted:

```
# ls -al /mnt/gentoo/boot

total 14428

drwxr-xr-x  2 root root    4096 Dec  3 13:42 .

drwxr-xr-x 22 root root    4096 Nov 30 01:54 ..

-rw-r--r--  1 root root       0 Oct 10 19:28 .keep

-rw-r--r--  1 root root 5264394 Dec  3 13:42 System.map-5.10.61-gentoo

-rw-r--r--  1 root root  126528 Dec  3 13:42 config-5.10.61-gentoo

-rw-r--r--  1 root root 9368288 Dec  3 13:42 vmlinuz-5.10.61-gentoo

```

just root and boot mounted:

```
# ls -al /mnt/gentoo/boot

total 28835

drwxr-xr-x  4 root root    1024 Jan  1  1970 .

drwxr-xr-x 22 root root    4096 Nov 30 01:54 ..

drwxr-xr-x  4 root root     512 Oct 28 20:07 EFI

-rwxr-xr-x  1 root root 5264394 Dec  3 20:48 System.map-5.10.61-gentoo

-rwxr-xr-x  1 root root 5264394 Dec  2 18:07 System.map-5.10.61-gentoo.old

-rwxr-xr-x  1 root root  126528 Dec  3 20:48 config-5.10.61-gentoo

-rwxr-xr-x  1 root root  126528 Dec  2 18:07 config-5.10.61-gentoo.old

drwxr-xr-x  6 root root     512 Oct 28 20:08 grub

-rwxr-xr-x  1 root root 9368288 Dec  3 20:48 vmlinuz-5.10.61-gentoo

-rwxr-xr-x  1 root root 9368288 Dec  2 18:07 vmlinuz-5.10.61-gentoo.old

```

----------

## tobstone

alright i found a file named .config by doing ls -la in /usr/src/linux (chrooted) which i moved to a temp directory in /usr/src where i have all the other kernel configs. did another compile and install of the new kernel.config that i just made and the bzImage still has not changed. machine will still not boot.

here is an ls -laL of /usr/src/linux incase ive missed something:

```
# ls -laL /usr/src/linux

total 241464

drwxr-xr-x  25 root root     4096 Dec  3 15:27 .

drwxr-xr-x   4 root root     4096 Dec  3 14:46 ..

-rw-r--r--   1 root root       80 Nov 30 16:40 .Module.symvers.cmd

-rw-r--r--   1 root root    16673 Dec 13  2020 .clang-format

-rw-r--r--   1 root root       59 Dec 13  2020 .cocciconfig

-rw-r--r--   1 root root       71 Dec 13  2020 .get_maintainer.ignore

-rw-r--r--   1 root root       62 Dec 13  2020 .gitattributes

-rw-r--r--   1 root root     1911 Oct 14 17:35 .gitignore

-rw-r--r--   1 root root    18204 Dec 13  2020 .mailmap

-rw-r--r--   1 root root      647 Dec  3 15:26 .missing-syscalls.d

-rw-r--r--   1 root root      134 Nov 30 16:40 .modules-only.symvers.cmd

-rw-r--r--   1 root root      479 Nov 30 16:40 .modules.order.cmd

-rw-r--r--   1 root root  5264394 Nov 30 16:40 .tmp_System.map

-rwxr-xr-x   1 root root 62310840 Nov 30 16:40 .tmp_vmlinux.kallsyms1

-rw-r--r--   1 root root  5576021 Nov 30 16:40 .tmp_vmlinux.kallsyms1.S

-rw-r--r--   1 root root   931168 Nov 30 16:40 .tmp_vmlinux.kallsyms1.o

-rwxr-xr-x   1 root root 62310864 Nov 30 16:40 .tmp_vmlinux.kallsyms2

-rw-r--r--   1 root root  5576021 Nov 30 16:40 .tmp_vmlinux.kallsyms2.S

-rw-r--r--   1 root root   931168 Nov 30 16:40 .tmp_vmlinux.kallsyms2.o

-rw-r--r--   1 root root        2 Nov 30 16:40 .version

-rw-r--r--   1 root root      166 Nov 30 16:40 .vmlinux.cmd

-rw-r--r--   1 root root      496 Dec 13  2020 COPYING

-rw-r--r--   1 root root   100478 Dec 13  2020 CREDITS

drwxr-xr-x  81 root root     4096 Oct 14 17:35 Documentation

-rw-r--r--   1 root root     1327 Dec 13  2020 Kbuild

-rw-r--r--   1 root root      580 Oct 14 17:35 Kconfig

drwxr-xr-x   6 root root     4096 Oct 14 17:35 LICENSES

-rw-r--r--   1 root root   576686 Oct 14 17:35 MAINTAINERS

-rw-r--r--   1 root root    65220 Oct 14 17:35 Makefile

-rw-r--r--   1 root root   630338 Nov 30 16:40 Module.symvers

-rw-r--r--   1 root root      727 Dec 13  2020 README

-rw-r--r--   1 root root  5264394 Nov 30 16:40 System.map

drwxr-xr-x  27 root root     4096 Nov 30 16:40 arch

drwxr-xr-x   3 root root     4096 Nov 30 16:25 block

drwxr-xr-x   2 root root     4096 Nov 30 16:21 certs

drwxr-xr-x   4 root root    12288 Nov 30 16:25 crypto

drwxr-xr-x   2 root root     4096 Oct 14 17:35 distro

drwxr-xr-x 140 root root     4096 Nov 30 16:33 drivers

drwxr-xr-x  79 root root    12288 Nov 30 16:24 fs

drwxr-xr-x  31 root root     4096 Oct 17 14:16 include

drwxr-xr-x   2 root root     4096 Nov 30 16:40 init

drwxr-xr-x   2 root root     4096 Nov 30 16:25 ipc

drwxr-xr-x  20 root root    12288 Nov 30 16:21 kernel

-rw-r--r--   1 root root   125567 Dec  3 14:42 kernel1.config

drwxr-xr-x  21 root root    16384 Nov 30 16:40 lib

drwxr-xr-x   3 root root    12288 Nov 30 16:22 mm

-rw-r--r--   1 root root      476 Nov 30 16:40 modules-only.symvers

-rw-r--r--   1 root root    10306 Nov 30 16:40 modules.builtin

-rw-r--r--   1 root root    95083 Nov 30 16:40 modules.builtin.modinfo

-rw-r--r--   1 root root      369 Nov 30 16:40 modules.order

drwxr-xr-x  72 root root     4096 Nov 30 16:39 net

drwxr-xr-x  32 root root     4096 Oct 14 17:35 samples

drwxr-xr-x  17 root root     4096 Nov 30 16:40 scripts

drwxr-xr-x  13 root root     4096 Nov 30 16:25 security

drwxr-xr-x  26 root root     4096 Nov 30 16:34 sound

drwxr-xr-x  36 root root     4096 Oct 14 17:36 tools

drwxr-xr-x   3 root root     4096 Nov 30 16:18 usr

drwxr-xr-x   4 root root     4096 Nov 30 16:39 virt

-rwxr-xr-x   1 root root 62310864 Nov 30 16:40 vmlinux

-rw-r--r--   1 root root 55949264 Nov 30 16:40 vmlinux.o

-rw-r--r--   1 root root   629862 Nov 30 16:40 vmlinux.symvers
```

----------

## tobstone

i just moved the bzImage to that backup dir in /usr/src to force it to create a new one when i run make. it did that but it is giving me the same kernel panic error when i boot without the livecd. is there a way for me to specify which .config to use when i run make other than just ending the filename with .config? the new one i made today is named kernel1.config, is there an issue with the filename of that one?

----------

## NeddySeagoon

tobstone,

Now we are getting somewhere.

You have two different places on your system called boot. It may confuse you you the boot loader will get it right.

There is the /boot directory on the root filesystem. It should be empty as its contents will not be used by the boat loader.

There is the boot partition, usually mounted on the  /boot directory on the root filesystem, when the kernel wants to use it.

The files 

```
drwxr-xr-x  2 root root    4096 Dec  3 13:42 .

drwxr-xr-x 22 root root    4096 Nov 30 01:54 ..

-rw-r--r--  1 root root       0 Oct 10 19:28 .keep 
```

are correct. The . and .. files are a part of the filesystem. .keep was provided by Gentoo so that the otherwise empty /boot directory was saved by tar when the stage3 was made.

The files,

```
-rw-r--r--  1 root root 5264394 Dec  3 13:42 System.map-5.10.61-gentoo

-rw-r--r--  1 root root  126528 Dec  3 13:42 config-5.10.61-gentoo

-rw-r--r--  1 root root 9368288 Dec  3 13:42 vmlinuz-5.10.61-gentoo 
```

should not be preset in /mnt/gentoo/boot when /boot is not mounted.

They are there now, as boot was not mounted when your performed the kernel install.

It looks like you spotted it and fixed it.

Your boot partition mounted at /mnt/gentoo/boot looks correct.  The missing lost+found still bothers me. Ah ... it's vfat, so the permissions are faked.

The grub.conf fragment you posted looks correct. Its going to load /vmlinuz-5.10.61-gentoo. Here  / means from the top level of the boot partition as when grub runs, the kernel filesystem tree is not assembled.

Lets prove that that grub.cfg is actually being used and you are not EFI stub booting an old kernel.

You will have several 

```
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5b04550d-8109-4aef-85c0-d58efe2cd5d4' {
```

in grub.cfg. The text inside the single quotes is for you to read. Here  *Quote:*   

> 'Gentoo GNU/Linux'

 

For every menuentry line in grub.cfg, change the text in quotes. You could make the first one read   'Gentoo 01 GNU/Linux', the next, insert 02 and so on.

Save that changes.

Reboot. Has the grub menu display changed?

As you scroll up and down the menu options, your changes should be visible.

If not, that grub.cfg is not being used.

If the changes are there, the kernel in the boot partition was built on Nov 30 but it should not have livecd in its name.

That's another part of the puzzle.

----------

## tobstone

alright the grub.cfg changes worked. i emptied out /mnt/gentoo/boot (into /mnt/gentoo/usr/src/backup/boot) before mounting it, then i mounted it, did another make and make install, same kernel panic.

----------

## NeddySeagoon

tobstone,

Let me reread the topic in the morning.

I've missed something. Its all doing the right things but it doesn't work.

That doesn't happen.

----------

## NeddySeagoon

tobstone,

I've gone back to the beginning. I'll recap my understanding. Correct me please.

Your original post says 

```
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
```

The 

```
unknown-block(0,0)
```

part tells that the kernel cannot find the device where the root filesystem is.

 *tobstone wrote:*   

> i didnt copy the livecd .config.gz

 Good. The liveCD .config requires an initrd to be able to boot and you don't have one.

A missing but required initrd causes the error you report.

Your /dev looks very wrong. All those hda entries point to it not being the kernels DEVTMPFS but the static /dev shipped in the stage3.

That's normally invisible as DEVTMPFS is mounted over the top of it.

Your kernel .config files (both of them) have all the bits to support DEVTMPFS, so I suspect that this is a red herring. You mourted your root at /mnt/gentoo and looked in  /mnt/gentoo/dev without bind mounting the liveCD /dev there first. That way you see the static /dev that is normally hidden.

Please check that. If /dev as provided by DEVTMPFS is really like your post, that's a problem. 

How did you change the .config file?

With menuconfig or a text editor?

Your root is at 

```
/dev/nvme0n1p3      /      ext4      noatime           0 1
```

Your kernel has

```
CONFIG_EFI_PARTITION=y

CONFIG_NVME_CORE=y

CONFIG_BLK_DEV_NVME=y

CONFIG_EXT4_FS=y
```

so it can see and read the block device then the filesystem.

```
CONFIG_DEVTMPFS=y

CONFIG_DEVTMPFS_MOUNT=y

CONFIG_TMPFS=y
```

provides the automatically populated /dev

```
CONFIG_PROC_FS=y

CONFIG_SYSFS=y

CONFIG_UNIX98_PTYS=y
```

ar all essential too.

You have 

```
CONFIG_SECURITY_SELINUX=y

CONFIG_SECURITY_SELINUX_DISABLE=y
```

so the kernel won't stop anything, it will just shout at you.

Running make to rebuild the kernel actually does nothing is all of the make output files are already there.

make traverses the kernel source tree and verifies that all the output files are newer than the input files but nothing is built.

When all is well, this saves a lot of build time. It fails if time ever steps backwards because input files may be changed and incorrectly appear older than the output file.

Make then skips processing that file.

Check and fix your system time if its needed. Then do a kernel rebuild but start with 

```
make clean
```

This removes all the output files, so time steps don't matter. Everything will be rebuilt.

Do it as separate commands.

```
make clean

make -j8
```

Remember to mount boot

```
make modules_install

make install
```

Your kernel has 

```
CONFIG_NR_CPUS=8
```

so make -j8 says to use them all to build the kernel.

Reboot to test.

----------

## tobstone

im using make menuconfig for kernel configs. 

here is /dev after dev is mounted:

```

# ls /mnt/gentoo/dev

block

bsg

btrfs-control

bus

char

console

cpu_dma_latency

disk

fb0

fd

full

fuse

gpiochip0

gpiochip1

gpmctl

hidraw0

hidraw1

hidraw2

hidraw3

hwrng

input

kmem

kmsg

kvm

log

loop-control

loop0

loop1

loop2

loop3

loop4

loop5

loop6

loop7

mapper

mem

mqueue

net

null

nvme0

nvme0n1

nvme0n1p1

nvme0n1p2

nvme0n1p3

nvram

port

ppp

psaux

ptmx

pts

ram0

ram1

ram10

ram11

ram12

ram13

ram14

ram15

ram2

ram3

ram4

ram5

ram6

ram7

ram8

ram9

random

rfkill

rtc

rtc0

sda

sda1

sdb

sdb1

sdc

sdc1

sdc4

shm

snd

stderr

stdin

stdout

tty

tty0

tty1

tty10

tty11

tty12

tty13

tty14

tty15

tty16

tty17

tty18

tty19

tty2

tty20

tty21

tty22

tty23

tty24

tty25

tty26

tty27

tty28

tty29

tty3

tty30

tty31

tty32

tty33

tty34

tty35

tty36

tty37

tty38

tty39

tty4

tty40

tty41

tty42

tty43

tty44

tty45

tty46

tty47

tty48

tty49

tty5

tty50

tty51

tty52

tty53

tty54

tty55

tty56

tty57

tty58

tty59

tty6

tty60

tty61

tty62

tty63

tty7

tty8

tty9

ttyS0

ttyS1

ttyS2

ttyS3

urandom

vcs

vcs1

vcs10

vcs11

vcs12

vcs2

vcs3

vcs4

vcs5

vcs6

vcs7

vcs8

vcs9

vcsa

vcsa1

vcsa10

vcsa11

vcsa12

vcsa2

vcsa3

vcsa4

vcsa5

vcsa6

vcsa7

vcsa8

vcsa9

vcsu

vcsu1

vcsu10

vcsu11

vcsu12

vcsu2

vcsu3

vcsu4

vcsu5

vcsu6

vcsu7

vcsu8

vcsu9

vga_arbiter

vhci

vhost-net

zero

```

i ran 

```

make clean 

make -j8 

make modules_install 

make install

```

and i am getting the same kernel panic. i get a handful of errors on shutdown of the livecd, is there a way for me to put them in a log somewhere? its something about mount -ro.

here is a dpaste of my new kernel.config: https://dpaste.com/8FBDPUP8A

----------

## tobstone

i took a video of the screen. the errors on shutdown of the livecd are:

```
In use but fuser finds nothing

/lib/rc is not writeable!

Unable to save dependency cache

In use but fuser finds nothing

ERROR: mount-ro failed to start
```

the first 

```
In use but fuser finds nothing
```

occurs after /mnt/cdrom is unmounted, as the final unmount. i do not have a dvd/cd drive, im using a liveusb.

the second one occurs after /mnt/cdrom is remounted read-only.

----------

## NeddySeagoon

tobstone,

The errors on shutdown of the liveCD can be ignored. /mnt/cdrom is a mount point that belongs it the minimal ISO, its always that, whatever media it its actually being run from.

```
make clean

make -j8

make modules_install

make install 
```

where in there did you mount boot, or was it mounted to /mnt/gentoo/boot before the chroot?

Please post your 

```
lspci -nnk
```

from the boot media.

Likewise the output of 

```
lsusb
```

I have in mind to drop your .config into the  5.10.61-gentoo source  tree and look it over and maybe build you a kernel to try, or at least, if I spot something wrong, pass the config back.

----------

## tobstone

mounting /boot was before chrooting

lspci -nnk:

```

# lspci -nnk

00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Root Complex [1022:1450]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Root Complex [1022:1450]

00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) I/O Memory Management Unit [1022:1451]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) I/O Memory Management Unit [1022:1451]

00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]

00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453]

   Kernel driver in use: pcieport

00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453]

   Kernel driver in use: pcieport

00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]

   DeviceName:  Onboard IGD

00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]

00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453]

   Kernel driver in use: pcieport

00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]

00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]

00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B [1022:1454]

   Kernel driver in use: pcieport

00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]

00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B [1022:1454]

   Kernel driver in use: pcieport

00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 59)

   Subsystem: Micro-Star International Co., Ltd. [MSI] FCH SMBus Controller [1462:7a39]

   Kernel driver in use: piix4_smbus

   Kernel modules: i2c_piix4

00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)

   Subsystem: Micro-Star International Co., Ltd. [MSI] FCH LPC Bridge [1462:7a39]

00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 [1022:1460]

00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 [1022:1461]

00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 [1022:1462]

00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3 [1022:1463]

00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4 [1022:1464]

00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 [1022:1465]

00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 [1022:1466]

00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 [1022:1467]

01:00.0 Non-Volatile memory controller [0108]: Sandisk Corp WD Blue SN550 NVMe SSD [15b7:5009] (rev 01)

   Subsystem: Sandisk Corp WD Blue SN550 NVMe SSD [15b7:5009]

   Kernel driver in use: nvme

   Kernel modules: nvme

03:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset USB 3.1 xHCI Controller [1022:43bb] (rev 02)

   Subsystem: ASMedia Technology Inc. 300 Series Chipset USB 3.1 xHCI Controller [1b21:1142]

   Kernel driver in use: xhci_hcd

   Kernel modules: xhci_pci

03:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset SATA Controller [1022:43b7] (rev 02)

   Subsystem: ASMedia Technology Inc. 300 Series Chipset SATA Controller [1b21:1062]

   Kernel driver in use: ahci

   Kernel modules: ahci

03:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b2] (rev 02)

   Kernel driver in use: pcieport

04:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port [1022:43b4] (rev 02)

   Kernel driver in use: pcieport

04:05.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port [1022:43b4] (rev 02)

   Kernel driver in use: pcieport

04:06.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port [1022:43b4] (rev 02)

   Kernel driver in use: pcieport

04:07.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port [1022:43b4] (rev 02)

   Kernel driver in use: pcieport

1e:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)

   Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1462:7a39]

   Kernel driver in use: r8169

   Kernel modules: r8169

22:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] [10de:1c02] (rev a1)

   Subsystem: Gigabyte Technology Co., Ltd GP106 [GeForce GTX 1060 3GB] [1458:373a]

22:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f1] (rev a1)

   Subsystem: Gigabyte Technology Co., Ltd GP106 High Definition Audio Controller [1458:373a]

   Kernel driver in use: snd_hda_intel

   Kernel modules: snd_hda_intel

23:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function [1022:145a]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function [1022:145a]

23:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor [1022:1456]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor [1022:1456]

23:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller [1022:145c]

   Subsystem: Micro-Star International Co., Ltd. [MSI] Family 17h (Models 00h-0fh) USB 3.0 Host Controller [1462:7a39]

   Kernel driver in use: xhci_hcd

   Kernel modules: xhci_pci

24:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function [1022:1455]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function [1022:1455]

24:00.2 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)

   Subsystem: Micro-Star International Co., Ltd. [MSI] FCH SATA Controller [AHCI mode] [1462:7a39]

   Kernel driver in use: ahci

   Kernel modules: ahci

24:00.3 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller [1022:1457]

   Subsystem: Micro-Star International Co., Ltd. [MSI] Family 17h (Models 00h-0fh) HD Audio Controller [1462:fa39]

   Kernel driver in use: snd_hda_intel

   Kernel modules: snd_hda_intel

```

lsusb

```
# lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 002: ID 1af3:0001 Kingsis Technology Corporation ZOWIE Gaming mouse

Bus 001 Device 003: ID 8564:1000 Transcend Information, Inc. JetFlash

Bus 001 Device 005: ID 04d8:eed2 Microchip Technology, Inc. CTRL Keyboard

Bus 001 Device 004: ID 04d8:eec5 Microchip Technology, Inc. Massdrop Hub

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

```

thank u again i really appreciate your help. even if this doesnt get figured out and i have to do a fresh install i am learning quite a bit

----------

## NeddySeagoon

tobstone,

I have a very similar motherboard. In fact, my .config will be a good starting point, so being lazy, its at http://dpaste.com/5KB7CUCGE

A few things to note. That .config is for gentoo-sources-5.15.0, not your 5.10.61.

Save your config.

```
wget http://dpaste.com/5KB7CUCGE 
```

into your source tree

```
cp 5KB7CUCGE .config
```

```
make clean

make oldconfig
```

The oldconfig step will silently drop options your kernel does not have and ask you about anything in your kernel not in my .config.

The defaults will probably be OK. That's the option in uppercase.

Then continue with your normal kernel build process.

I expect it to get past mounting root but if the console goes blank or freezes soon after, I won't be surprised.

It has amdgpu built in and you have an nVidia GPU.

```
CONFIG_VGA_CONSOLE=y
```

so you may be lucky.

----------

## tobstone

same error. didnt get past mounting root

----------

## tobstone

i tried it twice. once with the filename of the original config left the same, and one with jt as .config.bak. im a bit confused as to how make determines which .config file to use, could you clear that up for me?

----------

## tobstone

nevermind, i believe the second try was messed up due to the .config generated by the first one screwinf with the oldconfig. i got to login but my usb drivers arent in this kernel so i cant get any further. progress!  *Quote:*   

> im a bit confused as to how make determines which .config file to use, could you clear that up for me?

 

i know for sure its the filenames now, but what does it do when there are multiple filenames that end in [/list].config?

----------

## NeddySeagoon

tobstone,

The default is to use the file named .config

Its normally hidden as its name starts with a dot. FIles named <something>.config are ignored.

Ahh ...  my kernel is for a static /dev. I forgot that.

There is no DEVTMPFS support so when root mounts the /dev is in a mess almost empty. That means anything that needs /dev (almost everything) will fail.

There is probably no EVDEV support either.

You will need both.

Anyway, it mounted root, so we have confirmed the problem is your kernel.

You have three choices as get you going now.

Keep going with your own kernel .config.

Start with my config with the above changes

Use genkernel to get you going.

Once your system boots, you can have several kernels installed and pick from the grub menu, this means you can use another kernel while you make one that you like.

The advantage is that you don't use live media and chroot to pick up the pieces. Its a menu item.

If you go the alternate kernel route, use different kernel versions, so that the modules are separated in /lib/modules.

----------

