Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15th May 2008, 05:04 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
HOWTO Dual Boot Fedora & Windows With NTLoader

NTLoader is the name given to the files and boot code that comprise the boot loader used by Windows NT, W2K, XP, and Server 2003. In a computer already booting one of those systems, NTLoader is often used to boot Linux operating systems whenever it is considered undesirable to allow a Linux system to install a component of its boot loader in the master boot record. NTLoader cannot directly launch a Linux kernel. The three methods described here work by having NTLoader launch an intermediary file or component that in turn initiates events that lead to the Linux kernel booting.


IMPORTANT NOTE: All of this stuff was intended for Legacy GRUB and written at a time when that was the default Fedora boot loader. Now, GRUB 2 is the Fedora default. Most of this stuff still can be used to boot a Fedora system using GRUB 2, but not everything here applies to GRUB 2. I don't intend to update this material for GRUB 2, so proceed with caution.


Method #1: Use dd to copy GRUB stage1 to a binary file

Summary

Install Fedora and choose the boot loader option to install GRUB in the first sector of the Fedora boot partition (see attachment). Fedora will not boot at first. In linux rescue (see attachment), use the dd command to copy GRUB stage1 located in the first sector of the Fedora boot partition to a binary file in the Windows root directory. Then manually edit boot.ini (see attachment) to add a new entry for Fedora to the Windows boot menu to launch the binary file.

The Steps

After Fedora is installed...
  1. Boot with the Fedora DVD into linux rescue.
  2. At the command prompt, enter:
    Code:
    dd if=/dev/sdxy of=fedora.bin bs=512 count=1
    NOTE: You change x & y to the drive & partition of the Fedora boot partition with stage1. You may also change the name of the output file to whatever you choose.

  3. Copy the binary file to a floppy or a partition that Windows can access (see attachment).
  4. Exit linux rescue and reboot into Windows.
  5. Copy the binary file to C:\ where boot.ini is also located.
  6. Edit boot.ini to add a line similar to this:
    Code:
    c:\fedora.bin="Fedora"
  7. Reboot.
How it looks on paper
Code:
                                                boot.ini               /--> kernel
                                                    |                 / 
BIOS --> Partition Loader --> Boot Sector Code --> ntldr --> XP Menu -----> kernel          grub.conf                  /--> kernel
           (Master Boot        (Volume Boot          |                \                         |                     / 
              Record)             Record)       ntdetect.com           \--> fedora.bin --> GRUB stage2 --> GRUB Menu -----> kernel
                                                                           (GRUB stage1)   (/boot/grub)               \ 
                                                                                                                       \--> kernel
NOTE: This "dd method" is known not to work sometimes. In my experience, that has occurred when Fedora and Windows are on different drives. I have been able fix that by editing the binary file for the boot drive number located at 40h in the binary code. Any hex editor can be used to examine the binary code of stage1 in the file created with dd. The possible hex values for the boot drive number at offset 40h are first=80h, second=81h, third=82h, and so on. If the value at offset 40h is FFh, that means that the stage1 program gets the boot drive number from BIOS. If the value is wrong or FF, then change it to reflect the number of the drive with the Fedora boot partition. In the example below, the value for the boot drive number at offset 40h is FFh. The Fedora boot partition was on the second drive, and the binary file did not work to boot the Fedora system. The binary file was edited with ghex to change the boot drive number to 81h, and then it worked to boot the Fedora system.





Method #2: BOOTPART

Summary

Install Fedora and choose the boot loader option to install GRUB in the first sector of the Fedora boot partition (see attachment). Fedora will not boot at first. Use BOOTPART in Windows to create a binary file containing code that loads and executes the boot sector code of the Fedora boot partition (stage1). BOOTPART also edits boot.ini to add a new entry for Fedora to the Windows boot menu to launch the binary file. BOOTPART is often useful when the dd-created binary file fails to work.

The Steps

After Fedora is installed...
  1. Reboot into Windows.
  2. Download BOOTPART from the Internet and unzip the files to your Windows Desktop.
  3. Open a Windows Command Prompt window. From here on, everything occurs in this window.
  4. Change directories to the Windows Desktop...
    Code:
    cd desktop
  5. Enter the command bootpart without any options and your partitions will be listed. Example...
    Code:
    C:\Documents and Settings\User\Desktop>bootpart
    
    Physical number of disk 0 : 9590e5ce
     0 : C:* type=b  (Win95 Fat32), size= 2008093 KB, Lba Pos=63
     1 : C:  type=5  (Extended), size= 18000832 KB, Lba Pos=4016250
     2 : C:  type=7  (HPFS/NTFS), size= 18000801 KB, Lba Pos=4016313
    Physical number of disk 1 : b4f03683
     3 : D:* type=7  (HPFS/NTFS), size= 80035798 KB, Lba Pos=63
    Physical number of disk 2 : 9a109a0
     4 : E:* type=83 (Linux native), size= 104391 KB, Lba Pos=63
     5 : E:  type=8e (Linux LVM), size= 38989755 KB, Lba Pos=208845
  6. Now enter the command again in this format...
    Code:
    bootpart [partition number] [filename] [title]
    [partition number] Get this from the output of your bootpart command without options in the previous step. In the above example, partition #4 is the Fedora boot partition and is easy to spot since it is listed as type=83 (Linux native) and the other Linux partition is an LVM physical volume. If there had been several type 83 partitions instead of the LVM PV, here are some clues to find the boot partition: a) it is usually the first type 83 Linux partition in the list, b) it is usually about 100000 KB in size, c) it may have an asterisk (*) by it indicating it is the active partition.

    [filename] This is the name to give the binary file to be created in the Windows root directory. It can be anything you want.

    [title] This is the title of the Fedora OS in the Windows boot loader menu. It can be anything you want.

  7. Continuing with the example from above, the command could be like this...
    Code:
    bootpart 4 C:\fedora.bin "Fedora"
  8. Reboot.
How it looks on paper
Code:
                                                boot.ini               /--> kernel
                                                    |                 / 
BIOS --> Partition Loader --> Boot Sector Code --> ntldr --> XP Menu -----> kernel                          grub.conf                  /--> kernel
           (Master Boot        (Volume Boot          |                \                                         |                     / 
              Record)             Record)       ntdetect.com           \--> fedora.bin --> GRUB stage1 --> GRUB stage2 --> GRUB Menu -----> kernel
                                                                            (BOOTPART)    (boot sector)    (/boot/grub)               \
                                                                                                                                       \--> kernel


Method #3: GRUB for DOS

Summary

Install Fedora and choose the boot loader option to install GRUB in the first sector of the Fedora boot partition (see attachment). Fedora will not boot at first. This method uses GRUB for DOS (aka GRUB4DOS) which is capable of launching the Fedora kernel directly without using any GNU GRUB stages. Even though Fedora's GRUB stages are not required for this method to work, there is still a benefit from choosing to install GRUB in the first sector of the Fedora boot partition. It causes a grub.conf file to be created for Fedora while still sparing the master boot record from changes. Having a grub.conf file is useful for copying menu commands to the GRUB for DOS menu.lst or for using the configfile menu command to launch Fedora. The stage1 code that is installed in the boot sector causes no harm sitting there unused.

The Steps

After Fedora is installed...
  1. Reboot into Windows.
  2. Download the GRUB4DOS zip file.
  3. Unzip the file and copy these files to C:\ (or the Windows root directory):

    1. grldr
    2. menu.lst

  4. Edit boot.ini (see attachment) to add a line similar to this:
    Code:
    c:\grldr="Start GRUB"
  5. Edit menu.lst to add sections for the Linux systems (and to tidy up for the many examples).
  6. Reboot.
How it looks on paper
Code:
                                                boot.ini               /--> kernel
                                                    |                 /
BIOS --> Partition Loader --> Boot Sector Code --> ntldr --> XP Menu -----> kernel                /--> kernel
           (Master Boot        (Volume Boot          |                \                          /
              Record)             Record)       ntdetect.com           \--> grldr --> GRUB Menu -----> kernel
                                                                              |                  \
                                                                           menu.lst               \--> kernel
                                                                      (using configfile)
The usual menu commands all work in the GRUB for DOS menu.lst file. The title, root, kernel, and initrd lines can be copied from another configuration file to directly boot a Linux kernel. Or, the configfile command can be used to reload the menu with the information from another system's GRUB configuration file. And, the chainloader command can be used to launch boot sector code.
Attached Thumbnails
Click image for larger version

Name:	grub_1st_sector.jpg
Views:	763
Size:	133.5 KB
ID:	16467   Click image for larger version

Name:	edit_boot_ini.jpg
Views:	599
Size:	111.3 KB
ID:	16468   Click image for larger version

Name:	howto_examples.jpg
Views:	584
Size:	57.9 KB
ID:	16469   Click image for larger version

Name:	stage1.jpg
Views:	2700
Size:	97.1 KB
ID:	17754  

Last edited by stoat; 6th January 2010 at 09:50 PM.
Reply With Quote
  #2  
Old 27th May 2008, 07:02 AM
jonathonp Offline
Registered User
 
Join Date: Oct 2006
Location: Melbourne
Age: 43
Posts: 538
Hi stoat. i really appreciate your guide. johnny
Reply With Quote
  #3  
Old 10th June 2008, 01:06 AM
sk1 Offline
Registered User
 
Join Date: Jun 2008
Posts: 3
One small addition.
FC9 formats installation partitions to ext3 filesystem with 256 bit inodes (almost all others use 128 bit inodes).
FC9 GRUB patched to handle 256 bit inodes.
As a result, if you are trying to use some other (from centos, ubuntu etc. GRUB4DOS) grub - it will fail.
Reply With Quote
  #4  
Old 11th June 2008, 02:01 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
Quote:
Originally Posted by sk1

One small addition.
FC9 formats installation partitions to ext3 filesystem with 256 bit inodes (almost all others use 128 bit inodes).
FC9 GRUB patched to handle 256 bit inodes.
As a result, if you are trying to use some other (from centos, ubuntu etc. GRUB4DOS) grub - it will fail.
Hello again sk1,

There are simple ways to make the old GRUBs boot F9. I don't think this inode thing is a big deal.

Last edited by stoat; 11th June 2008 at 09:15 PM.
Reply With Quote
  #5  
Old 19th July 2008, 05:24 PM
m.nassar Offline
Registered User
 
Join Date: May 2008
Posts: 90
gr8 gr8 gr8 work man keep up thnx a million 4 this gr8 post
__________________
M.Nassar
Nothing worth having comes easy " Dr.Kelso in Scrubs "
Reply With Quote
  #6  
Old 19th August 2008, 09:43 AM
nilrem Offline
Registered User
 
Join Date: Aug 2008
Posts: 2
Thumbs up

Thank you for this helpful guide.

I haven't seen the problem with fedora on another drive than windows covered anywhere else.

While editing the file with the hex editor fixes the image in so far that grub loads, somehow
grub does not continue to boot Fedora.

I assume the sector address for stage2 is false (In my bootimage it is: E1 3C B8 16) due to Fedora using Virtual disks which again seems to be the problem that I cannot get it to boot manually with grub.

Has anyone a clue how to figure out the right sector address for stage2?

I guess I'll have to fit Fedora on the same drive with windows.
Reply With Quote
  #7  
Old 19th August 2008, 01:52 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
Quote:
Originally Posted by nilrem

While editing the file with the hex editor fixes the image in so far that grub loads, somehow
grub does not continue to boot Fedora.
Hello nilrem,

If by "grub loads" you mean that you are getting to see the graphic Fedora countdown splash screen and/or menu, then the stage1 binary file created with dd has done its job, and nothing is wrong with it. It is stage2 in the file system that reads the grub.conf and then creates the menu. Something else would then be wrong such as a hardware booting issue (a common enough thing).

If booting is stopping at a working GRUB shell prompt (grub> _ ), then your stage1 binary file probably worked and is okay. Stopping at a working GRUB shell prompt usually means stage2 was at least loaded into memory and executed. The problem is usually with the grub.conf file.

If booting is stopping early with "GRUB _" on the screen with the system frozen and requiring a hard reboot, then that does mean your stage1 binary file is not loading and executing stage2.

Which one of those are you seeing?

Quote:
Originally Posted by nilrem

I assume the sector address for stage2 is false...
With other explanations still possible and not yet ruled out, I don't think you should make such an assumption now. Besides, I don't think GRUB would make the mistake of embedding in stage1 an incorrect sector address for the next stage. I guess anything is possible, but I would look elsewhere for a while. For example, it's the drive designation in the binary file created by dd that sometimes needs editing; not the sector address of stage2. Did you do that carefully or at all? I explained that above in the first post.

