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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-06-2004, 03:17 AM
|
#1
|
LQ Newbie
Registered: Aug 2004
Distribution: gentoo
Posts: 11
Rep:
|
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???
|
|
|
09-06-2004, 04:05 AM
|
#2
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep:
|
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.
|
|
|
09-06-2004, 10:05 AM
|
#3
|
LQ Newbie
Registered: Aug 2004
Distribution: gentoo
Posts: 11
Original Poster
Rep:
|
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?
|
|
|
09-06-2004, 10:18 AM
|
#4
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep:
|
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..
|
|
|
All times are GMT -5. The time now is 01:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|