LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-27-2010, 12:52 AM   #46
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,332

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407

(hd0,2) in Grub2 is equivalent to sda2, you are correct.

You indicated you have windows 7. There is not boot.ini file in either vista or windows 7, they use a different bootloader.

Have you checked the two sites I suggested earlier, they have a lot of good info and microsoft seems like a good place to get information on windows.
 
Old 07-27-2010, 03:43 AM   #47
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I have advised hiding your sda1 but you have deleted it. This will not work in a Xp but should be OK with a Win7.

boot.ini is only used in Xp/Win2k.

These are the 4 essential steps to boot up a Win7

(1) The partition must be marked active. It should remain so if you haven't changed it. In any event you can use Grub2 to report this by
Code:
parttool (hd0,2) boot
if it isn't active you can make it active by
Code:
parttool (hd0,2) boot+
(2) Win7 must be booted by bootmgr which can only be loaded by a boot sector code inside the Win7 partition. This boot sector code is called /nt60 and restorable only booting up a Vista/Win7 installation DVD (same 32-bit or same 64-bit) with the command prompt command
Code:
bootsect /nt60 c:
(3) Win7 is booted by a partition GUID reference. Unlike Xp and Grub which have a text file for configuring the boot menu Win7/Vista uses a binary file editable by "bcdedit" or by third party software EasyBCD. If you do not know how to use BCDedit then try rebuild it in a command prompt off a booted installation DVD
Code:
bootrec /rebuildbcd
The entries of bootmgr can be checked by command
Code:
bcdedit /enum
(4) The Win7 shares the same MBR with Vista but different from the previous MS Windows. It is restorable by command
Code:
bootrec /fixmbr
If you boot it with Grub2 this step is unnecessary. However if you want Win7 to be booted by its own boot loader then execute this step too.
 
Old 07-27-2010, 04:19 AM   #48
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
Quote:
Originally Posted by saikee View Post
(4) The Win7 shares the same MBR with Vista but different from the previous MS Windows. It is restorable by command
Code:
bootrec /fixmbr
If you boot it with Grub2 this step is unnecessary. However if you want Win7 to be booted by its own boot loader then execute this step too.
Uhm .. I'm not ENTIRELY sure about this but I assume this will render any other system unbootable unless it is booted from some external media .. so, @OP, be careful whether you REALLY want to try this.

For the other points -- nice overview I already started hating BCD when I wanted to boot win2k8r2 in testmode by default
 
Old 07-27-2010, 06:33 AM   #49
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
zirias,

Win7 boot loader can be used to boot Linux too. I have it done with 150 Linux systems. Compare with Grub the Win7/Vista boot loader "bootmgr" needs 2 to 3 times more work to multi-boot.

I stated if OP uses Grub2 to boot the Win7 the step to restore Win7's MBR is unnecessary.

The difference of booting a Win7 by its own boot loader bootmgr and by Grub2 boils down only to which MBR is selected.

Grub2 can never boot a Win7. It only boots its boot loader "bootmgr". It is always MS Windows' own boot loader that boots up the Windows. The "chainloader +1" is to load the Win7's boot sector code at the "+1" position (less the first sector of 512 bytes). It is the boot sector code "/nt60" that place bootmgr into memory.

Last edited by saikee; 07-27-2010 at 06:40 AM.
 
Old 07-27-2010, 06:40 AM   #50
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
See, I know all the things starting from your 3rd paragraph -- BUT i never tried using windows' boot loader to load linux (probably through a grub installed in a partition's boot sector?). I guess this doesn't really work "out-of-the-box", does it?
 
Old 07-27-2010, 07:08 AM   #51
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
This is just my own observation/opinion.

M$ does not officially support Linux but its boot loader NTLDR (for Win2k and Xp) and boomgr (for Vista and Win7) have been designed to multi-boot other PC operating systems.

Since MS Windows do not support Linux they will not mount a Linux partition (unless a third party driver is used) and their boot loaders are too proud (or lack the intelligence) to come out to read a Linux partition to arrange the multi-boot.

Therefore the standard way a MS Windows, for both NTLDR and bootmgr, to boot other system is to demand the user to deliver on a plate to their "C" drive the first sector in a file from the partition of the operating system that needs to be multi-booted.

Both NTLDR and bootmgr can then chainload to the operating system from its first sector. This is exactly the standard technique used by the Linux’s Grub and Lilo to “chainload” another boot loader.