Quote:
Originally Posted by nilrem

...due to Fedora using Virtual disks which again seems to be the problem that I cannot get it to boot manually with grub.
If you are referring to your Fedora system using Logical Volume Management, then that statement is not correct. GRUB doesn't need anything in your LVM physical volume to boot your system. That is why an ext3 boot partition always accompanies Fedora's LVM PV. It contains the kernels, initial ramdisks, splash screen image, stage image files, stage2. In other words, everything GRUB needs.

Quote:
Originally Posted by nilrem

I guess I'll have to fit Fedora on the same drive with windows.
Don't do that yet. The BOOTPART method has never failed to work for me even when the "dd method" did not work. But even before going to BOOTPART, it's worth spending a few minutes thinking about the dd-created binary file. I would like to know what happened.

Last edited by stoat; 19th August 2008 at 09:38 PM.
Reply With Quote
  #8  
Old 20th August 2008, 11:55 PM
nilrem Offline
Registered User
 
Join Date: Aug 2008
Posts: 2
Hey stoat,

thank you for the reply.

Well bootpart was already tried and didn't give a satisfying result. I cannot remember what exactly though ... might be that I made a mistake.

By grub starts I mean that it loads grub (not the graphic interface of it) just a black/white shell like environment that allows one to enter commands like

root, kernel, boot, find, etc.


So it is choice 2.

The strange thing is the find command doesn't find the kernel when doing a
find vmlinuz-2.6.25-14.fc9.i686

the drive,partition automatically chosen is hd1,4 which sounds about right but file system type is unknown. When I do a
root(hd1,4)
it detects the file system as being ext2 but the fs is ext3 if I recall correctly.

Quote:
For example, it's the drive designation in the binary file created by dd that sometimes needs editing; not the sector address of stage2. Did you do that carefully or at all?
I changed that from 80 to 81 indeed. Before it would just restart my computer whenever I selected Fedora in the windows boot menu. Since I made that change it started grub at least.


I installed Fedora a second time in the meanwhile, this time on the other hard drive and
everything worked fine. But I still have the other bootimage + installation of Fedora on
the other drive.

I guess you will want to take a look at the grub.conf next. I will put that up tomorrow to the following address because I won't be able to edit my post then most likely.

http://theurgy-clan.net/temp/grub.txt

If I can edit the post or someone else replied in the meanwhile I will of course post it here.

Thank you so far!
Reply With Quote
  #9  
Old 21st August 2008, 02:58 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
Hello again nilrem,

Well, maybe more than one thing was bad. It's not inconceivable. If editing the binary file resulted in booting to a working GRUB shell prompt (grub> _ ), then the binary file must have worked. At under 400 or so bytes, stage1 is not capable of starting the GRUB shell, but the large and more complex stage2 can. In fact, that is known to occur when the grub.conf file is missing or badly misconfigured. So something besides the binary file that you created was also busted or done incorrectly.

Quote:
Originally Posted by nilrem

The strange thing is the find command doesn't find the kernel when doing a
find vmlinuz-2.6.25-14.fc9.i686
That's not really so strange. Try it again including the path like I just did here...
Code:
grub> find /boot/vmlinuz-2.6.25.14-69.fc8
 (hd0,2)
But I don't have a separate boot partition. If I did, then I would have to enter it like this...
Code:
grub> find /vmlinuz-2.6.25.14-69.fc8
The difference from what you posted is subtle, but it matters.

You can also view your grub.conf from that grub> prompt like this example of mine...
Code:
grub> cat (hd0,2)/boot/grub/grub.conf
The separate boot partition and path issue applies there, too. Leave out the /boot if you have a separate boot partition.

Quote:
Originally Posted by nilrem

I guess you will want to take a look at the grub.conf next.
If you really want Fedora on the second drive, then I actually would recommend re-installing it since the system has little time invested in it so far. The thirty or so minutes required to re-install will be far better than hours and hours of tweaking and fiddling with this hobbled system. But take a moment to review the steps and convince yourself that you are doing the installation and the NTLoader configuration properly.

Last edited by stoat; 21st August 2008 at 07:45 PM.
Reply With Quote
  #10  
