LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Multi-boot Question (https://www.linuxquestions.org/questions/linux-general-1/multi-boot-question-551216/)

Red Barchetta 05-04-2007 05:46 AM

Multi-boot Question
 
I already have a Multi-boot system with FreeDOS, and a few flavors of Linux. However my wife (well, technically live-in girlfriend, but we have been together so long, it amounts to the same thing as far as everyone is concerned) likes to play the Pogo games (so do I occasionally, nut not as much as she dose), and there is a big issue with sound using Pogo games in Linux, that was driving her crazy (I wasn't too happy about it either).
Finally downloaded a copy of Solaris 10 OS just to see how that did with the Pogo games (put it on a whole different Hard Drive, and just swapped the a IDE cable so no other Hard Drives were even hooked up while trying Solaris).
Well, it Pogo worked perfectly under Solaris, and there are other thing I like a lot about that OS as well.
I still have PLENTY of free space on presidentially mounted Hard Drive (I use to run a FTP server that had LOTS of LARGE files on it, but don't anymore).
I know there is a problem installing Solaris on a Hard drive that already has Linux on it, but that's no problem, I still have 2 pretty big hard drives that are not being used for anything.
BUT - where I am unsure of what to do, is the boot loader. Currently I user GRUB in Mandriva Linux 2007.1 - but I want to set this up (if possible) so that all Operating System can be booted from one boot loader. I vaguely remember reading something about having to use GRUB from Solaris to do this, but am unsure is that is still true, or exactly what needs to be specified in the GRUB menu file..

phantom_cyph 05-04-2007 05:55 AM

Stick with separate HDDs and have Grub installed on master. If they are on the same drive, Solaris does NOT read Linux at all. That tends to create problems.

jlliagre 05-04-2007 07:21 AM

With some external utilities, Solaris can read some Linux filesystems but it is correct it doesn't by default.

I believe the problem you are mentioning is that after installation, Solaris Grub menu won't include the Linux partitions. This can easily be fixed by editing /boot/grub/menu.lst.

The grub 0.95 installed with Solaris 10 and newer is built on the the same basecode that the same version of Grub used with some Linux distributions.
It has enhancements to allow directly booting ufs (and recently ZFS) so you can boot whatever O/S grub supports with Solaris Grub (Solaris, *BSDs, Linuxes, Hurd), and chainload those like DOS, Windows and others that Grub doesn't support.

saikee 05-04-2007 08:58 AM

Although I have Solaris in a separate disk running together with Dos, Windows and Linux I need some time to dig up what I did with Grub.

As pointed out by Jlliagre the current Grub 0.95 used by Solaris is an "enhanced" version over the Grub 0.97 used in the latest Linux. The difference being for the Linux Grub it is not possible to add the subslice number. In order word Linux 0.97 accepts
Code:

root (hd0,0)
but Solaris Grub 0.95 can take
Code:

root (hd0,0,a)
Thus jlliagre's suggestion is why not use the Solaris version that is common to both Linux and Solaris. One just need to edit the /boot/grub/menu.lst inside Solaris.

I tend to agree with jlliagre but I believe Solaris can also be chainloaded just like a Dos or Windows but I can only confirm this later when I have time to dig up my notes.

If one uses Grub to chainloads another OS then Grub only needs to know the +1th sector location of the hard disk address after the setor "0" in that partition. In chainloading Grub can boot a foreign system, like a XP, even it it can't read the ntfs filing system, which a Linux kernel itself can. A boot loader at run time has no access to a kernel and so Grub supports only a limits number of filing systems including ufs used by Solaris

The statement
Code:

root (hd0,0,a)
is needed only if Grub is asked to boot Solaris directly, from my memory. Grub in such case has to read the filing system of the Solaris' ufs partition and pick out the kernel and the associated files inside for loading into the memory.

I don't know exactly why Solaris needs an enchanced version of Grub for booting but it appears to me that Solaris does not always installed exactly at the beginning of a partition and this could explain why it needs to specify the location of the stage-2 of its boot loader by stating it is at the "a" subslice. No matter how hard I try I seem to always ending up with a small unallocated space at the front of a Solaris installation.

Jlliagre has told me that Solaris, so are some the BSD systems too, keeps a hardware record of the hard disk order and so once installed it cannot be booted in a re-located position. Thus if one wants Solaris to run as the operating system additional to Linux already residing in a master disk then the Solaris disk should be installed as the slave.

I would recommended Solaris be installed in a disk separated from a Linux disk if the latter uses logical partitions. The Solaris subslices are treated as logical partitions in Linux and errors will be reported there is in existence other logical partitions.

jlliagre 05-04-2007 10:15 AM

Quote:

Originally Posted by saikee
As pointed out by Jlliagre the current Grub 0.95 used by Solaris is an "enhanced" version over the Grub 0.97 used in the latest Linux. The difference being for the Linux Grub it is not possible to add the subslice number. In order word Linux 0.97 accepts
Code:

root (hd0,0)
but Solaris Grub 0.95 can take
Code:

root (hd0,0,a)

This is not exactly the case. "Linux" Grub 0.97 also knows and in fact specify this ",a" syntax ( http://www.gnu.org/software/grub/man...ing-convention ) so it can boot *BSDs which use it.

What is part of Solaris enhancements to Grub and missing in the original one is the ability :
- to use this syntax with Solaris slices
- to read files on ufs
- to read files on zfs
Quote:

I tend to agree with jlliagre but I believe Solaris can also be chainloaded just like a Dos or Windows but I can only confirm this later when I have time to dig up my notes.
You are correct, you can chainload one grub to another grub, and reciprocally.
Quote:

The statement
Code:

root (hd0,0,a)
is needed only if Grub is asked to boot Solaris directly, from my memory. Grub in such case has to read the filing system of the Solaris' ufs partition and pick out the kernel and the associated files inside for loading into the memory.
Yes, actually there is no other way to boot Solaris on x86.
Quote:

I don't know exactly why Solaris needs an enchanced version of Grub for booting
Because Grub is Solaris on x86 only supported boot loader, and an O/S cannot be run without its boot loader being able to read its kernel.
Quote:

but it appears to me that Solaris does not always installed exactly at the beginning of a partition and this could explain why it needs to specify the location of the stage-2 of its boot loader by stating it is at the "a" subslice. No matter how hard I try I seem to always ending up with a small unallocated space at the front of a Solaris installation.
Not sure about what the issue here. Perhaps a cylinder alignment constraint.
Quote:

Jlliagre has told me that Solaris, so are some the BSD systems too, keeps a hardware record of the hard disk order and so once installed it cannot be booted in a re-located position.
Solaris is recording the controller and port where the disk is connected, this is actually an improvement. With Linux, you can have problems even while not moving a disk. Say you have a bootable linux on the master disk of the second controller, installing a slave disk on the first controller will break this Linux.
Quote:

Thus if one wants Solaris to run as the operating system additional to Linux already residing in a master disk then the Solaris disk should be installed as the slave.
Or in the master, should you have a free partition.
Quote:

I would recommended Solaris be installed in a disk separated from a Linux disk if the latter uses logical partitions. The Solaris subslices are treated as logical partitions in Linux and errors will be reported there is in existence other logical partitions.
What kind of errors have you seen in such a situation ? I have used that configuration flawlessly.

saikee 05-04-2007 03:05 PM

Proof of Grub 0.97 in Linux doesn't accept the 3rd parameter
Code:

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
  lists possible command completions.  Anywhere else TAB lists the possible
  completions of a device/filename. ]

grub> root (hd2,0)
root (hd2,0)
 Filesystem type unknown, partition type 0xbf
grub> root (hd2,0,a)
root (hd2,0,a)

Error 22: No such partition
grub>

I booted up the Solaris boot loader in (hd2,0) by a Linux 0.97 Grub manually using commands
Code:

root (hd2,0)
chainloader +1
boot

I then got the Solaris 0.95 Grub screen. From there I fired up Solaris.

jlliagre 05-04-2007 04:32 PM

I'm afraid you misunderstood what I was trying to explain.

Your test is in fact confirming grub 0.97 accepts the third parameter otherwise it would have complained about a syntax error. It actually simply doesn't understand Solaris form of slicing, thus the Error 22.

Should you have had a *BSD installation on your third partition, Linux Grub would have accepted the hd(2,0,a) as the Grub documentation I linked to describes.

saikee 05-04-2007 06:43 PM

jlliagre,

The Solaris Grub 0.94 boots My Solaris 10 by the following command
Code:

title ......
root (hd2,0,a)
kernel /platform/i86pc/multiboot
module /platform/i86pc/boot_archive

My point is I have installed Solaris Grub 0.94 into a floppy to boot Solaris manually up by the above commands which are obtainable from /boot/grub/menu.lst inside the Solaris partition.

The same Linux 0.97 Grub, be it in a hard disk partition or in a floppy, gets me nowhere.

I don't dispute what you read but the above is the evidence in field. If Grub cannot understand the partition it will not be able to find the /platform/i86pc/multiboot and /platform/i86pc/boot_archive to load into the memory to fire up Solaris.

I can also confirm that if a Solaris Grub 0.95 floppy is used then Grub's response to
Code:

root (hd2,0,a)
is
Code:

Filesystem type ufs, partition type 0xbf
This together with that reported in Post #6 is a clear indication that the Linux version of Grub 0.97 has not been designed to read ufs partitions.

jlliagre 05-04-2007 07:13 PM

I absolutely agree with your last posting statements.

You missed my point but nevermind, I was just picky on a detail.

About the fact a 0.95 version can do more than a 0.97 one, the problem is Sun's contributions haven't been consolidated in the 0.9x code source base and never will. This branch is frozen (legacy Grub) and won't evolve outside bug fixes.

The Grub developers now focus on version 2 so one can expect the Solaris boot feature will be integrated eventually.

jlliagre 05-04-2007 07:28 PM

Just to clarify as you edited you last posting, "Linux" Grub 0.9x doesn't supports Solaris ufs but it does support ufs2 and allows a syntax to reference *BSDs partitions -- hd(x,y,z) -- that was reused for the Solaris ufs support..

Red Barchetta 05-11-2007 12:07 AM

Finally, took so playing around (just seemed like nothing was working for me) and re-loading 3 of my OSes totally, but, I got my Multi-boot with Solaris. And as a bonus, it actually is peacefully co-existing on the same physical had drive as FreeDOS, AND Mandriva Linux believe it or not (but different primary partitions)!
Here is how I set that up:
First boot FreeDOS from a floppy, and use the DOS version of Partition Magic to create partitions for DOS and Linux (in my case two visible Primary DOS partition, the first one a FAT32, for the FreeDOS OS, the second a FAT16 for documents to be shared in all installed Operating systems)., Primary partition number 3 contains all the "extended" partitions for Mandriva Linux (but partitioned with Partition Magic, not it's own partition tool). Do nothing for Solaris, just leave free space for it. Format the created partitions with Partition Magic (FAT32, and FAT16 for the 2 DOS partitions, ext3 for all the Linux partitions except the Linux swap).
Now load FreeDOS first. Next Mandriva linux, when asked, use custom partitioning, but DO NOT change anything in the partitioning!-Only specify mount points, and do not format any partitions (that was already done). When it comes up, do not install the Linux boot loader to a actual drive!, instead place it in the Mandriva Linux /boot partition.
Once that is done (Linux won't be able to boot yet, but it's all there), Install Solaris using what is left of that Hard drive for the Solaris Partition (using it's own partitioning tool).
After Solaris is installed, Solaris will boot (still no Linux, but shortly). Login to Solaris as root (only account there at this point) Edit the file /boot/grub/menu.lst to include an entry to the /boot partition of Mandriva Linux (where in this cas all Linux flavors will be booted from) in a chainload. Example (from my Solaris menu.lst file):

title Linux Boot Menu
rootnoverify (hd0,4)
chainloader +1

Now reboot, and do whatever, Linux will now boot.

It's not exactly 100% the way I wanted it, but it dose work, and all the trouble I had, just leave it alone. If it ain't broke don't fix it!

jlliagre 05-11-2007 08:46 AM

You should be able to directly boot the Linux distro(s) by adding entries like that one in the Solaris menu.lst:
Code:

title Mandriva Free
root(hd0,4)
kernel /boot/vmlinuz-***mdksmp <options>
initrd /boot/initrd-***mdksmp.img


saikee 05-11-2007 10:15 AM

Just a comment or two here

(1) strictly speaking
Code:

rootnoverify (hd0,4)
should be replaced by
Code:

root (hd0,4)
because rootnoverify is to tell Grub no need to verify the root filing system. This is used on a ntfs partition that Grub does not support, can't read it and therefore no need to bother with verifying its content.

Grub supports Ext2/3 and so root is the proper command. However in chainloading Grub has no need to go inside the root partition to find files and so using rootnoverify does not cause a problem.

(2) Red Barchetta in Post #11 boots the Linux indirectly by chainloading. jlliagre's Post #12 suggests direct booting using the "kernel" and "initrd" statements. Both methods are equally satisfactory. The advantage of the indirect method is there is no need to bother with the kernel name and the ram disk file. As such the menu.lst can be written even before the Linux distro is installed.

The indirect method of chainloading is also the "only" method that can boot every PC system of Dos, Windows, Linux, BSD and Solaris. It is so simple, so universal but so powerful that every PC user should learn how to use it. The sole requirement for a PC system to become "chainloadable" is to have its boot loader installed in its root partition. Every MS system installation does this by default so Linux users could mistakenly believing chainloading is only for MS system.

I believe in chainloading and have used it on over 150 systems, each by the same 3 lines of commands as indicated by Post #11 changing only the partition reference. Where else can a PC user find something so simple that can be used in every PC system?


All times are GMT -5. The time now is 02:45 AM.