LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware OpenSolaris GRUB problem (https://www.linuxquestions.org/questions/slackware-14/slackware-opensolaris-grub-problem-675185/)

tamtam 10-08-2008 05:56 PM

Slackware OpenSolaris GRUB problem
 
I have installed opensolaris on a PC that triple boots with Windows XP and Slackware.

I have had real problems getting both XP and Slackware to boot from opensolaris. I have to use the opensolaris GRUB for this to work.

Currently my GRUB looks like this...
Code:

#---------------------END BOOTADM--------------------

title Windows
    rootnoverify (hd1,0)
    map        (hd0) (hd1)
    map        (hd1) (hd0)
    chainloader +1

title Slackware
    root (hd1,1)
    kernel /boot/vmlinuz-huge-2.6.24.5

I can now boot into Windows but not Slackware...
Message goes like this...
Quote:

Booting 'Slackware'

root (hd1,1)
Filesystem type is ext2fs, partition type 0x83
Error 2: Bad file or directory type

Press any key to continue...
Has this anything to do with Slackware kernel being an image...

Or can the knowledgeable people point out where I am going wrong...

Reason I am posting here is because I think this maybe more Slackware related than opensolaris...see this post for a quick run down of the steps taken...
http://www.linuxquestions.org/questi...d-lilo-674398/

Thanks in advance...

keefaz 10-08-2008 06:59 PM

The boot line does not seem to be complete
Code:

title Slackware
    root (hd1,1)
    kernel /boot/vmlinuz-huge-2.6.24.5 ro root=/dev/hdb1

Assuming root partition is /dev/hdb1 (eg first partition on second IDE device)

tamtam 10-09-2008 01:47 PM

Quote:

Originally Posted by keefaz (Post 3304671)
The boot line does not seem to be complete
Code:

title Slackware
    root (hd1,1)
    kernel /boot/vmlinuz-huge-2.6.24.5 ro root=/dev/hdb1

Assuming root partition is /dev/hdb1 (eg first partition on second IDE device)

Nope still doesn't work...
Code:

title Slackware
    root (hd1,1)
    kernel /boot/vmlinuz-huge-2.6.24.5 root=/dev/hda2 ro

Getting annoyed now...this is beyond a joke.

Snooping around google I found these two posts...about
Quote:

Error 2:Bad file or directory

This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO.
From here
http://www.uruk.org/orig-grub/errors.html#stage2

And even more worrying is....
http://www.thelinuxlink.net/myblog/?p=87

Anyone using another distros GRUB successfully where the GRUB is in the MBR of one hard drive and Slack and LILO is on the MBR on another hard drive on the same machine...

mostlyharmless 10-09-2008 01:53 PM

I would recommend getting in the grub prompt and using the "find" command to see where grub thinks the files are. I.e. start "grub" at the command line or while booting go to the interactive mode and type "find vmlinuz-huge-2.6.24.5" and variations such as "find /boot/vmlinuz-huge-2.6.24.5"

keefaz 10-09-2008 01:58 PM

If your root partition is /dev/hda2, your root line is wrong, it should be:
Code:

title Slackware
    root (hd0,1)
    kernel /boot/vmlinuz-huge-2.6.24.5 root=/dev/hda2 ro


tamtam 10-09-2008 03:55 PM

Quote:

Originally Posted by keefaz (Post 3305454)
If your root partition is /dev/hda2, your root line is wrong, it should be:
Code:

title Slackware
    root (hd0,1)
    kernel /boot/vmlinuz-huge-2.6.24.5 root=/dev/hda2 ro


Nope the root line is correct, because of the way opensolaris installs, it places GRUB to the MBR of the disk it is installed on. My hda (first disk) has windows and slackware on it with slacks lilo installed on the MBR of that disk. The second disk (hdb) has opensolaris on it and GRUB installed to the second disks MBR.
Opensolaris is based around the Solaris OS. It uses the Solaris the ZFS filesystem. Most other OSes won't recognize it, including Slackware. It also has it's unique GRUB. As far as I am lead to believe you have to use the opensolaris grub to load other OSes because other linux grubs cant load solaris, and lilo definately cannot.
To boot into opensolaris installed on the second disk I had to change the order of boot for the disks in the bios. In other words hda(hd0) becomes hdb(hd1) and vice versa. Therefore Slackware is now on hd1 on second partition (hd1,1). But in Slackware itself it is still in /dev/hda2.
I did not want to keep going into the bios to change the boot order of my disks every time I wanted to change OSes.

Solved the problem now. Thanks to jlliagre pointing me in the right direction initially. I read this webpage on chainloading.
http://users.bigpond.net.au/hermanzo...ainloader_boot
I managed to chainload the slackware lilo by referencing the MBR of the first disk as follows...

Code:

title        Slackware Disk MBR
root        (hd1)
chainloader    +1

Note no second parameter like (hd1,1).
Selecting Slackware Disk MBR now gives me the normal Slackware lilo splash screen where I can login to both Windows and Slackware. Nice.

After doing this I now realize I do not need the windows entry in GRUB.

Thanks to all on both the opensolaris subforum and here who helped out.


All times are GMT -5. The time now is 08:54 AM.