LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   GRUB dual boot with two diff kernels fails at boot (http://www.linuxquestions.org/questions/linux-software-2/grub-dual-boot-with-two-diff-kernels-fails-at-boot-227196/)

mosquito_dk 09-06-2004 02:17 AM

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???

b0uncer 09-06-2004 03:05 AM

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.

mosquito_dk 09-06-2004 09:05 AM

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?

b0uncer 09-06-2004 09:18 AM

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 12:23 AM.