Getting dual boot working with some windows problem

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
macosxp
Level 1
Level 1
Posts: 31
Joined: Fri Aug 15, 2008 2:16 pm

Re: Getting dual boot working with some windows problem

Post by macosxp »

Leppie wrote:
macosxp wrote:Is it really going to be that easy? I haven't seen any grub restore tutorials online that were so simple.
yes, it is that simple. most people are afraid to get their hands dirty with grub2, but it really is powerful and quite easy to use once you get to know it better.
if you don't trust what i say here, check the ubuntu forums (same nick, same avatar, same im contacts, just a different signature :P). i've got some 2000+ posts there, mostly covering grub2.
lol ok, I'll give it a shot, thanks!
Leppie

Re: Getting dual boot working with some windows problem

Post by Leppie »

good luck, let us know how you're progressing
breaker
Level 5
Level 5
Posts: 607
Joined: Sun Mar 16, 2008 5:28 am

Re: Getting dual boot working with some windows problem

Post by breaker »

This is a little too late, but for the record, 10 things you can do when Windows XP won't boot - http://blogs.techrepublic.com.com/10things/?p=348

Except the first thing that should have been mentioned is to do a chkdsk. Also, if you don't know the Administrator password, just mount your Windows drive from Linux, then use the Linux tool chntpw to blank it out(http://pogostick.net/~pnh/ntpasswd/)

Missing hal.dll wouldn't ever be a broken mbr, so good job on the boot.ini fix.

It could have been worse, so it is better to do a full backup including your mbr and boot record, as well as critical system files. The xp boot record consists of the boot sector and if it is a bootable partition, it also uses the next 6 sectors for a total of 7 at the start of the partition. See my signature for more links about how your PC_BIOS based box boots.

breaker
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/
User avatar
viking777
Level 14
Level 14
Posts: 5113
Joined: Mon Dec 01, 2008 11:21 am

Re: Getting dual boot working with some windows problem

Post by viking777 »

Leppie wrote:there's many guides on how to use the xp recovery console, i've never used it so wouldn't be able to tell you what to expect except for that it's most probably a command line interface.

to restore grub2 (i presume you installed Mint Helena), you need the livecd and you need to know which partition your Mint system is in. for this example i'll use the partition most first time users install linux into when dual booting. booting off the livecd, open a terminal and issue the following commands:

Code: Select all

sudo mount /dev/sda5 /mnt
sudo grub-install --recheck --root-directory=/mnt /dev/sda
if Mint is not installed in sda5, amend accordingly. please note that the second line states sda and not sda5, this is not a typo but it indicates the mbr of the first hard drive.

if you do not know which partition Mint is installed into, please download and run the boot info script and post the generated RESULTS.txt.
Well maybe grub 2 only plays nicely for those that believe in it then :?
As an experiment I reinstalled grub 2 to an old computer (containing mint 8 ) at the weekend and your method certainly did not work for me. Not only did I have to chroot into the mounted system but I also had to bind proc, dev and usr before I could install it otherwise I just got various error messages. It worked in the end though(my method not yours). For comparison I also reinstalled grub legacy to the other OS that is installed on this machine - that took a tiny fraction of the time it took to install grub 2.

EDIT. I just tried it again the error it returns is this:
grub-setup: error: Cannot read `/grub/core.img' correctly
This is on a completely fresh install of Mint 8 - nothing that I have been messing around with.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Leppie

Re: Getting dual boot working with some windows problem

Post by Leppie »

viking777 wrote:Well maybe grub 2 only plays nicely for those that believe in it then :?
As an experiment I reinstalled grub 2 to an old computer (containing mint 8 ) at the weekend and your method certainly did not work for me. Not only did I have to chroot into the mounted system but I also had to bind proc, dev and usr before I could install it otherwise I just got various error messages. It worked in the end though(my method not yours).
you can only re-install grub2 into the mbr with the aforementioned technique. i never said you can completely re-install grub2 like that. and if you read my posts both on this forum and the ubuntu forums you will find that what you call your technique is a commonly used routine.
viking777 wrote:For comparison I also reinstalled grub legacy to the other OS that is installed on this machine - that took a tiny fraction of the time it took to install grub 2.
for me, installing and configuring grub legacy would take considerably much more time than it takes me to install grub2 and customize all required scripts to my likings...
viking777 wrote:EDIT. I just tried it again the error it returns is this:
grub-setup: error: Cannot read `/grub/core.img' correctly
This is on a completely fresh install of Mint 8 - nothing that I have been messing around with.
if you could download and run the boot info script as well :P
User avatar
viking777
Level 14
Level 14
Posts: 5113
Joined: Mon Dec 01, 2008 11:21 am

Re: Getting dual boot working with some windows problem

Post by viking777 »

you can only re-install grub2 into the mbr with the aforementioned technique. i never said you can completely re-install grub2 like that.
I am not exactly sure what that means. In the situation that I described grub was installed already (to a partition) and I tried to reinstall it to the same partition. Are you saying that your technique cannot do that, that it MUST install it to the mbr only?
you will find that what you call your technique is a commonly used routine.
Of course it is! I freely admit that I am not clever enough to make up techniques like that. The grammatical device of calling it 'my' technique was simply to distinguish which technique worked for me without having to type too many words!