Old 28th December 2008, 12:02 AM
techtonic Offline
Registered User
 
Join Date: Dec 2008
Posts: 22
HOWTO Dual Boot Fedora & Windows With NTLoader

Quote:
Originally Posted by stoat View Post
Hello nilrem,

Don't do that yet. The BOOTPART method has never failed to work for me even when the "dd method" did not work. But even before going to BOOTPART, it's worth spending a few minutes thinking about the dd-created binary file. I would like to know what happened.
Hi, my first post. Your guide is why I joined this forum and switched to Fedora, because
I think bootpart is a great tool for Windows users learning how to dual boot with Linux.
Making your Howto prominent displays a different philosophical choice which I like.

I never knew how to fix the dd output for a second drive which was enlightening. The
512 bytes that bootpart generates has a significant difference to the 512 bytes that dd
produces (told to me by an expert with a hex editor). Also bootpart can be used to make
a linux.bin for Vista and included in the manual style with bcdedit before Easybcd arrived.

http://port25.technet.com/archive/20...M-Support.aspx

These instructions above work by substituting bootpart output for dd output. Of course
that is a lot more work than using Easybcd which incorporates the bootpart engine.

I have a question which you might know the answer to. I can add Linux as a dual boot
using Neogrub settings and works fine. I think that the 64-bit OS uses the 256 inode.
But if I add Linux using the other method "add Linux" which uses the bootpart engine,
but with a different title, though the same partition choice as Neogrub, the Linux boot
fails with a standard bootpart error (I've only seen one). I've only seen that error message
when either the wrong partition is chosen (not the case here) or when the partition distance
has been changed by resizing the partition or moving it. Maybe there is 3rd party way of
changing partition table information such as Bootit, that would cause this?

Anyway (Neo)grub works but bootpart fails and I can't figure out way when the other conditions
remain the same. Could this have anything to do with bootpart just working with 128 inode? This
situation is with just one hard drive.

I asked on the bootpart forum but the moderator replied with something like, 'what are you,
some kind of error message collector freak'? :-) Usually, that means they don't know.
The Neosmart guy suggested that I change the vmlinuz, and/or copy menu.lst entries!

If you don't know or think the question is inappropriate, that's ok. I think your guide is an
important contribution technically and perhaps "politically" is the right word. I also admired
how you drew the red emphasis markings. What tool did you use?

Last edited by techtonic; 28th December 2008 at 12:08 AM.
Reply With Quote
  #11  
Old 28th December 2008, 01:37 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
Hello techtonic,

Here's all I can offer at the moment.

Quote:
Originally Posted by techtonic

The 512 bytes that bootpart generates has a significant difference to the 512 bytes that dd
produces (told to me by an expert with a hex editor).
Yes, the BootPart binary file is very different from the binary file created with dd. The BootPart binary file contains code that loads and executes the boot sector code of the the Fedora boot partition. If GRUB stage1 was installed there, then it is loaded into memory and executed. Whereas the dd-created binary file is an exact copy of stage1 that was installed in the Fedora boot sector, and it runs instead of the Fedora boot sector code. It then directly launches stage2 in the file system. In that scenario, the stage1 in the boot sector never actually does anything. I tried to depict that difference graphically in the "How it looks on paper" diagrams above.

Quote:
Originally Posted by techtonic

I can add Linux as a dual boot using Neogrub settings and works fine. I think that the 64-bit OS uses the 256 inode. But if I add Linux using the other method "add Linux" which uses the bootpart engine, but with a different title, though the same partition choice as Neogrub, the Linux boot fails with a standard bootpart error (I've only seen one). I've only seen that error message when either the wrong partition is chosen (not the case here) or when the partition distance has been changed by resizing the partition or moving it. Maybe there is 3rd party way of changing partition table information such as Bootit, that would cause this?
I had a hard time following that. But I know this. As long as your boot loader is not trying to access a file in the file system, the 256-byte inodes are never a factor. If GRUB, NeoGRUB, EasyBCD, GRUB4DOS, whatever, is only loading and executing boot sector code (e.g., the chainloader command), then it will work regardess of the inodes used by the file system provided all the other related things have been done correctly. The trouble regarding 256-byte inodes crops up when a GRUB version prior to v0.97-21 tries to access a file in a file system with 256-byte inodes. For example: 1) directly booting the kernel and initial ramdisk with the kernel and initrd commands, or 2) using the configfile command which accesses the menu.lst or grub.conf file in the file system. In those situations, the old version of GRUB may fail with the message "Error 2: Bad file or directory type". You can read more about that in another thread here, but I doubt this subject is the cause of your troubles. Anyway, maybe you will see something there that stirs your thoughts.
Reply With Quote
  #12  
