Jump to content
The mkiv Supra Owners Club

Booting dual operating systems??


Chris Wilson

Recommended Posts

I have Win2000 on a pair of SATA drives in Raid 0 format, and Ubuntu Linux on an IDE drive on the cables from the IDE ports on the m/. board. I can boot Windows by setting the m/bopard bios to boot scsi first. I can boot Linux by setting the m/board bios to boot HD0. I would like a more elegant way of doing this. Can I custom write a Windows boot.ini file to "see" the Linux intallation and boot it as a menu option? Currently my boot.ini looks like this, how would you add in Linux? Thanks. If that wouldn't work what SIMPLE options are available please?

 

[boot loader]

timeout=10

default=multi(0)disk(0)rdisk(0)partition(1)\WINNT

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect

Link to comment
Share on other sites

From linux you should just be able to do...

 

dd if=/dev/hda2 of=/root/linux.bin bs=512 count=1

 

Substituting /dev/hda2 for whatever your IDE drive with linux on is, and change the /root/ bit to wherever you want to save the file. This should create a copy of the boot sector.

 

Then copy this file to the root of your C drive and put the following at the end of your boot.ini file.

 

c:\linux.bin="Linux"

 

Should work... I think.

Link to comment
Share on other sites

From linux you should just be able to do...

 

dd if=/dev/hda2 of=/root/linux.bin bs=512 count=1

 

Substituting /dev/hda2 for whatever your IDE drive with linux on is, and change the /root/ bit to wherever you want to save the file. This should create a copy of the boot sector.

 

Then copy this file to the root of your C drive and put the following at the end of your boot.ini file.

 

c:\linux.bin="Linux"

 

Should work... I think.

 

 

Right, firstly, sorry for so many daft questions, but once I get a bee in my bonnet I get pretty wrapped up in something. Having now got Windows 2000 and Ubuntu working, albeit with me changing the m/board bios boot order to boot either one, I am detrmined to add them to Windows boot loader. Now, Thorins way looks the most user friendly, but I can't get the dd lark to work in Linux. I have now got a utility to read Linux files in Windows, can I do anything from the OS I am happy working in? Or do I have to use all this cryptic mumbo jumbo in Linux itself?

 

What I'd really like to do is e-mail the required file to someone that knows ehat the hell they are about, have them do what's necessary, and them e-mail it back to me to put in C:\ :) ;)

 

Is that possible? I can edit boot.ini OK ;)

 

Thanks everyone.

Link to comment
Share on other sites

Don't think you'll be able to get the boot sector off the linux drive from windows but there may be some tool to do it I don't know.

 

Why didn't the dd command work chris? Any error message?

 

If you don't know what your IDE drive is (thinking about it if it's the only IDE drive and a single partition of linux it's probably /dev/hda1) then I think using the df command (disk space free) should list what drive it is.

 

To run the command you'll probably need to be root, as you're using ubuntu try...

 

sudo dd if=/dev/hda1 of=/home/yourusernamehere/linux.bin bs=512 count=1

 

...as one command from a terminal shell (substituting your account name), it should then ask you for a password, just enter your default password and it should save the file in your home folder.

Link to comment
Share on other sites

Hi, thanks for sticking with me on this. I tried this last night, found which drive linux was on, logged on as true root, and created the file on a removable drive. I then booted Windows and copied the file to C:\ I called it linux.bin I rebooted, and the Windows boot loader saw the added string and *something* happened. I got a sort of purply coloured screen with a white flashing - cursor top left. That's it though, no boot. I used the df command to double check i was copying from the right drive and partition, and triple checked it had the boot folder in it. So close.... :)

 

Will the Windows install being on 2 SATA drives in Raid0 and Linux being on an IDE drive matter>

Link to comment
Share on other sites

Will the Windows install being on 2 SATA drives in Raid0 and Linux being on an IDE drive matter>

 

Shouldn't do but I've just thought... When you select to boot from your IDE (linux) drive, your pc probably see's that as the first hard drive (hda1). But then when you swap it round to boot from SATA it will then see that as the first drive and the IDE drive might then be hdc1 or something and so isn't booting properly... maybe.

 

Easiest would probably be to install the grub bootloader onto your SATA drive and confirgure that to boot into windows too... but I've not done that before other than when letting the linux installer do it at install time. I'll have a look later and see if it's easy enough to do, I don't want to trash your master boot record so you can't boot into windows! :D

Link to comment
Share on other sites

What if I copy the file that I copied with the DD command from EVERY drive? Would that work or bugger things? My fear too is corrupting the MBR, although I have made a Windows reapair disk, but i don't know if that will fix a trashed MBR, too??

 

Don't think that would work. The repair disk should fix MBR though.

 

Have a look at this http://tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/proc.html

 

If you set your pc to boot from linux then edit /boot/grub/grub.conf to add a window boot bit in that...

 

title Windows 98

map (hd0,0) (hd0,2)

map (hd0,2) (hd0,0)

rootnoverify (hd0,2)

chainloader +1

 

...the hd0 bits will be different on your pc though, can you post the details of your partitions? ("fdisk -l" as root I think)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. You might also be interested in our Guidelines, Privacy Policy and Terms of Use.