LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-06-2004, 02:17 AM   #1
mosquito_dk
LQ Newbie
 
Registered: Aug 2004
Distribution: gentoo
Posts: 11

Rep: Reputation: 0
Unhappy GRUB dual boot with two diff kernels fails at boot


Hi

I just compiled my first attempt to use the 2.6.8 kernel and want to add this kernel as a boot item. (my first compiled kernel ever)

i have done it all by the book, but when i try my new link in GRUB, it freeze with this message:

VFS: Cannot open root device "hda1" or unknown-block (0,0)
Please append a correct "root" boot option

my GRUB looks like thi

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## ## End Default Options ##

title Debian GNU/Linux, kernel 2.4.27-1-k7
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-1-k7 root=/dev/hda1 ro
initrd /boot/initrd.img-2.4.27-1-k7
savedefault
boot

title Debian GNU/Linux, kernel 2.4.27-1-k7 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-1-k7 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.4.27-1-k7
savedefault
boot


############ ADDED by mosquito ###########

title Debian GNU/Linux, kernel 2.6.8 (testing)
root (hd0,0)
kernel /boot/bzImage root=/dev/hda1 ro
savedefault
boot

#####################################

### END DEBIAN AUTOMAGIC KERNELS LIST



here is my /etc/fstab:

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 /home ext3 defaults 0 2
/dev/hda6 none swap sw 0 0
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0


Since the root is the same as the item above which is ok I cant figure out what is wrong. I have no scsi and therefore removed initrd. I tried to keep it with the

initrd /boot/initrd.img-2.4.27-1-k7

but received the same error message as mentioned.

Can anyone tell me how I can make it work???
 
Old 09-06-2004, 03:05 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
one option is to compile the filesystem into your new kernel; if you do not do this (compile it in the kernel), you _will_ need the initrd I think, or you are unable to boot...at least this is what fixed my kernel when I compiled it and got the same error - I just forgot to compile the filesystem (which was ext3 for me) into the kernel, so it couldn't boot properly as I didn't create the initrd file after kernel compilation.
 
Old 09-06-2004, 09:05 AM   #3
mosquito_dk
LQ Newbie
 
Registered: Aug 2004
Distribution: gentoo
Posts: 11

Original Poster
Rep: Reputation: 0
Unhappy

I included the filesystem in the kernel and compiled with no errors. Still following the steps:

make menuconfig
make bzImage
make modules
make modules_install

cp arch/i386/boot/bzimage /boot/vmlinuz-2.6.8

changed the boot to match the vmlinuz-2.6.8 in grub but still with the same problem. Freezing at boot...

what can I do to prevent this.

Is it nescessary to make a new initrd? and if it is... how do I do this?
 
Old 09-06-2004, 09:18 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
ok...then another thing could be to make sure that in the kernel options your machine architecture is correct (i386 should work for all, but choose AMD if you use such thing, pentium II for example if you use such thing etc. etc.)..I don't know if this really has anything to do with you but check

also, the best way to avoid problems is to copy a working .config file from the currently running kernel to the root direcory of the new kernel, and then do make menuconfig. this sets the options to the same as the running kernel has, so you don't have any surprising choises already made that don't suit you..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
grub fails on ubuntu 5.10 dual boot xp due to sda webhideout Ubuntu 2 10-08-2005 04:55 PM
dual boot system(solaris and linux) on diff HD ddaas Solaris / OpenSolaris 8 07-22-2005 04:20 AM
Grub - dual boot fails on sdb mhoma Linux - General 0 06-13-2005 11:08 AM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 01:44 PM
Dual Boot diff Hard Disk diff OS on Suse 9.1 wilhem Linux - Newbie 1 08-13-2004 06:06 PM

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

All times are GMT -5. The time now is 01:46 AM.

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