# Operating Systems's



## godsownman (Jul 8, 2005)

I have recently connected a 2nd HDD and loaded Linux on it. After loading linux on it I faced a problem.

The problem is that this particular HDD is too be used on more than 1 computer.

But what happens is that when it is disconnected I cannot load windows also. But on reconnecting it I can load any one.

I get an error " GRUB boot loader error " !

What I feel is the problem is that since I loaded linux after I loaded windows the MBR file got rewritten and now for that reason I need to have the 2nd hdd connected, to it even to start my computer and work in the windows environment.

I know this may sound a bit confusing but what I want to say is that when the 2nd HDD is connected I can choose which OS I want to load. BUT with the HDD disconnected I cannot work on the computer at all. The error I get is LIKE the 'BSOD' ( blue screen of death) but its not a blue screen.

Can somebody please help me.

What I feel the 2 solutions are 

 Either I load windows after 	I load the Linux OS 

 Somebody please tell me how to instruct the comp to load windows by default without my intervention.


Thanks for the patience and the solution.


----------



## siriusb (Jul 8, 2005)

You got the problem right, alright. But installing windows after u install linux is not an option. Windows is deliberately made stupid so that it don't care what bootloader is in the mbr.
One solution that I know of is to run "fixmbr". Then, either, u can resinstall linux and ask it to install boot information only it's partition. Or use a linux boot floppy to boot into linux from then on.


----------



## godsownman (Jul 9, 2005)

how should I boot to linux using a floppy.

And in that case how am i supposed to use my comp.

Please somebody help .

When I installed linux it asked me if it should write in the MBR.

Suppose I say no then what will be the outcome.


----------



## ujjwal (Jul 9, 2005)

Basically GRUB (which is the linux boot loader) has a portion of itself located on your linux partition (which is on the 2nd hard disk), so when you transfer the hard disk, you are not able to start GRUB.

What you can do is to use the Windows loader to start grub, instead of the other way round, so you can load windows even when the hard disk has been taken to the other computer. Check the 2nd page of the Linux Tips & Tricks thread in the Open Source for info. You could also create a GRUB boot floppy to carry around with which to load your OS. Check this for info -

*www.gnu.org/software/grub/manual/html_node/Creating-a-GRUB-boot-floppy.html


----------



## godsownman (Jul 9, 2005)

Please tell me any other method of working any simpler method.

Can I not edit the MBR .

Can somebody please help me with that.


siriusb,

you told me to use "fixmbr"  how does one use it.

If it is to be used in CMD it does not work.


----------



## King_Niral (Jul 10, 2005)

*That's it. I am putting you on a warning for a month.In the meantime, if you ever advertise your forums even once, I will ban you for good.*

*ctrl_alt_del*


----------



## ujjwal (Jul 10, 2005)

You should boot into your Windows XP cd (assuming that version of windows), select recovery console, and type "fixmbr".


----------



## godsownman (Jul 10, 2005)

Instead of selecting the MBR if I select the 1st boot record of the partition will it make a major difference to my computer.

Will it solve my problem and will i have the choice of loading Windows or Linux as an when I wish .

And most of all ,

be able to remove the HDD where linux is loaded without upsetting the windows installation.


----------



## ujjwal (Jul 10, 2005)

Allright, first as you wanted more info about fixmbr, have a look at this link. Now, using fixmbr will erase the linux boot loader from the master boot record, so for now you will not be able to boot into linux. But you can make the windows XP loader boot linux (check first post), and as no portion of the Windows boot loader resides on the second hard disk, there should not be a problem.


----------



## godsownman (Jul 11, 2005)

ujjwal said:
			
		

> What you can do is to use the Windows loader to start grub, instead of the other way round, so you can load windows even when the hard disk has been taken to the other computer. Check the 2nd page of the Linux Tips & Tricks thread in the Open Source for info. You could also create a GRUB boot floppy to carry around with which to load your OS. Check this for info -
> 
> *www.gnu.org/software/grub/manual/html_node/Creating-a-GRUB-boot-floppy.html



