Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Boot.ini DualBoot Win/Lin


ghost's Avatar
0 0

OK, here's my problem. I have WinXP installed on /dev/hda1 and Xubuntu on /dev/hdb1. What do I need to do to get Linux to boot from hard drive? The LiveCD will "Boot from 1st hard disk", which (unfortunately) is /dev/hda, meaning it will boot Windows but not Linux, as they are two separate drives. Can I modify the windows boot.ini so that it will load LiLo? I'm sure there's a solution here, but I really have no idea what to do.

Any help is appreciated, thanks so much!

If it's important, it's a BIOS from Gateway, meaning it's totally useless because it lacks manual user modifications… e.g. it will autoboot from CD but won't let me pick which disk to boot from, it just defaults straight to the hdd with XP on it.

Thanks! Thors


ghost's Avatar
0 0

alright, thanks, I'll give it a look. I've been trying to reconfig Grub to recognize windows, but I don't think that'll do anything since it's on a slave and I can't boot into it anyway… mebbe this will be what I'm looking for…


ghost's Avatar
0 0

yeah I think the idea is that you configure grub to boot linux, and then have the windows bootloader (through boot.ini) run grub if I understand it correctly.


ghost's Avatar
0 0

I really don't understand this very well… Curse you micro$oft… OK, so this is what I have and what I think I'm supposed to do so far:

I have Windows on /dev/hda1 I have second partition on /dev/hda5 I have Linux on /dev/hdb1

I'm doing all my Linux stuff through a DamnSmallLinux LiveCD. I CANNOT boot into Xubuntu from hard drive, even when I use the CD for it. It just takes me back to Windows's NTLDR.

so… I need Grub on /dev/hda1? or is it hda5? I need /boot on one of those, though, right? Install Grub in /boot <– No idea what I'm doing here… I'm probably not being very coherent now… I honestly have no idea what to do. When I use df /boot does not show up as being mounted, since I am not running from hard drive…

I am just going in circles, I think. What do I need to do to change the location of /boot, and generally what will I have to do to dual-boot? Surely somebody knows more about this; despite my sig, I am not a Linux guru (yet.)


ghost's Avatar
0 0

g2g to bed now… and check out the full lunar eclipse at about 3:30AM GST-5 (if you're in America anyway)

My other post for help is at http://ubuntuforums.org/showthread.php?p=3265667#post3265667

Sigh… I'm thinking of just reinstalling everything (only took about 20 min per OS) on the same HDD… Doesn't help that I had 2 AP classes and physics back to back today lol


ghost's Avatar
0 0

hmm it looks like this is what you need to do (you'll need to be in DSL):

if you have a floppy drive, put a floppy in and mount it. otherwise you'll need to substitute /mnt/floppy/linux.bin with /home/yourname/linux.bin or something easy to remember and copy it from windows with an ext3 reader (they're easy to find, just google for one) now run: markupdd if=[boot partition] of=/mnt/floppy/linux.bin bs=512 count=1

where [boot partition] is probably /dev/hdb2 (linux is on hdb for you, boot is usually the 2nd partition I think). to find out for sure which partition is your boot partition run the command df and on the "mounted on" column find "/root". the "filesystem" on that row is what you want to put there.

(in case you're wondering, dd copies a given input file (if=input file) to a given output file and takes care of converting it)

ok, so far we have our linux boot partition on a binary file on the floppy disk. now we need to get that into windows, so boot into windows and copy it to your root dir or someplace where you know where it is. now run notepad c:\boot.ini to edit boot.ini and paste this in it: markupc:&#92;linux.bin=&quot;Linux&quot;

this tells windows that you want another boot option and when you start windows you'll see a list with 2 possibilities, winxp and linux. if you select linux windows runs linux.bin, which tells the computer how to boot linux (remember we took it directly from linux so it should know what to do with it)

hope that helps, I basically summarized the page in that link I gave you. good luck and let me know if it doesn't work. I'm no expert here but I've spent enough hours messing around with this stuff that I may be able to help you out. :p

edit: if that doesn't work you could try overwriting the MBR on the whole hard drive by booting into DSL and installing grub from there through the command "grub". but I'd try the first way first.

heh, I doubt I'll be getting up at 4:30 (my time)…sounds kinda cool though.


mido's Avatar
Member
0 0

…GRUB?


ghost's Avatar
0 0

The very first bytes of HD show the BIOS of the computer where to start. This is so called MBR and you cannot see it in normal way. When you have Windows installed the first drive is usually C:\ so Windows MBR is located at the beginning of C:\ (not shown by Win anyway). When you have Linux installed MBR is at the beginning of the drive again and the first partition is usually / or /boot (again MBR is not visible). One drive has only one MBR , and the computer starts the MBR of the first drive. Having two drives one solution is to change the order of HD's in BIOS if it is possible, then if you swap your first with the second in BIOS now you will have system booting from the second drive. That may not work with every BIOS though, and with every boot you will have to set the order in BIOS.

The second solution. Windows installed on first drive. The idea is to overwrite oryginal win MBR with the linux one. DSL or SLAX based distros use lilo bootloader and is difficult , so I suggest grub that goes with Ubuntu so you need Xubuntu install CD from which you can reinstall or repair system. When you install any new linux distro at some moment of installation it ask you whereabout to install and after choosing custom or expert installation you have the choice of: install Linux on /hdb write grub to MBR ( that is on /hda first drive)

Now when the computer starts it goes to the beginning of the first HD where is linux MBR redirecting to /boot that is on the second one. You should have a choice screen and if there is no windows here edit the file menu.lst in /boot at the end after the lines xubuntu write title Windows root (hd0,0) makeactive chainloader +1 that will add windows option to the booting screen.

Yeah, that sounds complicated, but who said the life is easy ? :) [[What's with everyone leaving whitespace everywhereQ?]] –richo


ghost's Avatar
0 0

You boot your linux thru a linux bootdisk to get to your linux part, then you make a image file from the first 512bytes of your harddrive(mbr), afterwards you do as the others told you to. If you need further help, Google "Dual-boot Linux Windows XP NTLDR" NTLDR is Windows built in boot loader (NTLoader), good luck man, adn if you need further help with it contact me on MSN, i done the procedure a couple of times now ;)a


richohealey's Avatar
Python Ninja
0 0

root_op wrote: You boot your linux thru a linux bootdisk to get to your linux part, then you make a image file from the first 512bytes of your harddrive(mbr), afterwards you do as the others told you to. If you need further help, Google "Dual-boot Linux Windows XP NTLDR" NTLDR is Windows built in boot loader (NTLoader), good luck man, adn if you need further help with it contact me on MSN, i done the procedure a couple of times now ;)a

Actually the /boot partition is NOT the mbr.. the mbr is the first few blocks on the hdd, and you use the mbr to point to the /boot partition.


mido's Avatar
Member
0 0

richohealey wrote: Actually the /boot partition is NOT the mbr.. the mbr is the first few blocks on the hdd, and you use the mbr to point to the /boot partition. Yes, Mbr (Master Boot Record) == Partition sector. Its just 512-byte boot sector (its the first sector or sector "0") for bootstrapping operating systems.

http://en.wikipedia.org/wiki/Mbr http://www.xs4all.nl/~lennartb/bootloaders/

And for "Boot from 1st hard disk" : No. It boots from the drive that is activated, or contains system. Example : If I have H.D.D ( C:, D:, E: ), and installed windows system is on D: drive. It *will *load from D:, but not C: (as it is the first(primary) partition).

Edit : Damn smilies!


ghost's Avatar
0 0

Ok, my bad, i missunderstood a couple of things xD, But here is all commands etc:

mount /dev/? /mnt/storage (mount your floppy disk, or whatever)

dd if=/dev/hda2 of=grub.mbr bs=512 count=1

cp grub.mbr /mnt/storage (copy grub.mbr to your !Whatever!)

umount /dev/? (un-mount the floppy, if required)

Then copy the grub.mbr to your Windows HDD And in boot.ini in windows:

C:\grub.mbr="Linux"

Also everything depends on wheter you actually installed a boot loader or if you maybe didnt have any choice, but as i installed Fedora Core 6 with my other OSes i made the misstake choose not to install boot loader :/, that made another couple of hours work.. Once again, good luck m8:D


ghost's Avatar
0 0

Also, forgot one thing, as i said before you need a linux boot disk, i think maybe u can use DSL for this, and from tehre make the boot sector image, or you activate the Linux HDD, either one of em should work^^


ghost's Avatar
0 0

ThorsDecree wrote: OK, here's my problem. I have WinXP installed on /dev/hda1 and Xubuntu on /dev/hdb1. What do I need to do to get Linux to boot from hard drive? The LiveCD will "Boot from 1st hard disk", which (unfortunately) is /dev/hda, meaning it will boot Windows but not Linux, as they are two separate drives. Can I modify the windows boot.ini so that it will load LiLo? I'm sure there's a solution here, but I really have no idea what to do.

If you have Xubuntu installed and it won't give you the chance to load Linux, then you probably didn't install Lilo, or it isn't configured correctly. You don't have to do anything to the Windows boot.ini unless you are dual-booting multiple versions of Windows; boot.ini doesn't have anything to do with Linux. Lilo should be installed in the MBR, and it will handle your Linux vs. Windows boot options before boot.ini is even read.

Any help is appreciated, thanks so much!

You're welcome. :happy:

If it's important, it's a BIOS from Gateway, meaning it's totally useless because it lacks manual user modifications… e.g. it will autoboot from CD but won't let me pick which disk to boot from, it just defaults straight to the hdd with XP on it.

Well, for starters, the BIOS "from Gateway" is not "totally useless". It's a standard PhoenixBIOS and, if it was useless, then most of the motherboards currently in use today would be, too.

That being said, "autoboot" from CD is controlled by the boot order, which can usually be found under "Advanced Settings" in your BIOS settings; since your CD drive comes before your HDD in the boot order, your system will "autoboot" from a CD when applicable (and skip to the HDD when no CD is available).

If you had two or more physical HDDs, then you could choose which HDD to boot from within the BIOS; granted, it probably wouldn't take care of your problem, but the option would be there. The BIOS will only see separate drives; it does not recognize separate partitions as boot devices.

So, basically, you either need to reinstall Lilo to the MBR, reinstall Xubuntu, or install Grub instead. My personal preference is Grub, but that's because it's what I'm most familiar with.


ghost's Avatar
0 0

thx eveyone, I'll try this after I get done with dinner

The eclipse was SWEEET!

and zephyr: the Gateway bios is more useless than you think; there is no device-select option for booting, it autodetects a CD then boots from primary master

I'll follow up with anything if it works, g2g now tho. Thanks all!

Looks like, yet again, HBH saves the day!


ghost's Avatar
0 0

ThorsDecree wrote: and zephyr: the Gateway bios is more useless than you think; there is no device-select option for booting, it autodetects a CD then boots from primary master

No, it's not more useless than I think. I work for a company that refurbishes Gateway computers… I know exactly how the BIOS is. There is a device select option on all but the most ancient models (try pressing the F10 function key at the top of your keyboard). And, if your CD is not bootable, then it will find a CD and boot from the first BOOTABLE device, which would be your HDD.

Don't blame the PhoenixBIOS (which, as I already stated, comes on most modern mainboards) for your lack of comprehension of how to properly use it.


ghost's Avatar
0 0

K, I just didn't see anything on the splash screen… All the bios's I've used before used the del key to access the menu, f10 was save settings.

I think I do NOT have a bootloader for Linux atm, anyone wana tell me how to install GRUB?

install /mnt/hdb1/boot/ gave me an error, as did every other logical thing I tried. DSL has an automatic boot floppy maker, but as I don't have internet on the Lin/Win box I can't use that…

I'll see if I can get into the bios screen though, thanks for the f10 tip zephyr, I can't believe I didn't try more stuff, though maybe because it only stays on-screen for about 2 seconds :p


ghost's Avatar
0 0

ThorsDecree wrote: K, I just didn't see anything on the splash screen… All the bios's I've used before used the del key to access the menu, f10 was save settings.

PhoenixBIOS uses F2 for the BIOS menu and F10 to save settings (once in the BIOS menu). However, outside of the BIOS menu, F10 chooses a boot device and F12 chooses to PXE boot (boot from the NIC).

I think I do NOT have a bootloader for Linux atm, anyone wana tell me how to install GRUB?

Since you haven't been able to get into your newly installed system previously, you might as well run the install again to install the bootloader.

I'll see if I can get into the bios screen though, thanks for the f10 tip zephyr, I can't believe I didn't try more stuff, though maybe because it only stays on-screen for about 2 seconds :p

Quit making excuses, and just ask more questions. That's the best way to learn… there's no pride lost in furthering yourself. I have provided you with information on how to get to the BIOS screen. In general, you will either have to press F2 or Delete.


ghost's Avatar
0 0

no, this bios is WEIRD. The only option it displays is press tab for system messages, which displays my setup (with no options to change it) and then prompts for esc to continue booting. Nothing I press on the "gateway" splash screen does anything, the only option is tab, which, again, is a dead end.

Any experience with this oneQ


ghost's Avatar
0 0

ThorsDecree wrote: no, this bios is WEIRD. The only option it displays is press tab for system messages, which displays my setup (with no options to change it) and then prompts for esc to continue booting. Nothing I press on the "gateway" splash screen does anything, the only option is tab, which, again, is a dead end.

Any experience with this oneQ

What model Gateway is it?


ghost's Avatar
0 0

It is a gateway "select" with AMBIOS from 1999. I don't know anything else about the computer model; the bios doesn't say anything and half the system is parts from other computers. It's an amd athlon 650MHz original processor in the thing, if that narrows it down any… AMBIOS date 12/5/99


ghost's Avatar
0 0

Does it still have the original labels on the back? That will tell you the model number. If it doesn't have the original serial label on the back, you can check towards the bottom of the system for another label that will have the model number on it. With it being that old, you probably need a BIOS update, anyways.


ghost's Avatar
0 0

"LP MINI TOWER KAD 650"

I think that maybe this bios is not reading my slave. It did not show any slaves in bios; only primary master (win drive, hda) and primary slave (cd drive)

I'm reinstalling Xubuntu on /dev/hdb1

I'm also trying to make a Grub bootfloppy, I found a few promising articles.


ghost's Avatar
0 0

ThorsDecree wrote: "LP MINI TOWER KAD 650"

I think that maybe this bios is not reading my slave. It did not show any slaves in bios; only primary master (win drive, hda) and primary slave (cd drive)

Oh, yeah, that Gateway's a dinosaur. :p I can't find anything on that model on their website.

Are you sure you have your jumpers set correctly on the master HDD and slave HDD?


ghost's Avatar
0 0

Yes, the 6.4gb hdb is a slave and the 10g hda is a master, I made sure to check that the other night when I was putting it all together :p cuz I didn't have them right once and it took me about 2 hours to figure that out rofl

On a side note, if I don't get it fixed with a GRUB floppy I'll open 'er back up and make sure of the jumpers… No harm checking, except that it takes about 10 minutes and a few ounces of blood to get the darn things out.


ghost's Avatar
0 0

ThorsDecree wrote: On a side note, if I don't get it fixed with a GRUB floppy I'll open 'er back up and make sure of the jumpers… No harm checking, except that it takes about 10 minutes and a few ounces of blood to get the darn things out.

In that case, I would definitely invest 5 bucks in a decent pair of needle-nose pliers. :)


ghost's Avatar
0 0

they don't bend like bio-tools such as my hand… =p

i reinstalled and now i have grub =p

o well, it works now so no matter how I fixed it :p

Although I'm gonna make a GRUB backup floppy just in case this ever happens again lol

I can manually edit the menu.lst file, right?

[edit] Still requires boot disk, but now the boot disk goes to GRUB when I select "boot from hd"

Without boot disk I get "error 21"… but it works, so thats good. I'll just use boot disk every time I boot, like I did before [/edit]

THANKS EVERYONE FOR ALL THE HELP, IT IS GREATLY APPRECIATED


ghost's Avatar
0 0

ThorsDecree wrote: I can manually edit the menu.lst file, right?

As long as you keep the same general structure of the file then, yes, you can manually edit it.