Old 28th December 2008, 04:01 AM
techtonic Offline
Registered User
 
Join Date: Dec 2008
Posts: 22
HOWTO Dual Boot Fedora & Windows With NTLoader

Thank you, I found the information about bootpart quite informative.

What I meant is that I can use Easybcd to add Linux OS using Neogrub, I'll call it LinA.
The next thing I do is use Easybcd to add Linux OS using the other method available under
the add Linux to the bootable operating systems. I'll call it LinB. In other words I used both
Easybcd methods available to add the same Linux OS using the same partition information
but I just changed the title, LinA and LinB will show up on the boot menu.

The Neogrub method works, choosing LinA in this example will boot up the Linux OS.
If I reboot, changing nothing, and choose to boot LinB, same OS and partition etc., just
a different name (but it uses the Easybcd - Bootpart incorporated engine) it fails with
that bootpart 2.60 error message which includes the developer's name.

So from what you said it can't be an inode issue, it must have something to do with the
difference between bootpart and dd. I guess. Anyway, it works with Neogrub, so it
isn't all that important. Then I saw your other tutorial on how to install Linux when XP cd
fails to install XP after you've used the same disk to install it in the first place.
I understand that situation much better now.

I installed Fedora10/Kde with defaults. Do you use Fedora 7? So far I've liked the defaults
of Vector Linux the best. An unimportant question if you keep that a closely guarded
secret, or it's just not worth replying to. Thanks again for your reply and for both Howtos
in areas where I have a lot of interest.
Reply With Quote
  #13  
Old 28th December 2008, 03:05 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
Well, I don't use Vista, so I can't play around with EasyBCD. What I know about it comes only from what I read in its documentation and from posts like yours. But one thing that occurred to me is this. Are you certain that you did not answer your own question when you said this?

Quote:
Originally Posted by techtonic

