LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-17-2006, 10:12 PM   #1
fbarsoba
Member
 
Registered: Dec 2005
Posts: 30

Rep: Reputation: 15
Configuring boot loader


Hi,

I have been able to compile the new kernel.. I still have a question.. The README says that I have to put the bzImage on the boot folder and then change the grub.conf file... i have doubts regarding how to inform grub.conf about the new kernel (i want to have both of them) My current grub.conf looks like this:

Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,2)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Windows XP
	rootnoverify (hd0,1)
	chainloader +1
title Fedora Core (2.6.15-1.2054_FC5)
	root (hd0,2)
	kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	initrd /initrd-2.6.15-1.2054_FC5.img
So, i guess i need a new entry. The kernel already in grub.conf makes reference to /vmlinuz and /initrd, which can be located in: (these are my current kernel files)
Code:
[root@localhost boot]# pwd
/boot
[root@localhost boot]# ls -l
total 4496
-rw-r--r-- 1 root root   56972 Mar 14 16:00 config-2.6.15-1.2054_FC5
drwxr-xr-x 2 root root    1024 Apr 17 22:57 grub
-rw-r--r-- 1 root root 1775671 Mar 27 23:06 initrd-2.6.15-1.2054_FC5.img
drwx------ 2 root root   12288 Mar 27 17:45 lost+found
-rw-r--r-- 1 root root 1050591 Mar 14 16:00 System.map-2.6.15-1.2054_FC5
-rw-r--r-- 1 root root 1677922 Mar 14 16:00 vmlinuz-2.6.15-1.2054_FC5
Still, the README says that i have to put the image bzImage in this folder... How do I reference it then? How is my grub.conf going to look like eventually?

Here's my new kernels' boot folder:

Code:
[root@localhost boot]# pwd
/usr/src/linux/arch/x86_64/boot
[root@localhost boot]# ls -l
total 3500
-rwxr-xr-x 1 root root     512 Apr 17 22:39 bootsect
-rw-r--r-- 1 root root    2040 Apr 17 22:39 bootsect.o
-rw-rw-rw- 1 root root    2156 Apr 17 17:53 bootsect.S
-rw-r--r-- 1 root root 1698016 Apr 17 22:39 bzImage
drwxrwxrwx 2 root root    4096 Apr 17 22:39 compressed
-rw-rw-rw- 1 root root      47 Apr 17 17:53 install.sh
-rw-rw-rw- 1 root root    3707 Apr 17 17:53 Makefile
-rw-rw-rw- 1 root root     330 Apr 17 17:53 mtools.conf.in
-rwxr-xr-x 1 root root    7226 Apr 17 22:39 setup
-rw-r--r-- 1 root root   18696 Apr 17 22:39 setup.o
-rw-rw-rw- 1 root root   22422 Apr 17 17:53 setup.S
drwxrwxrwx 2 root root    4096 Apr 17 22:39 tools
-rw-rw-rw- 1 root root   40381 Apr 17 17:53 video.S
-rwxr-xr-x 1 root root 1689824 Apr 17 22:39 vmlinux.bin
tnx,
Fernando
 
Old 04-18-2006, 05:41 AM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Warning: I haven't (yet) had to compile & install a new kernel, BUT I work w/ GRUB & its menu.lst (grub.conf)

From their sizes in the listing of your new kernels' boot folder, I would guess that bzImage is your new initrd & vmlinux.bin is your new vmlinuz. You should verify this.

You also need an appropriate designator for your new kernel, similar to the "2.6.15-1.2054_FC5" used by existing one. I am going to refer to this as <new_kernel>.

I think the following will do what you need:
Code:
NEW=<new_kernel>
NEW_BOOT=/usr/src/linux/arch/x86_64/boot
cp  $NEW_BOOT/bzImage      /boot/initrd-$NEW.img
cp  $NEW_BOOT/vmlinux.bin  /boot/vmlinuz-$NEW

cp /boot/grub/grub.conf /boot/grub/grub.conf.000
cat  << EoF  >> /boot/grub/grub.conf

title Fedora Core ($NEW)
        root (hd0,2)
        kernel /vmlinuz-$NEW ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-$NEW.img
EoF
 
  


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
wireless Keyboard not working to select boot options (Grub boot loader) psrini_vasan Fedora 7 12-16-2009 05:45 PM
Grub boot loader menu shows two linux boot options pramos Linux - Newbie 3 09-12-2004 11:40 PM
Configuring Freebsd's boot loader Inexactitude *BSD 0 11-29-2003 09:17 PM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM
configuring winxp boot loader to load linux vichet Linux - Newbie 4 01-28-2003 01:40 PM

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

All times are GMT -5. The time now is 08:17 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