By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,883 Members | 2,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,883 IT Pros & Developers. It's quick & easy.

Kernel Compilation

P: 1,059
I have followed the steps below according to a book:

Edited init/main.c as below:
Expand|Select|Wrap|Line Numbers
  1. asmlinkage void __init start_kernel(void)
  2. {
  3.  ..............
  4.  ..............
  5.  //this line is added right after variable declaration 
  6.  printk("Penguins are Cute, But so are polar bears\n");
  7.  ............
  8.  ............
  9. }
Expand|Select|Wrap|Line Numbers
  1. bash>cd /usr/src/linux-x.y.z/
  2. bash>make clean
  3. #bash>make menuconfig//i have skipped this part
  4. //instead i have done this
  5. bash>cp .config.old .config
  6. bash>make bzImage
  7. bash>cp arch/x86/boot/bzImage /boot/vmlinuz
Then I have edited the /boot/grub/menu.lst file. as below:

Expand|Select|Wrap|Line Numbers
  1. title openSUSE 11.0 -
  2. root(hd0,1)
  3. kernel /boot/vmlinuz root=/dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VB72b5415f-0465leee-part2 resume=/devsda1 splash=silent showopts
  4. initrd /boo/initrd-
After that I have rebooted the OS. According to book suggestion I was suppose to see my added line in the beginning of the boot sequence

But all I have found is, I cant connect to internet anymore from that. What am I missing?

I am using this on VirtualBox.

Best Regards,
Sep 7 '10 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 983

Have you tried the very simplest build - which is to change nothing at all?

That way you will at least know if your build process is working correctly, and that you've made no perturbations in the kernel that disable your networking (or other system behaviour).

You're a smart guy, and just like me, you tend to consider the basic baby steps as avoidable. Apparently this is one of those instances when it's not.

Also - just a thought - are you building the same kernel version as you were running with? If there's a version mismatch, some of the higher level driver code may not work correctly.

Sep 7 '10 #2

P: 1,059
I am using the same version of kernel that I have found on SUSE disk(linux-

I am trying to do the simplest compilation, so that my os can run with minimum feature(video card, sound card, Network support, USB Support). But During
bash>make bzImage it ask about lots of driver installation. In some case I dont even understand what to do...

So, if I can get a suggestion on simplest compilation, it will be great for me to understand what needed to be done.
Sep 7 '10 #3

Expert 100+
P: 983

Take the other tack. Compile everyting in, and see if your system works properly that way.

Then you can start eliminating bits until you have a minimal kernel, assuming that's what you truly need (or want).

Sep 7 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.