Lord knows I don't like grub2, but I am trying to learn about it despite that, I hope you can see that.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Leppie

Re: Getting dual boot working with some windows problem

Post by Leppie »

viking777 wrote:Are you saying that your technique cannot do that, that it MUST install it to the mbr only?
no, it can also install into the mbr of a partition. however the following restrictions are in place:
- the partition you want to install grub2 into cannot be mounted OR the partition you want to install grub2 into is a primary partition.
- to install grub2 into a partition, use the command like this:

Code: Select all

sudo grub-install -f /dev/sdXY
viking777 wrote:Lord knows I don't like grub2, but I am trying to learn about it despite that, I hope you can see that.
yes, i've noticed your aversion for grub2. and yes, i've noticed your effort and i do appreciate it ;)
Last edited by Leppie on Tue Feb 23, 2010 3:58 pm, edited 2 times in total.
macosxp
Level 1
Level 1
Posts: 31
Joined: Fri Aug 15, 2008 2:16 pm

Re: Getting dual boot working with some windows problem

Post by macosxp »

Leppie wrote:
viking777 wrote:Are you saying that your technique cannot do that, that it MUST install it to the mbr only?
no, it can also install into the mbr of a partition. however the following restrictions are in place:
- the partition you want to install grub2 into cannot be mounted OR the partition you want to install grub2 into is a primary partition.
- to install grub2 into a partition, use the command like this:

Code: Select all

sudo grub-install -f /dev/sdXY
viking777 wrote:Lord knows I don't like grub2, but I am trying to learn about it despite that, I hope you can see that.
yes, i've noticed your aversion for grub2. and yes, i've noticed your effort and i do appreciate it ;)
Soooooooo..... What I should get out of this disturbing discussion is that I SHOULD still try your code and it will be fine? I've been delaying since XP was needed for some immediate stuff... Will get to your code soon! :mrgreen:
Leppie

Re: Getting dual boot working with some windows problem

Post by Leppie »

macosxp wrote:Soooooooo..... What I should get out of this disturbing discussion is that I SHOULD still try your code and it will be fine? I've been delaying since XP was needed for some immediate stuff... Will get to your code soon! :mrgreen:
yes, those two lines should suffice for you ;)
feed3
Level 4
Level 4
Posts: 435
Joined: Sat Jan 09, 2010 12:52 am

Re: Getting dual boot working with some windows problem

Post by feed3 »

Leppie wrote: no, it can also install into the mbr of a partition.
From my understanding, mbr isn't located at any partition but it is located in front of the first partition on the drive. Or is it already changed and i miss out something new? Just a question of my curiosity though, no other intention or whatsoever. :-)
breaker
Level 5
Level 5
Posts: 607
Joined: Sun Mar 16, 2008 5:28 am

Re: Getting dual boot working with some windows problem

Post by breaker »

feed3 wrote:
Leppie wrote: no, it can also install into the mbr of a partition.
From my understanding, mbr isn't located at any partition but it is located in front of the first partition on the drive. Or is it already changed and i miss out something new? Just a question of my curiosity though, no other intention or whatsoever. :-)
Each partition has a PBR or partition boot record, which is just a MBR but for the partition, and of course doesn't include a partition table. The PBR is just a MBR that is chainloaded from the MBR. So, yes, MBR /dex/sdX PBR /dev/sdXN

http://en.wikipedia.org/wiki/Volume_boot_record
http://en.wikipedia.org/wiki/Master_boot_record

And, especially see the link in my signature for more about PC-BIOS based booting.
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/
feed3
Level 4
Level 4
Posts: 435
Joined: Sat Jan 09, 2010 12:52 am

Re: Getting dual boot working with some windows problem

Post by feed3 »

Yeah, i know bout the PBR, it's just that when people talking about MBR, i'm straight away imagine the MBR of the drive. Seldom i use the terms of "MBR of the partition" and i should note that you are saying the MBR of partition, not the MBR of the drive. Thanks for taking a time to reply. :-)
User avatar
viking777
Level 14
Level 14
Posts: 5113
Joined: Mon Dec 01, 2008 11:21 am

Re: Getting dual boot working with some windows problem

Post by viking777 »

macosxp wrote:
Leppie wrote:
viking777 wrote:Are you saying that your technique cannot do that, that it MUST install it to the mbr only?
no, it can also install into the mbr of a partition. however the following restrictions are in place:
- the partition you want to install grub2 into cannot be mounted OR the partition you want to install grub2 into is a primary partition.
- to install grub2 into a partition, use the command like this:

Code: Select all

sudo grub-install -f /dev/sdXY
viking777 wrote:Lord knows I don't like grub2, but I am trying to learn about it despite that, I hope you can see that.
yes, i've noticed your aversion for grub2. and yes, i've noticed your effort and i do appreciate it ;)
Soooooooo..... What I should get out of this disturbing discussion is that I SHOULD still try your code and it will be fine? I've been delaying since XP was needed for some immediate stuff... Will get to your code soon! :mrgreen:
Leppie,

I think I am hijacking macosxp's thread here so I have continued this discussion elsewhere

http://forums.linuxmint.com/viewtopic.p ... 99&start=0
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Post Reply

Return to “Installation & Boot”