...the Linux boot fails with a standard bootpart error (I've only seen one). I've only seen that error message when either the wrong partition is chosen (not the case here)...
Maybe you only think it is not the case. After all, EasyBCD numbers drives starting at 0 and partitions starting at 1 exactly like Windows and similarly to a Linux operating system. Whereas NeoGrub uses a system exactly like GRUB where they both begin numbering from 0.

Quote:
Originally Posted by EasyBCD documentation

In EasyBCD (and Windows in general), drive numbers start at 0, and partitions start at 1.
Quote:
Originally Posted by NeoGrub documentation

NeoGrub uses the same syntax as its parent bootloader, GRUB.
All of that I'm sure you knew already, so don't be insulted. It happens to be a very common source of troubles here with Fedora and GRUB. It's also the simplest explanation that I can think of - certainly more acceptable than something so esoteric as a change occurring in the partition table. Whatever it is, I hope you figure it out. Anyway, at least the other method is working.
Reply With Quote
  #14  
Old 29th December 2008, 04:14 AM
techtonic Offline
Registered User
 
Join Date: Dec 2008
Posts: 22
HOWTO Dual Boot Fedora & Windows With NTLoader

stoat wrote;
Registered User

Join Date: Jun 2006
Location: North Carolina
Posts: 2,111
Well, I don't use Vista, so I can't play around with EasyBCD. What I know about it comes only from what I read in its documentation and from posts like yours. But one thing that occurred to me is this. Are you certain that you did not answer your own question when you said this?

Maybe you only think it is not the case. After all, EasyBCD numbers drives starting at 0 and partitions starting at 1 exactly like Windows and similarly to a Linux operating system. Whereas NeoGrub uses a system exactly like GRUB where they both begin numbering from 0.
-------------------------------------------------

Quote:
Originally Posted by EasyBCD documentation

In EasyBCD (and Windows in general), drive numbers start at 0, and partitions start at 1.

---------------------------------------------------------------------
TeX replied:
I use Easybcd to display information on XP. The documentation, as it is written, seems to
be in error to me. Yes, Windows partitions start at Partition #1 and continue counting,
primary partitions are counted before logical partitions are counted.

And if you use fdisk/Gparted then Linux reports partitions, starting at 1, such as sda1,
sdb2 etc. the numbered partition corresponds to plain English, not one digit less like grub.
I mean if you have four partition then the fourth partition is not labeled partition 3.

However, I don't believe that is the case for adding linux partitions in Easybcd, I think
both the "Linux" method, as Easybcd titles it, and the Neogrub method both use the
grub method of counting partitions. I used to think as you did before I checked it out.

So I will attach two screenshots to illustrate my point. The first screenshot which I assume
will be on the left, named EasyAddPart.png, shows under "Add an Entry"-->Linux
shows Drive 1, partition 0 = Linux Native 19GB, highlighted, which agrees with agrees
with the selected "Drive: 1 -> (Partition 0 Linux native - 19 GB)
The grub entry for this would be (hd1,0)

The second screenshot, EasyAddPartNext.png, shows after the fact, suppose I had added
Drive0, partition1, 14GB = "Drive: 0 -> Partition 1 (Linux native -14 GB) grub: (hd0,1)
So there are two example that the Easybcd, Add Entry, either Linux or Neogrub method,
both use the grub method to display partition information. The Linux method uses Bootpart.

Physical number of disk 0 : 56d9f43b
0 : C:* type=7 (HPFS/NTFS), size= 64974861 KB, Lba Pos=63
1 : C: type=5 (Extended), size= 15028807 KB, Lba Pos=130769100
2 : C: type=83 (Linux native), size= 14354046 KB, Lba Pos=130769163
3 : C: type=5 (Extended), size= 674730 KB, Lba Pos=159477255
4 : C: type=82 (Linux swap), size= 674698 KB, Lba Pos=159477318
Physical number of disk 1 : 9ad7b
5 : D:* type=83 (Linux native), size= 19530976 KB, Lba Pos=63
6 : D: type=5 (Extended), size= 828072 KB, Lba Pos=39062016
7 : D: type=82 (Linux swap), size= 828040 KB, Lba Pos=39062079

This is a report of the same drives from XP and bootpart. If you don't count "Extended"
partitions, you see that "2" becomes "1" and "4" becomes "2" with both Extendeds removed
which agrees with the report from Easybcd's, Add Entry, Linux method. And if one starts
the numbering over for Drive1 = D, 5 = 0, no Extended, so 7 = 1, agreeing with screenshot
and you see that bootpart under XP uses the grub style of assigning partition numbers. 0 1st

That is why I'm looking for an unusual anwer, I can't understand it, nor another competent
user meierfra->something not well understand like your explanation of why dd didn't work
when there were two drives. The screenshots are from my own computer, which works
right, but the screenshots from the problem system work the same way with the Add
Entry, Linux and Neogrub methods; Neogrub works, but with the same partition settings
as the Linux method which uses bootpart, doesn't, unlike my system.

Thanks for your ideas. I always suspect user error first myself ;-) The documentation you
quoted doesn't seem to be written accurately enough. Two pictures are worth 2000 words.

Last edited by techtonic; 29th December 2008 at 02:57 PM. Reason: Screenshots uploaded but not displayed, twice?! allowed?
Reply With Quote
  #15  
Old 29th December 2008, 06:35 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
Hello again techtonic,

