LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   GRUB booting problem (https://www.linuxquestions.org/questions/slackware-14/grub-booting-problem-590637/)

edM 10-09-2007 05:13 PM

GRUB booting problem
 
Yes I know there are loads of Q&As on GRUB...........

ok so i want to use GRUB for a change (on a fresh install).

Install Grub pkg.

grub-install (hd0,0) //which is sda WinXP. sdb is slack.

ok thats all fine, it find the 2 hds and a floppy.

reboot Slack. Grub shell pops up. check if i can boot WinXP, yup works fine.

reboot win, and check if slack boots.

Code:

root (hd 1,1)
kernel /boot/vmlinuz root=/dev/sdb2 ro vga=791
boot

which fine it boots Slackware until;

VFS:Cannot open root device @sdb@ or unkown block (0,0)
Please append a correct @root=@ boot option
Kernel Panic - not syncing: VFS:Unable to mount root fs on unknown-block (0,0)

ok i reboot and boot again to make sure i havent done anything stupid. same thing.

so my next guess is check the config, probably sdb is pointing to (0,0) than (1,1)...hm

but their is no /boot/grub/gub.conf, or under /etc/ or anywhere! bah. their is only a generic menu.lst.sample, not a properly created menu.lst

thanks for any help, ideas.

samwise17 10-09-2007 09:59 PM

If the kernel is panicking it's not grub's fault, unless you've given the kernel the wrong arguments. Have you made an initrd? It looks like the kernel gets lost as it doesn't have the disk driver or filesystem module and can't read the disk.

masonm 10-09-2007 10:05 PM

Yep, probably no initrd line in the menu.lst instructions. Try rerunning the grub setup.

duryodhan 10-09-2007 11:18 PM

Why are you installing to sda ? Install to sdb where slack is present

arubin 10-10-2007 04:43 AM

> Why are you installing to sda ? Install to sdb where slack is present

I think installing to sda is the right thing to do. I suspect that editing /boot/grub/menu.1st is the thing to do. Presumambly it need an initrd line.

edM 10-10-2007 05:29 AM

OK thanks for the advice.



Quote:

Originally Posted by arubin (Post 2919416)
> Why are you installing to sda ? Install to sdb where slack is present

I think installing to sda is the right thing to do. I suspect that editing /boot/grub/menu.1st is the thing to do. Presumambly it need an initrd line.


From what I read, I thought you had to install it the MBR? which would be sda1, which is WinXP?

gnashley 10-11-2007 07:15 AM

Did you give up?
For the record, the MBR is the first 512 bytes of a whole hard drive (sda in your case), not part of any partition. Grub calls the whole hard drive (hd0). So if you want to install grub to the MBR then it is right to setup (hd0).
If WinXP is installed on the first partition, then grub will see that as (hd0,0). If slackware is installed on the second partition of the second drive then it is (hd1,1).
But, something tells me that you have only one hard drive -is that correct?
Do have one or two hard drives -physical disks I mean? sdb means a second whole hard drive.

grub-install (hd0,0) installs grub to the first *partition* of the first drive. This is what's called the 'superblock' of the partition -the first 512 bytes of the *partition* -not the same as the MBR.

What commands did you use to start WinXP? Or did you run them from a menu.lst file which you have configured? Please post the exact commands you used or the contents of your menu.lst If you have a menu.lst file, did you create it manually?
Have you tried using the grubconfig utility that comes with the slackware grub package?

Greenfuse 10-11-2007 08:43 AM

This worked for me

Quote:

root (hd 1,1)
kernel /boot/vmlinuz root=/dev/sdb2 ro noinitrd vga=791
boot
The 'noinitrd' option will make it boot properly. Slack 12 with the default kernel does not need initrd but you must tell grub.

arubin 10-11-2007 03:03 PM

Quote:

Slack 12 with the default kernel does not need initrd but you must tell grub.
I do not think that is the case.

I use a kernel which does not need initrd. This is my entry for grub

Quote:

title SlackwareLinux-12.0-smp-070708
root (hd1,0)
kernel /boot/vmlinuz-smp-070708 root=/dev/sdb1 ro
savedefault
boot

duryodhan 10-11-2007 11:06 PM

if you have sda and sdb, then you have 2 HDDs. Why mess with the WinXP loader?
Install grub to sdb. In BIOS you can easily select to boot to whichever HDD you want. Each HDD has a MBR.

Slack 12 by default asks to use the generic kernel, which requires a initrd. The huge kernel doesn't . I would always recommend to run your own kernel, without an initrd.

Greenfuse 10-13-2007 02:33 AM

Quote:

Slack 12 by default asks to use the generic kernel, which requires a initrd. The huge kernel doesn't
Ok thanks for the correction. I do not remember specifying a kernel during install and my /boot/vmlinuz points to the huge kernel so I just made the assumption.

Quote:

if you have sda and sdb, then you have 2 HDDs. Why mess with the WinXP loader?
Install grub to sdb. In BIOS you can easily select to boot to whichever HDD you want. Each HDD has a MBR.
Interesting option. As a matter of personal preference I like to choose which system to boot from grub, rather than from the BIOS. Once grub is set up, all I need to do is press the down arrow and hit enter. This is quicker for because I use both OS's fairly often.

H_TeXMeX_H 10-13-2007 02:52 AM

Quote:

Originally Posted by duryodhan (Post 2921517)
Slack 12 by default asks to use the generic kernel, which requires a initrd.

Hmmm ... I thought the default kernel for Slack 12.0 was huge-smp, wasn't it ? And it doesn't require any initrd.

edM 10-13-2007 06:33 AM

Fixed.

Last night I reinstall lilo, and the kernel was still panicking. hmmm not the bootloader then.

I was being an idiot. wasnt loading the sata driver, must of turned it off when i was reconfiguring my kernel last week.

But thanks for all the replys. have to go down all the wrong routes first!

duryodhan 10-13-2007 10:41 AM

Quote:

Hmmm ... I thought the default kernel for Slack 12.0 was huge-smp, wasn't it ? And it doesn't require any initrd.
The readme file in Slack clearly states, you shouldn't use HUGE SMPS for anything at all, ever. Only to find out what is the stuff you need etc. etc. Using huge smps anytime for actual use is just wrong.

I didn't install slack12, I upgraded so I don't know what exactly happens on an install, I used my own kernel throughout :).

H_TeXMeX_H 10-13-2007 11:37 AM

Well, I'm pretty sure the default is huge-smp. I mean, it's not a bad option for an install kernel, because it has many things built-in. After that, however, it is recommended that if you have a bit of patience, that you compile your own kernel. I recommend using the generic '.config' file, and going from there. It saves time for me, doing it this way.


All times are GMT -5. The time now is 07:48 PM.