This is where I'm at now:
As you can see by this screenshot of Computer Management:
http://home.kc.rr.com/plumb/comman.gif
I'm running on WinXP installed on C, Disk 1. That works fine right now.
My goal is to have WinXP and Ubuntu as a dual boot.
There are 3 physical hard disks and one CD ROM. The CD ROM 0 is
apparently just what Daemon tools makes, and there's nothing really
there. CD ROM 1 is the real DVD/CD read-write drive.
Disk 0, Lime (G:) 149.05 GB NTFS
Disk 1 First Concord (C:) 14.30 GB NTFS
Disk 2
BOOTMAGIC 47 MB FAT32
First Concord (F:) 19.49 GB NTFS
(Unknown Partition) 19.55 GB EXT3
DATAFAT32 (J:) 35.44 GB FAT32
CD ROM 0
CD ROM 1
I used PartitionMagic to make the 4 partitions on Disk 2. I thought
placing a FAT32 partition at the beginning was what was needed for
BootMagic, so that's what I made.
Using Ghost 2003, I cloned Disk 1 (C) to the second partition (F), but
other than that, there's nothing on the disk yet.
The unknown partition is formatted using EXT3. I plan to make the
machine a dual-boot and install Ubuntu there.
After I have Windows working on Disk 2, I plan to physically remove
Disk 1.
I plan to use Disk 0 for data. It's already almost full, but I could
rearrange things.
So what's my next step? Do I install BootMagic on the first partition
of Disk 2? Do I then physically remove Disk 1 and try to reboot? Is my
plan of disk usage reasonable?
--
(||) Nehmo (||)
I would (in fact I have) install Ubuntu and let it install GRUB for boot
management. It will also set up the dual boot for you.
>>From what I've read, it seems easier to use BootMagic than the
> bootloader that comes with Windows. But I might be wrong. I don't know
> this subject.
Wrong.
The Linux installer will do a better job of creating partitions
and installing a boot loader.
Keep Boot Magic and Partition Magic out of the picture.
At least that's been my experience.
PS, I have no desire to post to a microsoft group so I removed it.
Can't see what it was doing there in the first place.
> On Tue, 21 Feb 2006 16:17:53 -0800, Nehmo wrote:
>
>
<snip>
> I would (in fact I have) install Ubuntu and let it install GRUB for boot
> management. It will also set up the dual boot for you.
>
Yes, grub is the most flexible boot loader. I second this advice. Here is
the multi-boot "mini-howto":
http://www.tldp.org/HOWTO/Multiboot-with-GRUB.html
Another advantage to not using Partition Magic is that you can
keep Windows on partition 1 (of whatever disc you are using.)
Grub's manual is here:
http://www.gnu.org/software/grub/manual/html_node/index.html
Any time you spend learning about the loader will pay off later-
especially if you ever need to debug startup problems.
--
Douglas Mayne
>>>From what I've read, it seems easier to use BootMagic than the
>> bootloader that comes with Windows. But I might be wrong. I don't know
>> this subject.
[....]
>> So what's my next step? Do I install BootMagic on the first partition
>> of Disk 2? Do I then physically remove Disk 1 and try to reboot? Is my
>> plan of disk usage reasonable?
> I would (in fact I have) install Ubuntu and let it install GRUB for boot
> management. It will also set up the dual boot for you.
Grub is fine for booting XP also. I habe been doing this without
issues for several years now. BootMagic is just some inferiour
commercial product for those that cannot read documentation.
Arno
In the MBR and traditionally in /boot.
> Do I
> configure the BIOS to find the first boot device somewhere?
Yes. You have to tell it what to boot off first. Typically that
is floppy->cdrom->first HDD, so it is fine. The BIOS does
not care about partitions, it just loads and starts the boot code
from the MBR.
> Do I have to rearrange the partitions on Disk 2?
Not at all.
> I think I need to study some more.
1. Make /boot/grub/menu.lst
Example:
default 0
timeout 60
# 0 (kernel on hd0/partition0, / on /dev/md1)
title Linux 2.6.15.4 /dev/md1
kernel (hd0,0)/2_6_15_4 root=/dev/md1
# 1 (XP on hd0/partition1)
title Trash-OS /dev/hda1
root (hd0,1)
makeactive
chainloader +1
The only thing you need to look up here is how Grub enumerates disks.
2. Call grub-install /dev/hda
That should do it. After installation of XP, you will likely have
to boot grub from floppy or CD (make one), since XP impolitely
installs its own boot-manager ond overwrites Grub without asking
(which IMO is software sabotage and criminal). Re-run grub-install
and you are fine again.
Arno
> since XP impolitely
>installs its own boot-manager ond overwrites Grub without asking
>(which IMO is software sabotage and criminal).
Bullshit! ;) MSFT defined (thus should own) the MBR, linux came
later and can easily play along.
You may also let Windoze own MBR and linux boot (I use lilo) gets
control from MBR via active partition flag, no nasty unexpected
overwrites, one simply needs to change active flag -- a task that
can be done from whichever OS is in control.
I been doing like that since last century without problems :o)
Grant.
--
... The computer scientist, who had listened to all of this said,
"Yes, but where do you think the chaos came from?"
Arno Wagner -
> In the MBR and traditionally in /boot.
Nehmo -
I know MBR is Master Boot Record. Apparently it's on C with Windows.
And since I cloned C to F (see http://home.kc.rr.com/plumb/comman.gif),
there's one there too. But I think I can't boot off that one because
it's on the second partition of the disk 2 and the BIOS looks for the
MBR on the first partition of the disk. Am I right?
But I made 50 MB FAT32 partition at the beginning of that disk. I
thought I was going to install BootMagic there. So I should install
Grub there instead? How do I go about doing that? When I run the Ubuntu
install program that's on the ISO, will it ask me where I want to
install Grub?
What I downloaded was
ubuntu-5.10-install-i386.iso
So what exactly do I do, do I mount that via Windows using Daemon
Tools, and then run an installation program that's on that iso?
Nehmo -
> > Do I
> > configure the BIOS to find the first boot device somewhere?
Arno Wagner -
> Yes. You have to tell it what to boot off first. Typically that
> is floppy->cdrom->first HDD, so it is fine. The BIOS does
> not care about partitions, it just loads and starts the boot code
> from the MBR.
Nehmo -
I Currently have the BIOS set for first boot device to be the little
hard disk that Windows in on, C. Do I keep it that way?
Nehmo -
> > Do I have to rearrange the partitions on Disk 2?
Arno Wagner -
> Not at all.
Nehmo -
> > I think I need to study some more.
Arno Wagner -
> 1. Make /boot/grub/menu.lst
> Example:
> default 0
> timeout 60
>
> # 0 (kernel on hd0/partition0, / on /dev/md1)
> title Linux 2.6.15.4 /dev/md1
> kernel (hd0,0)/2_6_15_4 root=/dev/md1
>
> # 1 (XP on hd0/partition1)
> title Trash-OS /dev/hda1
> root (hd0,1)
> makeactive
> chainloader +1
Nehmo -
I'm sure after I get going, what you just wrote will seem simple to me,
but at this point, I don't understand what it is. Are you saying I
should make a text file containing what you wrote and title it menu.lst
and put it in /boot/grub/?
When am I supposed to do this? After Ubuntu is successfully installed?
I can't see how I can do it now; I'm running Windows on NTFS.
So I shouldn't have bothered with PartitionMagic at all. Actually, even
though I cloned XP to partition F, I can't boot to it. Maybe I should
Copy my Ubuntu iso to a CD
Physically remove Disk 1, currently C
Fresh install XP on what is now Disk 2
(I only have an upgrade WinXP installation CD, so I need qualifying
media, which could be the clone image I have on F)
Delete (maybe this should come first) or Don't make the little
partition I made for BootMagic.
Use the Ubuntu CD to install Ubuntu and Grub as on the video.
> Alright I'll abandon the BootMagic plan. But now I'm at a loss for my
> next step.
Step 1, remove microsoft.public.windowsxp.setup_deployment
from the groups you are posting to. You think a microsoft
group is going to help you with a Linux install?
Step 2, stick the Linux install CD into the CD drive and
boot from it.
Let it install the boot loader in the MBR.
Come back if you see something you don't understand.
Not Microsoft. Digital Research.
--
John Hasler
jo...@dhh.gt.org
Dancing Horse Hill
Elmwood, WI USA
Advice:
1. You have a copy of Ghost. Clone XP to partition 1 on the disc where you
intend for it to be used. Remove old disc with XP.
2. Don't worry if XP boots at this point. Install Ubuntu with the Grub
loader at the MBR.
2.a. If Ubuntu notices your new XP partition, allow it to add it to the
grub's menu.
2.b. When Ubuntu intall finishes, if XP wasn't added to the menu, you can
use the manual command line mode of grub at boot to start XP (use "c" for
command mode):
rootnoverify (hd0,0)
makeactive
chainloader +1
If your disc is not the primary master, then using grub's map command may
be required.
You may need to reactivate XP upon reboot due to the change in hardware.
Dual boot is well documented. Study up on it a little.
--
Ripley: And you let him in.
http://us.imdb.com/title/tt0078748/quotes
> Arno Wagner -
>> In the MBR and traditionally in /boot.
> Nehmo -
> I know MBR is Master Boot Record. Apparently it's on C with Windows.
No. That is the "partition boot sector". The MASTER boot record is
allways in the first sector of the disk. To givve you some images:
XP boot native:
XP-MBR (sector 1 hdd 1) ---> XP-Bootsecotor (sector 1 partition c:)
---> XP loader (on C: as a file)
Grub boot for XP:
Grub-MBR (sector 1 hdd 1, reads menu.lst from where it was when
grub was installed, can be any BIOS visible ext2 or FAT partition)
Displays meny, awaits user selection or timeout ---> XP-Bootsector
(sector 1 partition c:) ---> XP loader (file on c:)
Grub boot for Linux:
Grub-MBR (sector 1 hdd 1, reads menu.lst from where it was when
grub was installed, can be any BIOS visible ext2 or FAT partition)
Displays meny, awaits user selection or timeout ---> load kernel
into memory (file in some partition grub can rad in ext2 or fat
format) ---> Kernel initialises hardware and mounts / (given
as commandline to kernel by Grub).
Only the loading of the MBR is doine by the BIOS, After that
the code in the MBR (the "boot manager") takes control. Usually
this code needs support from the BIOS to locate the diska and the
partitions on them though.
> And since I cloned C to F (see http://home.kc.rr.com/plumb/comman.gif),
> there's one there too. But I think I can't boot off that one because
> it's on the second partition of the disk 2 and the BIOS looks for the
> MBR on the first partition of the disk. Am I right?
No, see above. The MBR is all the BIOS cares about.
> But I made 50 MB FAT32 partition at the beginning of that disk. I
> thought I was going to install BootMagic there. So I should install
> Grub there instead? How do I go about doing that? When I run the Ubuntu
> install program that's on the ISO, will it ask me where I want to
> install Grub?
You want Grub in the MBR of the first HDD. To get it there
use "grub-install /dev/hda" (for an IDE disk). Grub uses
support files, like the kernels, the menue file and more
of its own code, but that can reside on any partition the
BIOS can access.
> What I downloaded was
> ubuntu-5.10-install-i386.iso
> So what exactly do I do, do I mount that via Windows using Daemon
> Tools, and then run an installation program that's on that iso?
No. 1. install XP, 2. Install Ubuntu (the ISO should be bootable, boot
from it and follow the instructions), select Grub to boot Ubuntu and
then boot Ubunto and add the entry to boot windows with Grub as
well. In fact Grub will just boot the boot sector of the windows
partition, that boot sector takes if from there (that is why it is
called "cain-loading"). It may be that Ubunto uffers you to boot XP
with Grub as well. In that case just use that, no need to do
you rown menue file.
First install Ubuntu with Grub. It will put something like the
file above into /boot/grub/menu.lst What you need to add (unless
the Ubuntu installer does it for you) is the entry to boot XP,
which is this part of the example:
# 1 (XP on hd0/partition1)
title Trash-OS /dev/hda1
root (hd0,1)
makeactive
chainloader +1
The first line is a comment. The second line is the line
Grub will show in its menu. The third line specifies the
partition XP is on (the c: partition). The 4th line tells
Grub to set the partition active before booting it. XP
is stupid and needs that. The last line tells Grub to
loas the first sector of the partition specified in the
"root" line and execute the boot code in it (i.e., hand
over control to it).
> When am I supposed to do this? After Ubuntu is successfully installed?
Yes. Unless the Ubuntu installer offers you to add boot entries for
exixting OS installations.
> I can't see how I can do it now; I'm running Windows on NTFS.
You could, if Grub were already installed. But it would require
a FAT32 partition, since nothing except XP can read/write NTFS
reliably. That is why I use FAT32 for my XP installation.
Arno
Install Ubuntu. This might make XP unbootable (but Ubuntu bootable).
See my other post on how to add XP to what Grub can boot again.
Arno
Sounds about correct. Did not know they had a video. Ubuntu is
supposed to really invest in making the distro user-friendly, so
I am not surprised. I never used Ubuntu (I use Debian testing),
but Ubunto is supposed to be a pretty good distro for beginners
and intermediate users.
Arno
Since you need to boot from a physical CD, and the BIOS does not care
about virtual CDROMS, it does not matter at all.
Arno
No. The Boot Sector that is on the Primary partition that is
marked "active" gets control. The BIOS loads the MBR that
is on the HD at the head of the BIOS's HD boot order. The
MBR code looks for the "active" partition and loads the code
from the Boot Sector of that "active" partition. In MS land,
the Boot Sector code hands off control to ntldr in that partition,
and ntldr does the boot loading of the OS.
Depending on which cloning utility you use, you can have
the option of copying the MBR and the option of whether to
mark the clone's partition "active". Casper XP does both
automatically. Copying a clone to a partition on the same HD
can be problematice unless you never start up the clone but
just use it as a backup storage area. The reason is that the
1st startup of the clone must be done with the "parent" OS's
partition not visible to the clone, and that's hard to do if the
clone and the "parent" are on the same HD.
*TimDaniels*
Nehmo - Okay, in the situation on Disk 2 of my existing setup, if I
"make active" the F partition via Windows Disk Management, then
physically remove Disk 1, then using the BIOS setup utility, put Disk 2
first in the boot order, then should the WinXP on partition F boot?
I certainly could try it.
I think that's my first step. I should get the F WinXP (a clone of C
made using Ghost 2003) to boot. Then maybe I can just follow the
general instructions to add Ubuntu as an additional OS.
> No. The Boot Sector that is on the Primary partition that is
> marked "active" gets control. The BIOS loads the MBR that
> is on the HD at the head of the BIOS's HD boot order. The
> MBR code looks for the "active" partition and loads the code
> from the Boot Sector of that "active" partition. In MS land,
> the Boot Sector code hands off control to ntldr in that partition,
> and ntldr does the boot loading of the OS.
Caution! The MBR that "looks for the "active" partition" is already
an MS MBR. Others may do something else as, e.g., the Grub MBR does.
Arno
Probably. Still interesting that it exists.
Arno
If you remove Disk 1, Disk 2 automatically moves up a notch
in the HD boot order, so you don't have to fiddle with the BIOS.
But as Arno Wagner warns, differences intrude at some point
between Microsoft boot procedures/formats and those of Linux.
I don't know where those differences are and how to handle
them. For those reasons, I'd rather put Linux and Microsoft's
OSes on different hard drives and not have to diddle with
3rd party boot managers or making grub deal with Microsoft.
But... your preferences may differ.
*TimDaniels*
>
> Nehmo - Okay, in the situation on Disk 2 of my existing setup, if I
> "make active" the F partition via Windows Disk Management, then
> physically remove Disk 1, then using the BIOS setup utility, put Disk
> 2 first in the boot order, then should the WinXP on partition F boot?
Possibly not for a couple of reasons:
1 If you had installed Disk 2 as a slave you would need to rejumper it
to become a master upon removing Disk 1
2 As you have not installed Windows on Disk 2, I am unsure what, if
anything, will be in the MBR of that disk and you are proposing to
remove the disk with a Windows formatted MBR
> I certainly could try it.
True. So far, I have not seen the reason why you want to remove Disk 1.
Are you not making life too hard for yourself by doing that?
> I think that's my first step. I should get the F WinXP (a clone of C
> made using Ghost 2003) to boot. Then maybe I can just follow the
> general instructions to add Ubuntu as an additional OS.
The most general instructions for doing that would be:
1 Boot from the Ubuntu install disk
2 Tell it to install in the ext3 partition you made with Partition
Magic
3 Allow it to reformat and use the small partition as /boot
4 Accept the option to boot Windows if asked
5 Allow grub to install into the MBR of whatever is the first hard disk
--
Robert HULL
Archival or publication of this article on any part of thisishull.net
is without consent and is in direct breach of the Data Protection Act
> Alright I'll abandon the BootMagic plan. But now I'm at a loss for my
> next step.
Your next step, before ALL others should be to learn to quote the
article to which you are responding.
>You want Grub in the MBR of the first HDD.
Not in my opinion. I dual-boot XP and Mepis at home, and I take what
I now consider the "safe way". Install XP first, then Linux, but NOT
installing Grub to the MBR. I then use the "dd trick" to get the
Linux boot-record onto C:\, and then I edit boot.ini.
A little more work, but worth it, IMO.
I see no added value, except that you get a less capable boot manager
than Grub. I know of this way, I did it once for an NT installation
(at that time the NT bootmanager could boot Linux, but lilo could
not boot NT. Grub did not exist yet, I think.)
Arno
Nehmo -
Looking up "Active Partition", I get this definition:
http://www.boot-us.com/gloss07.htm
"The active partition is the partition on the first hard disk which is
automatically booted when no boot manager is installed. The partition
marked as active is set in the partition table of the MBR. Please note
that there is only one active partition allowed on each hard disk. If a
boot manager is installed it is irrelevant which partition is marked as
active, since the partitions are selected and booted from the boot
manager. "
So does the active partition actually have something different in it?
Does some file in the active partition have something that declares its
partition as the active one? If so, what is it?
Or does the MBR simply identify a particular partition as active? In
other words, does the quality of being active reside in the partition
itself, or does it reside in the MBR?
When I'm in Computer Management like here
http://home.kc.rr.com/plumb/comp_man.gif , and I rightclick on F, I get
the option to Mark partition as active. What exactly will happen if I
do that?
Timothy Daniels -
> In MS land,
> the Boot Sector code hands off control to ntldr in that partition,
> and ntldr does the boot loading of the OS.
> Depending on which cloning utility you use,
Nehmo -
I'm using Ghost 2003. I've cloned successfully using it before (I'm
describing a previous unrelated job). When I did that, I physically
disconnected the origin disk before booting up with the destination
disk.
This time, I first used PartitionMagic to make 4 primary partitions on
the destination disk before the cloning operation. I then cloned C to
F, which is on Disk 2. I disconnected before the reboot, but
afterwards, I couldn't boot form F. I thought the failure was because
F wasn't the first partition of the disk, but I now realize that's not
the cause of failure to boot.
Timothy Daniels -
> you can have
> the option of copying the MBR and the option of whether to
> mark the clone's partition "active". Casper XP does both
> automatically.
Nehmo -
Casper XP
http://www.fssdev.com/products/casperxp/
looks like a good program, and I'll probably get it later. It seems for
now I can get away with Ghost 2003. I think it must copy the MBR.
Otherwise how would I have been able to make clones that booted?
Timothy Daniels -
> Copying a clone to a partition on the same HD
> can be problematice unless you never start up the clone but
> just use it as a backup storage area. The reason is that the
> 1st startup of the clone must be done with the "parent" OS's
> partition not visible to the clone, and that's hard to do if the
> clone and the "parent" are on the same HD.
--
>So does the active partition actually have something different in it?
No, the active flag is in the MBR.
>Does some file in the active partition have something that declares its
>partition as the active one? If so, what is it?
No, the active flag is in the MBR.
>Or does the MBR simply identify a particular partition as active? In
>other words, does the quality of being active reside in the partition
>itself, or does it reside in the MBR?
Yes, this is it ;) Keep in mind a linux system does not require, nor
acts on, the MBR active flag. So as soon as you install grub or lilo
to MBR (which ubuntu install will do), the active flag has little meaning.
I still set it so I know which primary has control -- this helps when
fixing a boot failure.
>In comp.sys.ibm.pc.hardware.storage chrisv <chr...@nospam.invalid> wrote:
>> Arno Wagner wrote:
>
>>>You want Grub in the MBR of the first HDD.
>
>> Not in my opinion. I dual-boot XP and Mepis at home, and I take what
>> I now consider the "safe way". Install XP first, then Linux, but NOT
>> installing Grub to the MBR. I then use the "dd trick" to get the
>> Linux boot-record onto C:\, and then I edit boot.ini.
>
>> A little more work, but worth it, IMO.
>
>I see no added value, except that you get a less capable boot manager
>than Grub.
Safer, since Grub on the MBR sometimes renders Windows unbootable. I
don't doubt that this can be fixed after the fact, but then it's more
work and stress than doing it the "safe way" as I suggest.
As for the Windows boot-loader "capability", it's fine for what most
dual-booters will want to do - simply choose an OS from a list.
Not having the time to read the linked article, I can only
guess that its reference to a "boot manager" is NOT to
Microsoft's ntldr boot manager, but to some 3rd party
boot manager or to a Unix/Linus boot manager. For
more info on Microsoft's WinXP boot procedure, read
the long article in the Microsoft MSDN. You will see that
each HD can have an "active" partition, and that is the
partition whose boot sector gets control at boot time.
The boot sector then hands control to the ntldr in that
partition.
> So does the active partition actually have something different
> in it? Does some file in the active partition have something
> that declares its partition as the active one? If so, what is it?
> Or does the MBR simply identify a particular partition as active?
> In other words, does the quality of being active reside in the
> partition itself, or does it reside in the MBR?
According to Microsoft's description of the WinXP boot
procedure, the MBR and the boot sector have executable
logic in them. The "active" flag is probably resident in the
partition table for the HD, and it's read by the MBR.
> When I'm in Computer Management like here
> http://home.kc.rr.com/plumb/comp_man.gif , and I rightclick
> on F, I get the option to Mark partition as active. What exactly
> will happen if I do that?
The partition will be flagged as being "active" in the
HD's partition table.
> Timothy Daniels -
>> In MS land,
>> the Boot Sector code hands off control to ntldr in that partition,
>> and ntldr does the boot loading of the OS.
>> Depending on which cloning utility you use,
>
> Nehmo -
> I'm using Ghost 2003. I've cloned successfully using it before
> (I'm describing a previous unrelated job). When I did that, I
> physically disconnected the origin disk before booting up
> with the destination disk.
>
> This time, I first used PartitionMagic to make 4 primary
> partitions on the destination disk before the cloning operation.
> I then cloned C to F, which is on Disk 2. I disconnected
> before the reboot, but afterwards, I couldn't boot form F.
> I thought the failure was because F wasn't the first partition
> of the disk, but I now realize that's not the cause of failure
> to boot.
It *was* because F wasn't the first partition on the 2nd HD.
Remember that the clone is not only an exact copy of the
OS, it also has an exact copy of boot.ini - which references
partitions by their position on the disk. If the "parent" OS
was on partition 1 of the source HD, boot.ini on the clone
HD also expects the OS to be in partition 1. The clone on
F needs its boot.ini file edited so that its "partition(p)"
parameter has for its "p" value the position of the F partition
(the partition numbering starting at "1").
> Timothy Daniels -
>> you can have
>> the option of copying the MBR and the option of whether to
>> mark the clone's partition "active". Casper XP does both
>> automatically.
>
> Nehmo -
> Casper XP
> http://www.fssdev.com/products/casperxp/
> looks like a good program, and I'll probably get it later. It
> seems for now I can get away with Ghost 2003. I think it
> must copy the MBR. Otherwise how would I have been
> able to make clones that booted?
Clones can be booted if the boot.ini file of the running
boot manager has an entry that points to it. That's how
multi-booting works. But it's possible that Ghost copies
over the MBR as a default if you don't uncheck the option.
*TimDaniels*
>>In comp.sys.ibm.pc.hardware.storage chrisv <chr...@nospam.invalid> wrote:
>>> Arno Wagner wrote:
>>
>>>>You want Grub in the MBR of the first HDD.
>>
>>> Not in my opinion. I dual-boot XP and Mepis at home, and I take what
>>> I now consider the "safe way". Install XP first, then Linux, but NOT
>>> installing Grub to the MBR. I then use the "dd trick" to get the
>>> Linux boot-record onto C:\, and then I edit boot.ini.
>>
>>> A little more work, but worth it, IMO.
>>
>>I see no added value, except that you get a less capable boot manager
>>than Grub.
> Safer, since Grub on the MBR sometimes renders Windows unbootable.
I have not heard that one yet. Nor have I experienced it. Since the
only thing Grub does to an MS c: partition is set it active, I also
don't see how Grub could make it unbootable. This is probably some
other problem mistakenly blamed on Grub.
> I don't doubt that this can be fixed after the fact, but then it's more
> work and stress than doing it the "safe way" as I suggest.
Maybe you should go for a middle ground: Grub on a floppy
or CD and the MS thing on the HDD as reserve. For the truly
oaranoid only ;-)
> As for the Windows boot-loader "capability", it's fine for what most
> dual-booters will want to do - simply choose an OS from a list.
If that is all you want, then you can of course use the MS bootmanager.
I need root partition selection, interactive capabilities to select
other kernels, kernel paramters, etc.. Of course you can get these
by installing Grub as second stage into the boot sector of a Linux
partition.
Arno
> Not having the time to read the linked article, I can only
> guess that its reference to a "boot manager" is NOT to
> Microsoft's ntldr boot manager, but to some 3rd party
> boot manager or to a Unix/Linus boot manager. For
I doubt that. Linux does not care about the "active" flag at all.
It is an MS artefact. In Linux you do not boot a partiton at all,
you boot a kernel file. The kernel does not care where it comes
from and fonds the root filesystem because it is told by a
parameter (possibly patched into the kernel) which partition on
which disk it is or whether to mount it from network.
> more info on Microsoft's WinXP boot procedure, read
> the long article in the Microsoft MSDN. You will see that
> each HD can have an "active" partition, and that is the
> partition whose boot sector gets control at boot time.
> The boot sector then hands control to the ntldr in that
> partition.
Yes. That is what the MS-supplied MBR does.
>> So does the active partition actually have something different
>> in it? Does some file in the active partition have something
>> that declares its partition as the active one? If so, what is it?
>> Or does the MBR simply identify a particular partition as active?
>> In other words, does the quality of being active reside in the
>> partition itself, or does it reside in the MBR?
> According to Microsoft's description of the WinXP boot
> procedure, the MBR and the boot sector have executable
> logic in them. The "active" flag is probably resident in the
> partition table for the HD, and it's read by the MBR.
The MBR needs to have exectuable code. For the bootsectors
(one per partition) it is potional, but present for Windows.
And yes, the flag works as you say for the MS MBR.
Arno
What you described is not a boot manager, but an OS loader.
The OS loader don't belong in the MBR. The Linux freaks cannot break conventions.
> The active flag is not an artifact, it is an established convention from the DOS/Xenix days.
> If Linux installers do not include the active MS partition in the boot menu, they are broken.
>
> What you described is not a boot manager, but an OS loader.
> The OS loader don't belong in the MBR. The Linux freaks cannot break conventions.
_G_R_and _U_nified _B_oot loader
They only need to add the 'Chainloader +1' entry (see below)
http://www.gnu.org/software/grub/manual/grub.html#Loading-an-operating-system-directly
==================================================
*4.1.2 Load another boot loader to boot unsupported operating systems*
If you want to boot an unsupported operating system (e.g. Windows 95),
chain-load a boot loader for the operating system. Normally, the boot
loader is embedded in the boot sector of the partition on which the
operating system is installed.
Set GRUB's root device to the partition by the command rootnoverify
(see rootnoverify):
grub> rootnoverify (hd0,0)
Set the active flag in the partition using the command makeactive6 (see
makeactive):
grub> makeactive
Load the boot loader with the command chainloader (see chainloader):
grub> chainloader +1
`+1' indicates that GRUB should read one sector from the start of the
partition. The complete description about this syntax can be found in
Block list syntax.
Run the command boot (see boot).
However, DOS and Windows have some deficiencies, so you might have to
use more complicated instructions. See DOS/Windows, for more
information.
===================================================
----------------------------------------------------
Perhaps relevant to the OP's issues ??
----------------------------------------------------
*4.2.6 DOS/Windows*
GRUB cannot boot DOS or Windows directly, so you must chain-load them
(see Chain-loading). However, their boot loaders have some critical
deficiencies, so it may not work to just chain-load them. To overcome
the problems, GRUB provides you with two helper functions.
If you have installed DOS (or Windows) on a /non-first/ hard disk, you
have to use the disk swapping technique, because that OS cannot boot
from any disks but the first one. The workaround used in GRUB is the
command map (see map), like this:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
This performs a virtual swap between your first and second hard drive.
Caution: This is effective only if DOS (or Windows) uses BIOS to access
the swapped disks. If that OS uses a special driver for the disks, this
probably won't work.
>> The active flag is not an artifact, it is an established convention
>> from the DOS/Xenix days. If Linux installers do not include the
>> active MS partition in the boot menu, they are broken. >> What you
>> described is not a boot manager, but an OS loader. The OS loader
>> don't belong in the MBR. The Linux freaks cannot break conventions.
1) Why would this be a general convention, except to satisfy your
unflexibility?
2) Why can't the Linux people do things that work and are both
clean and easy to understand?
Of course the "active" flag is a historic artefact. You said it
yourself: DOS/Xenix. There is no need for it today and besides the
broken stuff by MS nobody needs it.
Arno
In fact, that's how my machine works. When I select Linux, Grub
comes-up, so you won't have lost any capability.
How is the "selection" of Linux done? Is its partition
specified by the "active" flag in the partition table and thus
"selected" by the MBR, or are you saying that you use a
Linux-specific boot sector to pass control to grub, or are
you saying that you us MS's ntldr/boot.ini to choose the
Linux partition (that contains grub)? My question is about
where the point is in the boot procedure where it becomes
MS- specific or Linux-specific.
*TimDaniels*
No
> or are you saying that you use a
> Linux-specific boot sector to pass control to grub,
No
> or are
> you saying that you us MS's ntldr/boot.ini to choose the
> Linux partition (that contains grub)?
Strike 3 :-)
> My question is about
> where the point is in the boot procedure where it becomes
> MS- specific or Linux-specific.
>
> *TimDaniels*
It happens as soon as you select which OS (or kernel, or memtest, or
whatever) to boot from while in the GRUB boot loader menu (you can even
edit it while in there ;-))
Read the info in the URL I posted above - very informative
>"chrisv" wrote:
>> Arno Wagner wrote:
>>
>>> If that is all you want, then you can of course use the MS
>>> bootmanager. I need root partition selection, interactive
>>> capabilities to select other kernels, kernel paramters, etc.
>>> Of course you can get these by installing Grub as second
>>> stage into the boot sector of a Linux partition.
>>
>> In fact, that's how my machine works. When I select Linux,
>> Grub comes-up, so you won't have lost any capability.
>
>How is the "selection" of Linux done? Is its partition
>specified by the "active" flag in the partition table and thus
>"selected" by the MBR, or are you saying that you use a
>Linux-specific boot sector to pass control to grub, or are
>you saying that you us MS's ntldr/boot.ini to choose the
>Linux partition (that contains grub)?
I tell ntldr to use the Linux boot-sector that I've copied to my C:
partition. It then passes control to Grub, which has been installed
on my / Linux partition. Only the C: partition is active.
>My question is about
>where the point is in the boot procedure where it becomes
>MS- specific or Linux-specific.
When I use the cursor keys and Enter to select the Linux option in the
list presented by ntldr. Grub then pops-up and presents the options
of starting Linux or transferring control back to ntldr.
> How is the "selection" of Linux done? Is its partition
>specified by the "active" flag in the partition table and thus
>"selected" by the MBR,
I run dual boot like this, primarily windoze boxen default to
windoze, primarily linux default to loading linux. In any case
I let MSFT own the MBR and pass control to lilo via active flag.
> My question is about
>where the point is in the boot procedure where it becomes
>MS- specific or Linux-specific.
Depends which OS wrote the MBR, run winxp recovery console then
fixboot, fixmbr, and MSFT owns the MBR (reinstall windoze takes
over the MBR too).
Run lilo with 'boot = /dev/hda' parameter and it writes a lilo
MBR, similarly for grub (I don't use grub).
If you let MSFT own the MBR, you may change the active flag from
whichever OS is running -- people who push lilo or grub MBR bitch
about MSFT installer 'cos they need to boot a recovery CD to repair
their GNU/Linux after repairing or installing windoze.
Related:
To discover which OS owns the MBR you could do:
lilo (Slackware only box):
grant@deltree:~$ dd if=/dev/hda bs=512 count=1 |xxd |head -2
1+0 records in
1+0 records out
0000000: faeb 2101 b401 4c49 4c4f 1605 00ab e943 ..!...LILO.....C
0000010: 0000 0000 6771 1f43 7799 ef28 8100 8060 ....gq.Cw..(...`
ntloader:
root@tosh:/home/grant# dd if=/dev/hda bs=512 count=1 |xxd
...
0000120: 32e4 8a56 00cd 13eb d661 f9c3 496e 7661 2..V.....a..Inva
0000130: 6c69 6420 7061 7274 6974 696f 6e20 7461 lid partition ta
0000140: 626c 6500 4572 726f 7220 6c6f 6164 696e ble.Error loadin
0000150: 6720 6f70 6572 6174 696e 6720 7379 7374 g operating syst
0000160: 656d 004d 6973 7369 6e67 206f 7065 7261 em.Missing opera
0000170: 7469 6e67 2073 7973 7465 6d00 0000 0000 ting system.....
See: http://bugsplatter.mine.nu/test/boxen/tosh/lilo.conf
for one way to triple boot Slackware, Windoze, FreeBSD from MSFT MBR.
Ubuntu installer wants to take over MBR. I dislike the attitude
that grub and only grub is the answer -- grub has serious problems
in dual-boot boxen as windoze programs may use boot cylinder unused
sectors 2..63 which is where, surprise, grub 1st stage resides.
I see a problem with grub there.
hmmm...Ok;
I think I have Twins ^_^
I got Win98 on hda1/5/6 (Ext'd on hda2) and linux on hda7/8/9/10/11
(All Logicals)
Boot flag is only set on hda1 atm, but I have had both hda1 and hda7
set as "Boot"
$ sudo dd if=/dev/hda bs=512 count=1 | xxd -g1
0000000: eb 48 90 01 b6 01 4c 49 4c 4f 16 05 a0 8b f0 43
.H....LILO.....C
0000010: 00 00 00 00 57 b9 e5 01 1e 2d 1b 60 01 00 80 60
....W....-.`...`
0000020: 29 7a 47 04 b8 c0 07 8e d0 bc 00 08 fb 52 53 06
)zG..........RS.
0000030: 56 fc 8e d8 31 ed 60 b8 00 12 b3 36 cd 10 03 02
V...1.`....6....
.......
0000170: 00 be 93 7d e8 2a 00 eb fe 47 52 55 42 20 00 47 ...}.*...GRUB
.G
0000180: 65 6f 6d 00 48 61 72 64 20 44 69 73 6b 00 52 65 eom.Hard
Disk.Re
0000190: 61 64 00 20 45 72 72 6f 72 00 bb 01 00 b4 0e cd ad.
Error.......
00001a0: 10 ac 3c 00 75 f4 c3 00 00 00 00 00 00 00 00 00
..<.u...........
00001b0: 00 00 00 00 00 00 00 00 1e 2d 1b 60 cf c9 80 01
.........-.`....
00001c0: 01 00 0c fe ff ff 3f 00 00 00 fc 8a 38 01 00 fe
......?.....8...
00001d0: ff ff 0f fe ff ff 3b 8b 38 01 29 57 79 06 00 00
......;.8.)Wy...
00001e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
00001f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
..............U.
AND
$ sudo dd if=/dev/hda bs=512 count=1 skip=63 | xxd -g1
0000000: eb 58 90 4d 53 57 49 4e 34 2e 31 00 02 10 20 00
.X.MSWIN4.1... .
0000010: 02 00 00 00 00 f8 00 00 3f 00 ff 00 3f 00 00 00
........?...?...
0000020: fc 8a 38 01 0d 27 00 00 00 00 00 00 02 00 00 00
..8..'..........
0000030: 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00
................
0000040: 80 00 29 f3 0c 44 25 4e 4f 20 4e 41 4d 45 20 20 ..)..D%NO
NAME
0000050: 20 20 46 41 54 33 32 20 20 20 fa 33 c9 8e d1 bc FAT32
.3....
0000060: f8 7b 8e c1 bd 78 00 c5 76 00 1e 56 16 55 bf 22
.{...x..v..V.U."
.....
0000180: 01 27 0d 0a 49 6e 76 61 6c 69 64 20 73 79 73 74 .'..Invalid
syst
0000190: 65 6d 20 64 69 73 6b ff 0d 0a 44 69 73 6b 20 49 em
disk...Disk I
00001a0: 2f 4f 20 65 72 72 6f 72 ff 0d 0a 52 65 70 6c 61 /O
error...Repla
00001b0: 63 65 20 74 68 65 20 64 69 73 6b 2c 20 61 6e 64 ce the disk,
and
00001c0: 20 74 68 65 6e 20 70 72 65 73 73 20 61 6e 79 20 then press
any
00001d0: 6b 65 79 0d 0a 00 00 00 49 4f 20 20 20 20 20 20 key.....IO
00001e0: 53 59 53 4d 53 44 4f 53 20 20 20 53 59 53 7e 01 SYSMSDOS
SYS~.
00001f0: 00 57 49 4e 42 4f 4f 54 20 53 59 53 00 00 55 aa .WINBOOT
SYS..U.
One more for fun (your style)
$ sudo dd if=/dev/hda bs=512 count=1 skip=63 | xxd | head -2
0000000: eb58 904d 5357 494e 342e 3100 0210 2000 .X.MSWIN4.1... .
0000010: 0200 0000 00f8 0000 3f00 ff00 3f00 0000 ........?...?...
OK, what is the boot process up to the point that
grub is started, beginning with the selection of the MBR
by the BIOS?
*TimDaniels*
> hmmm...Ok;
> I think I have Twins ^_^
> I got Win98 on hda1/5/6 (Ext'd on hda2) and linux on hda7/8/9/10/11
> (All Logicals)
> Boot flag is only set on hda1 atm, but I have had both hda1 and hda7
> set as "Boot"
>
> $ sudo dd if=/dev/hda bs=512 count=1 | xxd -g1
[ messy format removed ]
$ sudo dd if=/dev/hda bs=512 count=1 | xxd
1+0 records in
1+0 records out
512 bytes transferred in 0.000946 seconds (541273 bytes/sec)
0000000: eb48 9001 b601 4c49 4c4f 1605 a08b f043 .H....LILO.....C
0000010: 0000 0000 57b9 e501 1e2d 1b60 0100 8060 ....W....-.`...`
........
0000170: 00be 937d e82a 00eb fe47 5255 4220 0047 ...}.*...GRUB .G
0000180: 656f 6d00 4861 7264 2044 6973 6b00 5265 eom.Hard Disk.Re
0000190: 6164 0020 4572 726f 7200 bb01 00b4 0ecd ad. Error.......
00001a0: 10ac 3c00 75f4 c300 0000 0000 0000 0000 ..<.u...........
00001b0: 0000 0000 0000 0000 1e2d 1b60 cfc9 8001 .........-.`....
00001c0: 0100 0cfe ffff 3f00 0000 fc8a 3801 00fe ......?.....8...
00001d0: ffff 0ffe ffff 3b8b 3801 2957 7906 0000 ......;.8.)Wy...
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa ..............U.
================================
$ sudo dd if=/dev/hda bs=512 count=1 skip=63 | xxd
0000000: eb58 904d 5357 494e 342e 3100 0210 2000 .X.MSWIN4.1... .
0000010: 0200 0000 00f8 0000 3f00 ff00 3f00 0000 ........?...?...
.......
0000180: 0127 0d0a 496e 7661 6c69 6420 7379 7374 .'..Invalid syst
0000190: 656d 2064 6973 6bff 0d0a 4469 736b 2049 em disk...Disk I
00001a0: 2f4f 2065 7272 6f72 ff0d 0a52 6570 6c61 /O error...Repla
00001b0: 6365 2074 6865 2064 6973 6b2c 2061 6e64 ce the disk, and
00001c0: 2074 6865 6e20 7072 6573 7320 616e 7920 then press any
00001d0: 6b65 790d 0a00 0000 494f 2020 2020 2020 key.....IO
00001e0: 5359 534d 5344 4f53 2020 2053 5953 7e01 SYSMSDOS SYS~.
00001f0: 0057 494e 424f 4f54 2053 5953 0000 55aa .WINBOOT SYS..U.
====================================
It's all at that URL - but here's another with some info;
http://en.wikipedia.org/wiki/GNU_GRUB
** GRUB boot process **
The BIOS finds a bootable device (hard disk) and moves control to the
master boot record (MBR, the first 512 bytes of the hard disk).
The MBR contains GRUB stage 1. Given the small size of the MBR, Stage 1
does little more than load the next stage of GRUB (which may reside
physically elsewhere on the disk). Stage 1 can either load stage 1.5,
or it can load Stage 2 directly.
GRUB Stage 1.5 is located in the first 30 kilobytes of hard disk
immediately following the MBR. Stage 1.5 loads Stage 2.
GRUB Stage 2 (loaded by Stage 1 or 1.5) receives control, and displays
to the user the GRUB boot menu.
GRUB loads the user-selected (or default) kernel into memory and passes
control on to the kernel. (For less well-supported operating systems,
GRUB hands off control to another bootloader which then continues the
process of loading that kernel).
OK, that implies that the same boot loading process
proceeds with the BIOS selecting the HD and passing
control to that HD's MBR, and that MBR finding the
"active" partition and handing control to the boot sector
of the partition. So far, identical to MS's procedure -
probably because it's PC-specific and not MS-specific.
Then the boot sector finds and hands control to ntldr,
which resides in a MS file structure, so the boot sector
must know something about MS file structures. If ntldr
is in a file structure having NTFS file format, the boot
sector better be MS-aware in order to find ntldr. Does
this restrict your procedure to having a boot sector that
understands NTFS, or do you keep ntldr in a partition
having a file structure understood by a Linux boot sector?
It sounds to me like you use an MS boot sector to find
ntldr and pass control to it, then ntldr uses a normal MS
boot.ini to point to a partition containing the OS - which
in your case is a partition containing grub.
*TimDaniels*
> "chrisv" wrote:
>>
>> When I use the cursor keys and Enter to select the Linux option in the
>> list presented by ntldr. Grub then pops-up and presents the options
>> of starting Linux or transferring control back to ntldr.
>
>
> OK, that implies that the same boot loading process
> proceeds with the BIOS selecting the HD and passing
> control to that HD's MBR, and that MBR finding the
> "active" partition and handing control to the boot sector
> of the partition. So far, identical to MS's procedure -
> probably because it's PC-specific and not MS-specific.
> Then the boot sector finds and hands control to ntldr,
> which resides in a MS file structure, so the boot sector
> must know something about MS file structures. If ntldr
> is in a file structure having NTFS file format, the boot
> sector better be MS-aware in order to find ntldr. Does
> this restrict your procedure to having a boot sector that
> understands NTFS, or do you keep ntldr in a partition
> having a file structure understood by a Linux boot sector?
ntldr is right where it normally is, on C:\. The Windows install on my
machine is completely usual. The ONLY differences are that I've copied
the Linux boot-sector (it's just a 512-byte file, no need for it to
"understand" NTFS) onto C:, and I've edited boot.ini to give the option of
passing control to that Linux boot-sector ("Grub stage one" as iforone
more-accurately describes it).
> It sounds to me like you use an MS boot sector to find ntldr and
> pass control to it, then ntldr uses a normal MS boot.ini
"Normal", yes, but edited.
> to point to
> a partition containing the OS - which in your case is a partition
> containing grub.
If I choose Windows, ntldr loads Windows. If I choose Linux, ntldr passes
control to Grub stage one (those 512 bytes in a file on C:), which then
passes control to "the real" Grub, which is residing on an ext3 partition
along with the rest of GNU/Linux. Grub can then load and boot Linux, or
pass control back to ntldr.
[boot loader]
timeout=10
default=c:\bootsect.lnx
[operating systems]
c:\bootsect.lnx="Linux"
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows" /noexecute=optin
/fastdetect
That last line may wrap. There's only two lines after [operating systems]
The only URL posted "above" in this thread leads to an
inaccessible .gif file. Did you post it under another name?
*TimDaniels*
If you're referring to the gnu.org site that you posted
further along in the thread, that *does* look informative.
Thanks for that one.
*TimDaniels*
iforone wrote:
> Timothy Daniels wrote:
> > "iforone" wrote:
> It's all at that URL - but here's another with some info;
> http://en.wikipedia.org/wiki/GNU_GRUB
>
> ** GRUB boot process **
>
>
> The BIOS finds a bootable device (hard disk) and moves control to the
> master boot record (MBR, the first 512 bytes of the hard disk).
The MBR/MPT does /not/ have to have an Active/Boot flag set for GRUB
(Linux)-- but AFAICT
windoze WILL overwrite it as soon as you try to boot from it. I have
disabled the Boot flag from hda1(win98 Primary) and rebooted into it,
and what do you know - it's back - set as "Boot" when I check it with
cfdisk after rebooting to linux. With Linux, the boot flag could be
active or not - it doesn't matter AFAICT.
> The MBR contains GRUB stage 1. Given the small size of the MBR, Stage 1
> does little more than load the next stage of GRUB (which may reside
> physically elsewhere on the disk). Stage 1 can either load stage 1.5,
> or it can load Stage 2 directly.
Stage 1;
0000170: 00be 937d e82a 00eb fe47 5255 4220 0047 ...}.*...GRUB .G
0000180: 656f 6d00 4861 7264 2044 6973 6b00 5265 eom.Hard Disk.Re
0000190: 6164 0020 4572 726f 7200 bb01 00b4 0ecd ad. Error.......
> GRUB Stage 1.5 is located in the first 30 kilobytes of hard disk
> immediately following the MBR. Stage 1.5 loads Stage 2.
Stage 1.5;
00002f0: e83f 00eb 06be 1e21 e837 00be 2321 e831 .?.....!.7..#!.1
0000300: 00eb fe4c 6f61 6469 6e67 2073 7461 6765 ...Loading stage
0000310: 312e 3500 2e00 0d0a 0047 656f 6d00 5265 1.5......Geom.Re
0000320: 6164 0020 4572 726f 7200 bb01 00b4 0ecd ad. Error.......
0000330: 1046 8a04 3c00 75f2 c300 0000 0000 0000 .F..<.u.........
> GRUB Stage 2 (loaded by Stage 1 or 1.5) receives control, and displays
> to the user the GRUB boot menu.
Stage 2;
0000400: ea70 2200 0000 0302 ffff ff00 0000 0000 .p".............
0000410: 0200 302e 3935 00ff ff06 ff2f 626f 6f74 ..0.95...../boot
0000420: 2f67 7275 622f 7374 6167 6532 202f 626f /grub/stage2 /bo
0000430: 6f74 2f67 7275 622f 6d65 6e75 2e6c 7374 ot/grub/menu.lst
0000440: 0000 0000 0000 0000 0000 0000 0000 0000 ................
....
0001fc0: 0a0a 4752 5542 206c 6f61 6469 6e67 2c20 ..GRUB loading,
0001fd0: 706c 6561 7365 2077 6169 742e 2e2e 0a00 please wait.....
0001fe0: 696e 7465 726e 616c 2065 7272 6f72 3a20 internal error:
0001ff0: 7468 6520 7365 636f 6e64 2073 6563 746f the second secto
0002000: 7220 6f66 2053 7461 6765 2032 2069 7320 r of Stage 2 is
0002010: 756e 6b6e 6f77 6e2e 0000 0000 0000 0000 unknown.........
For that edited boot.ini file (with its entries
"default=c:\bootsect.lnx" and "c:\bootsect.lnx="Linux")
to be understood, it must be read by software other
than ntldr since that is not part of the normal boot.ini
syntax. Could that software be grub?
What is an "ext3" partition? Is it a kind of Extended
partition? If so, why was an Extended partition chosen
over a Primary partition?
*TimDaniels*
So grub/Linux has has its own type of MBR?
*TimDaniels*
Grub is in the MBR. The BIOS loads the MBR and then has the CPU
ececute the code in it.
Arno
No. It is loaded by the NT loader and it does understand
the boot.ini syntax above. Grub comes later. Actually Grub is
in bootsect.lnx in this configuration.
> What is an "ext3" partition? Is it a kind of Extended
> partition? If so, why was an Extended partition chosen
> over a Primary partition?
ext3 is just a Linux filesystem. As NTFS or FAT32 is a Windows
filesystem.
Arno
It has its own executable code in the MBR. Apart from that the MBR
is the standard DOS type, listing the disk geometry and the 4
primary pattitions, so I would say it is the standard MBR with
boot-code by Grub and not Microdift. A matter of interpretation ;-)
Arno
> iforone wrote:
>> Timothy Daniels wrote:
>> > "iforone" wrote:
>> It's all at that URL - but here's another with some info;
>> http://en.wikipedia.org/wiki/GNU_GRUB
>>
>> ** GRUB boot process **
>>
>>
>> The BIOS finds a bootable device (hard disk) and moves control to the
>> master boot record (MBR, the first 512 bytes of the hard disk).
> The MBR/MPT does /not/ have to have an Active/Boot flag set for GRUB
> (Linux)--
Correct. And the BIOS also does not care. It will execute the MBR
boot code. If that code needs an active flag and does not find one,
it will just return and the BIOS will try the next MBR it finds
(on another disk) AFAIK.
> but AFAICT
> windoze WILL overwrite it as soon as you try to boot from it. I have
> disabled the Boot flag from hda1(win98 Primary) and rebooted into it,
> and what do you know - it's back - set as "Boot" when I check it with
> cfdisk after rebooting to linux.
I think it is the other way round: Windows will not boot if its
boot partition is not set active. Therefore the ususl Grub configuration
will set it active before booting with the chainloader. Example
from my Grub menue file:
title Trash-OS /dev/hda1
root (hd0,1) <== The Partition that is c:\ under Windows
makeactive <== Set active flag
chainloader +1 <== boot from partition
> With Linux, the boot flag could be active or not - it doesn't matter
> AFAICT.
The kernel does not care. It gets told on the kernel command line
which partition contains the root filesystem ("/", "aquivalent to
"c:\" an Windows). Alternatively the root partition specification
can be hard-coded into the kernel binary.
Example from my Grub menue file:
title Linux 2.6.15.4 /dev/md1
kernel (hd0,0)/2_6_15_4 root=/dev/md1
This loads the file named "2_6_16_4" from the first disk,
first partition, as kernel and tells it to use /dev/md1 as its
root partition. The thing is that Grub is filesystem aware and
can load regular files.
Arno
Well, that "c:\bootsect.lnx" is understood by ntldr makes
sense because "x:\" in a pathname is only understood
(AFAIK) by Windows/DOS. But that implies that grub
need not be part of the MBR or of the "active" partition's
boot sector since those are encountered prior to ntldr
getting control. And it sounds that up to the point of ntldr
getting control, the MS-supplied MBR and boot sector
can be used in the boot process for both Windows and
Linux, and that the Linux-specific code (i.e. grub) can be
handed control by ntldr according to the user's selection
of entries from boot.ini . If that is true - that ntldr can be
told to hand off control to grub - it can also be told to hand
off control to any Linux OS in the system as long as its
startup file can be designated by boot.ini . In other words,
Windows' multi-boot manager, ntldr can do multi-booting
of Windows OSes as well as Linux OSes, and grub is not
even needed if you have Microsoft's MBR and boot sector
(which I suspect are generic PC items) and Microsoft's
boot files.
*TimDaniels*
Why would there need to be grub-specific code in
the MBR? All that the MBR has to do is to read the
partition table and find the "active" partition and pass
control to the boot sector there. Previous postings in
this thread claim that ntldr then gets control, just as it
would for Microsoft booting, so there must not be
anything in the MBR or the boot sector that *has* to be
Linux-specific. It sounds as if the Linux-specificity can
be put off until ntldr hands control to grub/lilo or
whatever loads Linux.
*TimDaniels*
I'm reaching a bit - and my brain is starting to hurt :-) - but I have
those exact same entries in GRUB for win98 (except mine's --> root
(hd0,0)) -- I guess it's because of my GRUB 'chainloader +1' entry for
windoze that causes that small bit of grub code in the MBR to seek out
it's 1.5 and 2.0 stages - which then passes control to the DOS IO.sys
file in 98 (located at hda1, offset by 63 heads(?), which also contains
an 'active' flag -- I guess in essence, an Extended boot record or
EBR)....BTW - this can get very complicated once you start looking at
the Assembly language, offsets, and jump code -- note; FAT32 uses a
larger BPB than FAT16, and NTFS uses some 'reserved' bytes (4-6 bytes)
between the 440bytes of the MBR code and the 64bytes of the MPTs.
Has anyone been looking into the way the newer EFI (Extensible Firmware
Interface) interacts, since it will shortly replace our typical BIOSes
> > With Linux, the boot flag could be active or not - it doesn't matter
> > AFAICT.
>
> The kernel does not care. It gets told on the kernel command line
> which partition contains the root filesystem ("/", "aquivalent to
> "c:\" an Windows). Alternatively the root partition specification
> can be hard-coded into the kernel binary.
and also even a mini kernel image;
title Debian GNU/Linux, kernel 2.6.8-2-386 (recovery mode)
root (hd0,6)
kernel /boot/vmlinuz-2.6.8-2-386 root=/dev/hda7 ro single
initrd /boot/initrd.img-2.6.8-2-386
savedefault
boot
I don't yet fully understand all the possibilities yet, but here's some
man initrd info
-------------------------------------------------------------------------------------
The special file /dev/initrd is a read-only block device. Device
/dev/initrd is a RAM disk that is initialized (e.g. loaded) by the boot
loader before the kernel is started. The kernel then can use the the
block device /dev/initrd's contents for a two phased system boot-up.
In the first boot-up phase, the kernel starts up and mounts an initial
root file-system from the contents of /dev/initrd (e.g. RAM disk
initialized by the boot loader). In the second phase, additional
drivers or other modules are loaded from the initial root device's
contents. After loading the additional modules, a new root file system
(i.e. the normal root file system) is mounted from a different device.
-----------------------------------------------------------------------------------------
> Example from my Grub menue file:
>
> title Linux 2.6.15.4 /dev/md1
> kernel (hd0,0)/2_6_15_4 root=/dev/md1
>
> This loads the file named "2_6_16_4" from the first disk,
> first partition, as kernel and tells it to use /dev/md1 as its
> root partition.
> The thing is that Grub is filesystem aware and
> can load regular files.
>
> Arno
I haven't yet looked into the standard Legacy GRUB vs GRUB 2.0
differences yet.....I only mention to avoid confusion - and to clarify
just what we are discussing (note; That's why I'm sure to mention the
98 vs NT diffs too).
> "Arno Wagner" replied:
>> Timothy Daniels wrote:
>>> For that edited boot.ini file (with its entries
>>> "default=c:\bootsect.lnx" and "c:\bootsect.lnx="Linux") to be
>>> understood, it must be read by software other than ntldr since that is
>>> not part of the normal boot.ini syntax. Could that software be grub?
>>
>> No. It is loaded by the NT loader and it does understand the boot.ini
>> syntax above. Grub comes later. Actually Grub is in bootsect.lnx in
>> this configuration.
>
>
> Well, that "c:\bootsect.lnx" is understood by ntldr makes sense
> because "x:\" in a pathname is only understood (AFAIK) by
> Windows/DOS. But that implies that grub need not be part of the MBR
> or of the "active" partition's boot sector since those are
> encountered prior to ntldr getting control.
Right. It's not.
> And it sounds that up to the point of ntldr getting control, the
> MS-supplied MBR and boot sector can be used in the boot process for
> both Windows and Linux, and that the Linux-specific code (i.e. grub)
> can be handed control by ntldr according to the user's selection of
> entries from boot.ini . If that is true - that ntldr can be told
> to hand off control to grub - it can also be told to hand off
> control to any Linux OS in the system as long as its startup file
> can be designated by boot.ini . In other words, Windows' multi-boot
> manager, ntldr can do multi-booting of Windows OSes as well as Linux
> OSes,
Yes, but see below.
> and grub is not
> even needed if you have Microsoft's MBR and boot sector (which I
> suspect are generic PC items) and Microsoft's boot files.
You still need Grub or lilo "eventually", as ntldr will not load and boot
Linux directly. This is called chain-loading and is discussed in the Grub
manual that iforone provided a link to.
Likewise, if you choose to have "Grub stage one" in the MBR so that Grub
comes up first, you still need ntldr, which Grub will pass control to if
you want to boot Windows.
It is not that complicated. My XP installation is just not on the
first partition. I have a small ext2 (Linux Filsystem) partition
before it, were I keep my kernels. Windows ignores that partition
and uses the second primary partion as c:\, so in my case the
chainloader starts the bootsector of the second partition of
the fist disk. In your case it starts the bootsector of the first
partition of the first disk. Here is an extract from my partition
table:
oot /home/wagner>fdisk -l
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 10 80324+ 83 Linux <== hd0,0
/dev/hda2 * 11 764 6056505 b W95 FAT32 <== hd0,1
... ^^^ active flag
> Has anyone been looking into the way the newer EFI (Extensible Firmware
> Interface) interacts, since it will shortly replace our typical BIOSes
Well, some Linux guys managed recently to boot Linux on an INtel
MAC that uses EFI (I think). So there is hope.
>> > With Linux, the boot flag could be active or not - it doesn't matter
>> > AFAICT.
>>
>> The kernel does not care. It gets told on the kernel command line
>> which partition contains the root filesystem ("/", "aquivalent to
>> "c:\" an Windows). Alternatively the root partition specification
>> can be hard-coded into the kernel binary.
> and also even a mini kernel image;
> title Debian GNU/Linux, kernel 2.6.8-2-386 (recovery mode)
> root (hd0,6)
> kernel /boot/vmlinuz-2.6.8-2-386 root=/dev/hda7 ro single
> initrd /boot/initrd.img-2.6.8-2-386
> savedefault
> boot
That would be a root image, i.e. a small ramdisk image the kernel
uses as root partition. I find this feature still pretty impressive.
[...]
> I haven't yet looked into the standard Legacy GRUB vs GRUB 2.0
> differences yet.....I only mention to avoid confusion - and to clarify
> just what we are discussing (note; That's why I'm sure to mention the
> 98 vs NT diffs too).
I think Grub 2.0 is still not finished yet.
Arno
> Well, that "c:\bootsect.lnx" is understood by ntldr makes
> sense because "x:\" in a pathname is only understood
> (AFAIK) by Windows/DOS. But that implies that grub
> need not be part of the MBR or of the "active" partition's
> boot sector since those are encountered prior to ntldr
> getting control. And it sounds that up to the point of ntldr
> getting control, the MS-supplied MBR and boot sector
> can be used in the boot process for both Windows and
> Linux, and that the Linux-specific code (i.e. grub) can be
> handed control by ntldr according to the user's selection
> of entries from boot.ini .
Essentially correct.
> If that is true - that ntldr can be
> told to hand off control to grub - it can also be told to hand
> off control to any Linux OS in the system as long as its
> startup file can be designated by boot.ini .
No, I think that does not work, because the ntldr can only
"chainload" a bootsector. And while Linux is great, the kernel
will not fit into 512 bytes for some time to come ;-)=)
So you need to have another boot manager or OS loader between
ntldr and the Linux kernel for it to work.
> In other words,
> Windows' multi-boot manager, ntldr can do multi-booting
> of Windows OSes as well as Linux OSes, and grub is not
> even needed if you have Microsoft's MBR and boot sector
> (which I suspect are generic PC items) and Microsoft's
> boot files.
Unfortunately untrue. ntldr cannot boot windows, only
another boot-manager. But you can simulate the effect by telling
the other bootmanager (e.g. Grub), to not ask the user any questions
and boot Linux directly
Arno
> Why would there need to be grub-specific code in
> the MBR?
Since the boot-manager code (or its first stage) is allways
in the MBR.
> All that the MBR has to do is to read the
> partition table and find the "active" partition and pass
> control to the boot sector there.
That is what the Microsoft boot-manager/loader does.
Others do things differently, since the "active flag"
semantics is rather limited.
> Previous postings in
> this thread claim that ntldr then gets control, just as it
> would for Microsoft booting, so there must not be
> anything in the MBR or the boot sector that *has* to be
> Linux-specific.
ntldr is sort of the third stage of the MS bootmanager.
The first stage is in the MBR. The second is the bootsector
of the active partition. It is possible to start the
MS booting process from the second stage onwards, which is
exactly what Grub does during chainloading.
> It sounds as if the Linux-specificity can
> be put off until ntldr hands control to grub/lilo or
> whatever loads Linux.
That is one option. And it is possible the other way round as
well.
Arno
>> In other words,
>> Windows' multi-boot manager, ntldr can do multi-booting
>> of Windows OSes as well as Linux OSes, and grub is not
>> even needed if you have Microsoft's MBR and boot sector
>> (which I suspect are generic PC items) and Microsoft's
>> boot files.
>
> Unfortunately untrue. ntldr cannot boot windows, only
> another boot-manager.
Of course, you meant to say "ntldr cannot boot Linux"
Ooops, yes. Something Feudian at work I guess ;-)
Arno
Which partition at this point does ntldr consider to be "C:"?
Is it the partition that ntldr is in, i.e. the "active" partition on the
drive? Or can ntldr be instructed to pass control to a Linux
boot sector on another partition?
*TimDaniels*
Must the non-ARC pathname entry (i.e. c:\bootsect.lnx="") only
reference "c:", or can it reference some other partition?
*TimDaniels*
> Which partition at this point does ntldr consider to be "C:"?
>Is it the partition that ntldr is in, i.e. the "active" partition on the
>drive? Or can ntldr be instructed to pass control to a Linux
>boot sector on another partition?
ntldr doesn't look for a drive letter, it enumerates partitions at
boot time like grub does.
Grant.
--
Living in a land down under / Where women glow and men plunder / Can't you
hear, can't you hear the thunder? / You better run, you better take cover!
--Men At Work
> So grub/Linux has has its own type of MBR?
>
> *TimDaniels*
Just a note, MBR= Master Boot Record is a _place_ for storing
information. Long time ago, when hard drives were of the 10M size and
sold by the carat the industry Troika (IBM, Microsoft and I forgot)
formed an agreement on where, how big, and shape of code in MBR.
The size IS 512 bytes and has enough space to record 4 partitions.
Unix style OS's (NT included) can be invoked from logical partitions in
extended partition. The DOS related ones need primary partition stamped
as "active".
Most/all recent boot managers allow you to create your own circus of
OS's, just have to learn how to talk to the particular one that resides
on your screen.
Have fun
Stanislaw
Slack user from Ulladulla.
I would expect it can, but since the bootloader uses the BIOS
to accesse the file, any BIOS limitation on drive letters
and sector numbers might be an issue.
Arno
And therefore heavily OEM-dependent and undocumented. <groan>
Have you ever tried using "D:" to see where ntldr went looking?
I can imagine it looking in the next partition on the same drive,
the 2nd partition on the same drive, or the active partition on the
next drive in the boot sequence. Care to run an experiment? :-)
*TimDaniels*
What "BIOS limitation on drive letters", babblemouth?
> And therefore heavily OEM-dependent and undocumented. <groan>
Unfortunately, yes. As soon as you go over the first 4 IDE drives,
you need luck. Or if you have an SATA/SCSI controller that messes
with the BIOS disk order.
> Have you ever tried using "D:" to see where ntldr went looking?
Sorry, no. I did this only once. I have been using Grub to dual-boot
XP/Linux forever and no issue so far as long as I kept Windows on the
first IDE disk. Linux can be basically anywhere, but my best experiences
are with a small, 100MB primary partition as first partition (before
the XP one) on the first disk with ext2 format. Just put Grub config
and kernels on it. XP ignores it. The rest of the Linux system(s) can be
anywhere the kernel sees, I have them on the primary disk after all
the XP partitions and the RAID1 mirrors on the first SATA disk at the
beginning. Its basically a working system with 3 partitions and a data
dump and two rescue systems, one on each disk.
> I can imagine it looking in the next partition on the same drive,
> the 2nd partition on the same drive, or the active partition on the
> next drive in the boot sequence.
Yes, me too.
> Care to run an experiment? :-)
Not really. I am happy with Grub. And it allows you to interactively
search through what it sees, and list files on partitions during boot,
if your configuration is messed up. I found that most helpful in the
past, even though the interface is a bit primitive.
Arno