Ujjwal, 

sorry to bother you but can you please give me the exact link to that topic. 

I cant seem to find it.

Please.


----------



## godsownman (Jul 11, 2005)

I found this is it this ior is it another one.

What does he mean by the first line ,

"For all those who do not want to install both windows and linux but do not want to overwrite their windows MBR."



			
				amol_dan said:
			
		

> For all those who do not want to install both windows and linux but do not want to overwrite their windows MBR.
> 
> This trick can help a bit provided you have windows 2k or XP
> 
> ...


----------



## godsownman (Jul 12, 2005)

Please somebody Help me out of this problem


----------



## kalpik (Jul 12, 2005)

Try this link: *wiki.ubuntu.com//WindowsDualBootHowTo

I guess you are using Ubuntu Linux. Well even if u arnt, the trick works for other distros too!


----------



## ujjwal (Jul 12, 2005)

Hi,

That line means that this guide is intended for those who want to use their Windows boot loader, and not any other, to dual boot linux & windows.

By the way, which parts of the guide are you facing problems with?


----------



## godsownman (Jul 12, 2005)

Type this command.

dd if=/dev/<drive where boot loader is istalled> of=bootsect.lnx bs=512 count=1

e.g.

dd if=/dev/hda3 of=bootsect.lnx bs=512 count=1 



This is the line that confuses me .

This is to be after I load Ubuntu right cause I have already loaded Ubuntu and I dont want to do it again.

After I do these steps what will I actually achieve.

Thanks.,

Also there is another option of not writtitng the MBR and writing the boot loader on the 1st sector of the partition. 

By doing this what will I achive will I be able to load any OS as an when I wish and also remove the HDD when ever reqd.

Thanks a lot and sorry to bother you all repeatedly.


----------



## ujjwal (Jul 13, 2005)

You don't need to run the installation process again, but you need to install grub again on the /boot or / partitition. If the partition is, say, /dev/hdb1, you can run


```
grub-install /dev/hdb1
```

To find out which is the partition you need, type "mount" and check where /boot or / is mounted.

Now, you can use dd to copy the boot loader to a file, as mentioned by the guide.


----------



## godsownman (Jul 13, 2005)

thansk Ujjwal I am trying it out now.


----------



## godsownman (Jul 13, 2005)

Ujjwal will doing this enable me to remove the HDD and also will it  remove whatever it added to the MBR.

Do I need to repair the MBR after that.


----------



## hafees (Jul 14, 2005)

> I have recently connected a 2nd HDD and loaded Linux on it. After loading linux on it I faced a problem.
> 
> The problem is that this particular HDD is too be used on more than 1 computer.
> 
> ...



I think you have made your /boot partition in the other drive(the drive that u disconnected). In the /boot partition is where grub is installed. The MBR tries to call grub but it will  not be there if u remove the other hard drive and will result in the error u just described. 
The solution is make  /boot partition in the drive that u use permanently. 
To create a /boot mount point, first create some freespace on ur 1 st hard disk  ( by 1st i mean the disk you use regularly). preferably from the begining of disk space (u can use partition magic to get some free space by moving ur first partition. All you need is a 15 MB (minimum) or 75 MB (recommended) free space. when u install linux, instead of auto partition assign mount points manually. and make this free space ( the 15 MB space in the begining of ur hard disk - I said beginning coz, it may not be bootable if ur free space is after  the first 8 GB. This is a limitation that many bios have) as ur /boot mount point. You are free to create other mount points (like /, /home, linux swap etc) in any other drives. By doing so, grub will be installed in the 1 st drive. So even if u disconnect the 2nd drive grub can work properly. Ofcourse grub will fail if u select an operating system installed in your other drive.

If you want to know more details about installation pls ask here.


----------



## godsownman (Jul 14, 2005)

Can somebody tell me what will happen if I was to disconnect the 1st HDD and then load Linux will my problem be solved. 

Will I be able to remove the HDD.

Thanks


----------

