View previous topic :: View next topic |
Author |
Message |
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Tue Nov 30, 2021 11:11 pm Post subject: Kernel Panic - not syncing: VFS: Unable to mount root fs |
|
|
So i changed my kernel to add realtek audio support, did
Code: | make && make modules_install |
and then
and i rebooted. on boot i was met with
Code: | 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:
Code: | /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 Code: | mount: /boot: special device /devnvme0n1p1 does not exist |
blkid gives me no output and lsblk gives me Code: | lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory |
here is my /etc/fstab:
Code: |
/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 |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Wed Dec 01, 2021 12:07 am Post subject: |
|
|
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.
A wild guess: CONFIG_BLK_DEV_NVME is missing in your kernel config.
Please post your kernel config using wgetpaste. |
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Wed Dec 01, 2021 12:29 am Post subject: |
|
|
multipath fc and tcp are the only nvme not set in both configs, everything else is y |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Wed Dec 01, 2021 2:47 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Wed Dec 01, 2021 5:51 pm Post subject: |
|
|
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? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Thu Dec 02, 2021 1:40 am Post subject: |
|
|
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
Code: | make && make modules_install
make install |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Dec 02, 2021 8:30 am Post subject: |
|
|
tobstone,
Did you mount boot inside the chroot?
If not /boot should be empty. When you mount the boot partition, what does show?
Code: | 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. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Thu Dec 02, 2021 3:08 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Thu Dec 02, 2021 3:59 pm Post subject: |
|
|
Unlikely.
Please post the output of the commands below:
|
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Thu Dec 02, 2021 4:32 pm Post subject: |
|
|
fdisk -l gives me
Code: | fdisk: cannot open /proc/partitions: No such file or directory |
the other 2 are in the op |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Thu Dec 02, 2021 4:44 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Dec 02, 2021 5:17 pm Post subject: |
|
|
tobstone,
You must mount /proc, /sys and /dev inside the chroot before performing the chroot.
Code: | fdisk: cannot open /proc/partitions: No such file or directory | suggests that /proc is not mounted. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Thu Dec 02, 2021 6:02 pm Post subject: |
|
|
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:
Code: | 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
Code: | make && make modules_install
make install |
right? |
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Thu Dec 02, 2021 6:28 pm Post subject: |
|
|
NeddySeagoon wrote: | 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? |
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
Code: | ### 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
}
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Dec 02, 2021 6:43 pm Post subject: |
|
|
tobstone,
The kernels
Code: | -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 Code: | /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 say when you run the old kernel? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Fri Dec 03, 2021 1:46 pm Post subject: |
|
|
/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:
Code: | 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:
Code: | 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 |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Fri Dec 03, 2021 4:57 pm Post subject: |
|
|
tobstone,
Code: | #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
The files in the boot that you showed are datedwhich 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 Code: | ls -al /mnt/gento/boot | output?
Post it.
Mount your boot at /mnt/gento/boot
What does Code: | ls -al /mnt/gento/boot | output now?
Post that too please.
Code: | /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 _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Fri Dec 03, 2021 9:14 pm Post subject: |
|
|
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:
Code: | # 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:
Code: | # 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
|
|
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Fri Dec 03, 2021 9:36 pm Post subject: |
|
|
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:
Code: | # 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 |
|
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Fri Dec 03, 2021 9:52 pm Post subject: |
|
|
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? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Fri Dec 03, 2021 9:54 pm Post subject: |
|
|
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 Code: | 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,
Code: | -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 Code: | 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. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tobstone n00b
Joined: 05 Nov 2021 Posts: 22
|
Posted: Fri Dec 03, 2021 11:15 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sat Dec 04, 2021 12:42 am Post subject: |
|
|
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. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sat Dec 04, 2021 12:23 pm Post subject: |
|
|
tobstone,
I've gone back to the beginning. I'll recap my understanding. Correct me please.
Your original post says Code: | Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) |
The 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 Code: | /dev/nvme0n1p3 / ext4 noatime 0 1 |
Your kernel has
Code: | 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.
Code: | CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_TMPFS=y | provides the automatically populated /dev
Code: | CONFIG_PROC_FS=y
CONFIG_SYSFS=y
CONFIG_UNIX98_PTYS=y | ar all essential too.
You have Code: | 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 This removes all the output files, so time steps don't matter. Everything will be rebuilt.
Do it as separate commands.
Code: | make clean
make -j8 |
Remember to mount boot
Code: | make modules_install
make install |
Your kernel has so make -j8 says to use them all to build the kernel.
Reboot to test. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|