As you know, I didn't have the screenshots to look at (the upload thing here has been broken for a while). And your fdisk report would have been interesting to see and correlate. But you did post the BootPart report of your two drives. I studied it carefully and used the sector positions and block sizes to sort of map out the partitions of both drives. Your posted BootPart report...
Quote:
Originally Posted by techtonic
Code:
Physical number of disk 0 : 56d9f43b
0 : C:* type=7 (HPFS/NTFS), size= 64974861 KB, Lba Pos=63
1 : C: type=5 (Extended), size= 15028807 KB, Lba Pos=130769100
2 : C: type=83 (Linux native), size= 14354046 KB, Lba Pos=130769163
3 : C: type=5 (Extended), size= 674730 KB, Lba Pos=159477255
4 : C: type=82 (Linux swap), size= 674698 KB, Lba Pos=159477318
Physical number of disk 1 : 9ad7b
5 : D:* type=83 (Linux native), size= 19530976 KB, Lba Pos=63
6 : D: type=5 (Extended), size= 828072 KB, Lba Pos=39062016
7 : D: type=82 (Linux swap), size= 828040 KB, Lba Pos=39062079
From that, I sort of created an fdisk report because it helps me think. I gave the extended partition on each drive the partition number 2 because their sector positions are immediately after the first primary partition on both drives. But they also could have been 3 or 4. Especially since there is a gap between the NTFS partition and the extended partition on your first drive. Anyway, it will not change the point I end up making if they are actually 3 or 4. I didn't bother with the cylinders. My homemade fdisk of your two drives (as derived from BootPart)...
Code:
Device       Boot  Start  End  Blocks    Id  System
/dev/sda1    *     1           64974861  7   HPFS/NTFS
/dev/sda2(?)                   15028807  5   Extended
/dev/sda5                      14354046  83  Linux
/dev/sda6                      674698    82  Linux swap

Device       Boot  Start  End  Blocks    Id  System
/dev/sdb1    *     1           19530976  83  Linux
/dev/sdb2(?)                   828072    5   Extended
/dev/sdb5                      828040    82  Linux swap
And from that, I created the likely GRUB device layout...
Code:
/dev/sda1       (hd0,0)
/dev/sda2(?)    (hd0,1)?
/dev/sda5       (hd0,4)
/dev/sda6       (hd0,5)

/dev/sdb1       (hd1,0)
/dev/sdb2(?)    (hd1,1)?
/dev/sdb5       (hd1,4)
Now then...

Quote:
Originally Posted by techtonic

The first screenshot which I assume
will be on the left, named EasyAddPart.png, shows under "Add an Entry"-->Linux
shows Drive 1, partition 0 = Linux Native 19GB, highlighted, which agrees with agrees
with the selected "Drive: 1 -> (Partition 0 Linux native - 19 GB)
The grub entry for this would be (hd1,0)
Okay. Agreed.

Quote:
Originally Posted by techtonic

The second screenshot, EasyAddPartNext.png, shows after the fact, suppose I had added
Drive0, partition1, 14GB = "Drive: 0 -> Partition 1 (Linux native -14 GB) grub: (hd0,1)
So there are two example that the Easybcd, Add Entry, either Linux or Neogrub method,
both use the grub method to display partition information. The Linux method uses Bootpart.
I disagree. The 14 GB Linux partition on the first drive would be called (hd0,4) by GRUB because it is the first logical partition in an extended partition. Logical partitions are always given partition numbers starting with 5 by the Linux operating system (e.g., /dev/sda5 in the present example).

Conclusion

This has become extremely difficult to follow. Many words. Tangled. But still interesting. Nevertheless, I believe I have managed to demonstrate one place where you have made a numbering error in your thinking. Therefore, I can stop here for now, having strengthened the plausibility (IMO) of this point suggested earlier...
Quote:
Originally Posted by stoat in post #13
Quote:
Originally Posted by techtonic

...the Linux boot fails with a standard bootpart error (I've only seen one). I've only seen that error message when either the wrong partition is chosen (not the case here)...
Maybe you only think it is not the case.

Last edited by stoat; 30th December 2008 at 04:23 PM.
Reply With Quote
Reply

Tags
boot, dual, fedora, howto, ntloader, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a dual-boot (dual boot) with Windows XP Home Edition and Fedora Core 5: Genecks Guides & Solutions (No Questions) 5 18th October 2011 02:05 PM
Windows XP & Fedora 11 dual-boot problem (using Windows bootloader) zmdmw52 Installation, Upgrades and Live Media 7 9th August 2009 08:29 AM
How do i do a dual boot with fedora 10 and windows xp? tootal2 Using Fedora 1 1st December 2008 02:51 AM
Howto: Windows in Fedora with Vmware Server on dual boot laptop. wneumann Guides & Solutions (No Questions) 3 30th October 2006 08:03 PM
FC3 test2 dual boot winxp NTLOADER help hijack784 Fedora Core 3 Test Releases 4 27th September 2004 08:10 AM


Current GMT-time: 22:02 (Tuesday, 25-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Bourges - Vettur Travel Photos on Instagram - Round Lake Beach