Working on making a dual boot again, WinXP & Ubuntu

R

Robert Hull

In comp.os.linux.misc, on Wed 22 February 2006 09:58, Nehmo
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.
 
C

chrisv

Arno said:
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.
 
A

Arno Wagner

In comp.sys.ibm.pc.hardware.storage chrisv said:
Arno Wagner wrote:
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
 
N

Nehmo

Timothy Daniels -
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.

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

chrisv

Arno said:
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.
 
T

Timothy Daniels

Nehmo said:
Timothy Daniels -

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. "


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 -

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 -

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*
 
A

Arno Wagner

In comp.sys.ibm.pc.hardware.storage chrisv said:
Arno Wagner wrote:
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
 
A

Arno Wagner

In comp.sys.ibm.pc.hardware.storage Timothy Daniels said:
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.
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
 
E

Eric Gisin

Arno Wagner said:
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.
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.
 
I

iforone

Eric said:
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.
 
A

Arno Wagner

In comp.sys.ibm.pc.hardware.storage iforone said:
Eric Gisin wrote:

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
 
C

chrisv

Arno said:
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.
 
T

Timothy Daniels

chrisv said:
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*
 
I

iforone

Timothy said:
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,
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
 
C

chrisv

Timothy said:
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.
 
T

Timothy Daniels

iforone said:
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 ...

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*
 
I

iforone

Timothy said:
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*

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).
 
T

Timothy Daniels

chrisv said:
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.


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?

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*
 
C

chrisv

Timothy said:
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.
 
C

chrisv

This is my boot.ini


[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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top