You are not logged in.
Pages: 1
I just compiled the kernel, everything seemed to work fine until I tried to boot from GRUB and got the message
[ 0.196911] Kernel panic - not syncing: VFS: unable to mount root fs on unknown -block(0,0)
[ 0.197391] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.15-msys #1
[ 0.197569] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox x 12/01/2006
[ 0.197902] Call Trace:
[ 0.198056] dump_stack+0x5c/0x85
[ 0.198246] panic+0xe4/0x252
[ 0.198398] mount_block_root+0x27f/0x2e0
[ 0.198558] ? set_debug_rodata+0x11/0x11
[ 0.198718] prepare_namespace+0x130/0x166
[ 0.198876] kernel_init_freeable+0x1e9/0x1fb
[ 0.199145] ? rest_init+0xd0/0xd0
[ 0.199296] kernel_init+0xa/0xf7
[ 0.199446] ret_from_fork+0x35/0x40
[ 0.199987] Kernel Offset: 0x1000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff
[ 0.200386] ---[end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I have check several other forums to try to find answers but have not come up with anything yet. I can post more information if needed. Also, I have run -Syu.
Thanks for the help.
Offline
How did you compile it? From asp or aur, or some other way? It looks like the kernel cannot recognize your filesystem. Are you sure you enabled the proper options?
Offline
I will give you the exact commands I used, my goal was to add a system call to the kernel.
I downloaded the kernel source code
$ curl -O -J https://www.kernel.org/pub/linux/kernel … .15.tar.xz
Then I configured the kernel
$ zcat /proc/config.gz > .config
$ make oldconfig
Then edited the .config file to set a new kernel name
CONFIG_LOGCALVERSION="-myname"
Added an entry to the system call table by editing the file arch/x86/entry/syscalls/syscall_64.tbl
333 common mysyscall sys_mysyscall
Then I added the system call function to the kernel/sys.c file
Then I ran a script with chmod u+x permissions from the main directory of the kernel source
SUFFIX="-mysyscall"
set -e
make
make modules_install
cp arch/x86-64/boot/bzImage /boot/vmlinuz/-linux$SUFFIX
sed s/Linux/linux$SUFFIX/g</etc/mkinitcpio.d/linux.preset >/etcmkinitcpio.d/linux$SUFFIX.preset
mkinitcpio -p linux$SUFFIX
grub-mkconfig -o /boot/grub/grub.cfg
Offline
cp arch/x86-64/boot/bzImage /boot/vmlinuz/-linux$SUFFIX
sed s/Linux/linux$SUFFIX/g</etc/mkinitcpio.d/linux.preset >/etcmkinitcpio.d/linux$SUFFIX.presetThose lines are *obviously* bogus in so many regards that I will assume you don't know what you're doing and simply follow some 3rd party instructions?
The "set -e" call shouts that this is actually copied from some script?
Can you boot the repo kernel(s)?
Please paste /boot/grub/grub.cfg and "ls -l /boot", "lsblk -f" and "df -h" outputs.
Please use "code" tags for this.
Offline
You are correct, I am a student doing a supplementary assignment from my textbook. Sorry, I am very new to this. Here are the outputs, however, I am not sure where /boot/grub/grub.cfg is located.
ls -l /boot https://ptpb.pw/7dOm
lsblk -f https://ptpb.pw/GGEg
df -h https://ptpb.pw/3Zaj
Offline
from my textbook
Printed or electronic (so you can copy & paste)?
I am not sure where /boot/grub/grub.cfg is located.
Is this some sort of joke i don't understand?
Offline
No its printed, like I said I'm doing this on the side so I can learn more about it, I'm not just copying and pasting code.
And no its not a joke. Sorry.
Offline
I am not sure where /boot/grub/grub.cfg is located.
Is this some sort of joke i don't understand?
That is like asking where C:\Windows is located. /boot/grub/grub.cfg IS a location.
You may need to learn a few more things about Linux before you tackle building a Kernel. (And that's not a condesending remark, just an observation. It's like trying to dive into Calculus before you learn how to add.)
Matt
"It is very difficult to educate the educated."
Offline
Please don't get this wrong, but you do not know that /boot/grub/grub.cfg constitutes an absolute path - it literally *is* the location of a file; yet you try to try to patch and compile a kernel by typing stuff from a book, happily distributing blanks and path seperators and ignoring case and probably also error messages.
This is not going to work.
You should first familiarize yourself with the basics of the system and the shell syntax by simply using it for basic tasks before attempting the above.
It won't help you to copy+paste stuff with your eyes an keyboard while you have no idea what you actually put in and the system puts out to you.
First crawl, then walk, run, jump, fly - skipping a step will only get you a bloody nose.
Offline
I understand both of your points. I will take some steps back and make sure I understand the system better before I attempt this again. I appreciate the time you both took to explain this to me without making me feel like a complete moron.
Offline
Pages: 1