1

I am compiling kernel 4.19 on Ubuntu 14.04 because I have a assignment to add a system call, but when I try to boot this kernel there's a error:

Kernel panic - not syncing: System is deadlocked on memory

Nothing happens after this message appears

boot sequence stop at deadlock error

  1. I have compiled my kernel several times and installed the modules. No errors were shown in the old terminal.
  2. I used GParted to enlarge my /dev/sda1 and I have set up a swap area, all done.
  3. The stock Ubuntu 14.04 kernel boots fine. I can log in and use smoothly.
  4. Commands I used:

    sudo cp /boot/config-**** .config
    sudo make menuconfig               # I did not change anything here
    sudo make -j4
    sudo make modules_install
    sudo make install
    reboot
    
  5. For the syscall, I just add a very simple helloworld in the sys.c:

    asmlinkage int sys_mysyscall(int arg){printk("hello %d\n",arg);return 0;}
    

    and I have added it in the syscalls.h and syscall_64.tbl.

  • 2
    Do you mean you patched the kernel, but the patch isn't provided in the question? . by the way. you should check (make help) about make bindeb-pkg it's easier to handle installed kernels then. – A.B Jan 5 at 16:23
  • The helloworld syscall will only show when I reboot successfully and write another function and call it,but now ,I cannot reboot cause of some sort of deadlocked...what I addded in sys.c:asmlinkage int sys_mysyscall(int arg){printk("hello %d\n",arg);return 0;} – wjrforcyber Jan 6 at 1:33
0

I have solved the problem by changing my memory to 4 G;

I download Ubuntu 18.04,kernel 4.20.1(stable),I didn't change anything and run it again,the same error still showed up so I tried to enlarge my memory again, it works.

I didn't realized it cause I have changed it from 1 G to 2 G before ,but it didn't worked, now everything is correct.

use:

wjrforcyber@wjr:~$ uname -a

it shows:

Linux wjr 4.20.1 #1 SMP Fri Jan 11 20:57:27 CST 2019 x86_64 x86_64 x86_64 GNU/Linux

success!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.