NTLDR uses a static screen and like Lilo can dispplay a maximum of 10 operating systems. More can be specified in the configuration file boot.ini (same for Lilo's /etc/lilo.conf) but the since 10+ systems cannot be displayed so there no means to fire them up.

bootmgr follows Grub by having a scrolling screen so it has no limit on the number of operating systems it can boot.

As bootmgr is a terminal program so one can write a batch file (equivalent to a script file in Linux) to configure it to boot a large number of operating systems.

Every operating system must have programs and utilities to put right its boot loader and MS’s NTLDR and bootmgr are no different to Linux’s Grub and Lilo. Grub happens to be the simplest to understand, the easiest to work and has some superior features not found in other boot loaders. Here are some of features of Grub:

(1) Able to be installed on its own as a stand alone system.

(2) Able to install and boot from every media of floppy, CD, DVD, internal hard disk, external hard disk or flash drive.

(3) Can co-exist with MS boot loaders in the same partition (have to be Fat16 or Fat32 for Grub1 but Grub2 can read nfts partitions so it can be housed inside a MS Windows). I have Grub2 installed inside a Xp.

(4) Can boot up any installed PC system "manually".

(5) Grub1 and Grub2 can interchanged with each other during booting.

If for any reason a MS Windows cannot be fired up by Grub then a logical step forward is to revert back to its own boot loader.

Last edited by saikee; 07-27-2010 at 07:31 AM.
 
Old 07-27-2010, 05:10 PM   #52
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Original Poster
Rep: Reputation: 17
well guys i will try it when i can i have to drive like 10 miles to get there so its hard to find the time...
 
Old 07-28-2010, 01:30 PM   #53
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Original Poster
Rep: Reputation: 17
sakiee i receved a error on the bootrec /rebuildbcd
it said that it found 0 windows installations and that the operation completed successfully
 
Old 07-28-2010, 01:30 PM   #54
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Original Poster
Rep: Reputation: 17
sakiee i receved a error on the bootrec /rebuildbcd
it said that it found 0 windows installations and that the operation completed successfully
 
Old 07-28-2010, 01:40 PM   #55
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Can you post here the result of
Code:
bcdedit /enum
It may mean no more new Windows found and your existing Windows BCD is satisfactory and error free. The "bcdedit /enum" should confirm it.

Also you can rebuild the BCD by bcdedit alone but it is harder. However many steps are explained if you know how to use help. The standard way is to add /? after the command like
Code:
bcdedit /?

Last edited by saikee; 07-28-2010 at 01:43 PM.
 
Old 07-28-2010, 10:30 PM   #56
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Original Poster
Rep: Reputation: 17
it says that
identifer {bootmgr}
device parition=C:
path \bootmgr
description windows boot manager
locale en-us
default {default}
displayorder {default}
timeout 30

windows boot loader
identifer {default}
device parition=C:
path \windows\system32\winload.exe
description windwos 7 professional (revocered
locale en-us
recoverysequence{a587d2fd-99429-11df-bfe6-b07a7144dd2c}
recoveryenabled yes
osdevice parition=C:
systemroot \windows
 
Old 07-29-2010, 05:01 AM   #57
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
animeman,

If the existing BCD doesn't work the only course of action is to recreate a new one but you must rename the existing file as follow, after boot up Win7 installation DVD to "Repair" and in Command prompt
Code:
bcdedit /export c:\BCD_data_backup
c:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
bootrec /rebuildbcd
The above forces the system to have a complete new BCD rebuilt.
 
Old 08-03-2010, 04:54 PM   #58
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Original Poster
Rep: Reputation: 17
well sorry sakiee but that dident work...... i have no clue what is wrong perhaps i should just reinstall.... though then if i do i cant boot into linux...
 
Old 08-03-2010, 05:11 PM   #59
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Since this thread I have attempted successfully in putting Grub2, on its own and without a Linux, inside every MS Windows that I have got. Grub2 can read a NTFS partition whereas Grub1 can't.

In so doing I installed a Win7 in a disk of its own during the trial and found Win7's installer insisted of having a Windows reserved partition of some 13 cylinders or 100Mb large, exactly the same as your sda1. The actual Win7 is in the second partition. sda1 has the boot loader inside and it is sda1 that Grub should boot to.

The Windows reserved partition can only be omitted if you pre-format the partition in NTFS and present it to the Win7 installer, thereby forcing it as the only choice for installation.
 
Old 08-04-2010, 05:23 PM   #60
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Original Poster
Rep: Reputation: 17
ok i get this but i removed that parition so when i tryed to fix it it may have made it agan or no?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot Class Project Failed prsnrs Linux - Newbie 2 03-19-2010 04:49 PM
I failed at dual booting Fedora and Windows XP on an Aspire One ao751h. Please help? This is my username Linux - General 2 02-02-2010 05:28 AM
ASUS BIOS hardware monitor failed when using dual boot SuSE 9.2 + Windows XP nguyennh Linux - General 3 02-22-2006 08:26 PM
Dual Boot XP/RH8 autoconfig failed Nimbus Linux - Newbie 2 12-15-2004 01:27 PM
Kernel panic after dual-boot XP drive failed phoenixdbq Linux - Newbie 7 02-05-2004 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration