LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-09-2020, 02:12 AM   #1
Bishal Kumar Nath
LQ Newbie
 
Registered: Sep 2019
Posts: 2

Rep: Reputation: Disabled
Ubuntu got stuck on boot after kernel compilation


I tried to modify the slab.h ("/include/linux/slab.h") header file by adding a new function as follows-

static inline void newfoo(void)
{
printk("something");
}

The kernel compiled successfully. Everything was successful. But while booting into the new kernel image, it gets stuck on boot every time. (I have tried to add function in other files also, but the result is same).

(P.S- while compiling i gave a warning something like page size exceeds 1036). Kindly point my mistake... Thank you
 
Old 03-09-2020, 07:00 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by Bishal Kumar Nath View Post
I tried to modify the slab.h ("/include/linux/slab.h") header file by adding a new function as follows-
Code:
static inline void newfoo(void)
{
   printk("something");
}
The kernel compiled successfully. Everything was successful. But while booting into the new kernel image, it gets stuck on boot every time. (I have tried to add function in other files also, but the result is same).

(P.S- while compiling i gave a warning something like page size exceeds 1036). Kindly point my mistake... Thank you
Ok; your mistake was putting that in where you did, obviously. Since having that in there causes the kernel to not only give you compilation warnings/problems, but causes the kernel to not boot. Remove that code and recompile.
 
Old 03-09-2020, 07:28 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Bishal Kumar Nath View Post
(P.S- while compiling i gave a warning something like page size exceeds 1036). Kindly point my mistake... Thank you
When compiling kernels, pay more attention to error or warning messages. Errors and warnings are invaluable troubleshooting elements. Don't consider it a "PS", don't report "something like...", but report the precise, complete message with some context.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no support for locale: en_Us.itf8 Stuck found some post but still Stuck!! Suec7832 Linux - Newbie 1 08-30-2011 08:13 AM
fedora 12 on my dell laptop got stuck after installation anil_4m Linux - Laptop and Netbook 1 11-20-2009 05:26 AM
Drive stuck, how to I un-stuck it. MikeyCarter Linux - Software 3 08-05-2009 11:57 AM
I'm Stuck, so Stuck. basttrax Linux - General 3 11-14-2003 09:59 PM
i Got 1 Harddisk with Win XP & RH8 Dual Boot,will WinXP perform slower coz i got RH8? kublador Linux - General 4 08-27-2003 11:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration