LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   FreeBSD and Win2k Dual Boot problem (https://www.linuxquestions.org/questions/%2Absd-17/freebsd-and-win2k-dual-boot-problem-169355/)

Mega Man X 04-12-2004 08:08 PM

FreeBSD and Win2k Dual Boot problem
 
Hi there!

I've decided to give FreeBSD 5.2.1 a second shot but I'm getting an error trying to boot win2k:

"NTLDR is missing"

I've seen some other threads here with similar problems regarding Fedora, but it did not help in my case. I also looked at a couple of links from google but they only tell how to retore windows boot loader and I don't want that... My partitions looks like this in a 20GB hardrive:

Code:


win_c  *  BSD    unformatted
=====/=/====/==========
5GB    4GB

The unformatted slice I was planning to format later to make a common fat for both OS's. The partition with "*" is swap. During the installation I made sure that win2k partition (fat32) is set as bootable and so is BSD. I can boot FreeBSD without a single problem (and it boots amazingly fast), but when I choose "F1 = DOS" during the boot I got the NTLDR missing error. I can also access win2k partition through BSD without any problems.

There's nothing important on any of those partitions, I'm just testing FreeBSD and Win2k so I can later user FreeBSD in another box. So any suggestions, as crazy as it can be, would be great :D.

Thanks a lot in advance fellows!

EDIT:

Since we are at this, question:

What if booting with win2k CD and choosing fixmbr and/or booting with a win98 boot disk and typing fdisk /mbr does not restore the Windows bootloader? Because I've tried both solutions, and I still the same error, plus I cannot boot into FreeBSD anymore :). So, all questions:

1 - How to restore my boot loader?
2 - How to safely install FreeBSD and still be able to boot both Win2k and BSD?

Thanks!

dkaplowitz 04-12-2004 09:00 PM

Well, the fdisk /mbr wipes the MBR completely, so you'll need a new bootloader installed. I'm not too handy with installing grub from a floppy disk (if it can be done), but I do know there are some other bootloaders out there that you can use to try to salvage your installs. I used one recently, but I forget its name. If I think of it, I'll post it back here.

In the meantime, do you have access to a CD-R? Maybe you can use a http://www.freesbie.org boot disk to get into FreeBSD and fix the boot problems you are having. (You might be able to do it with Knoppix too, but I don't know what their support for FreeBSD filesystems is like).

Good luck,

Dave

Mega Man X 04-12-2004 09:29 PM

Really, really thanks dkaplowitz!

I could manage to fix the MBR, now it boots win2k normally. What I did was, to boot with a win98 boot disk and at the prompt, I did:

A:\ sys c:

That restored the system files. Problem is, it's a win98 boot disk, so I've faced yet another problem :). I could not boot win2k with a win98 boot loader. I fired up Win2k Rescue Mode and fixed the installation. Now it boots fine. Its all a matter to reinstall FreeBSD boot loader again :). I took a look at freesbie, I've never heard of it before, but looks quite sweet :). I will give it a shot too.

Thanks a lot once again mate!

dkaplowitz 04-12-2004 09:33 PM

You should be able to get back into the FreeBSD installation with a good bootloader. I've generally found FreeBSD to be pretty good about working with existing partitions, so good luck getting the dual boot working. I think you'll be happy with FreeBSD...it's an awesome OS. Check out the BSD Forums as well....you can get lots of good help there.

Mega Man X 04-13-2004 11:58 AM

Thanks again dkaplowitz!!!

Well, I still cannot boot FreeBSD. I've tried to make a clean install of both systems, but still the same problem. I then installed grub and either system I try to boot, I get:

Invalid Partition Table

I then played a little around Freebsd's ftp and downloaded two tools, rawrite.exe and fdimage.exe and boot.bin image. I tried to create under Win2k a boot disk with both fdimage and rawrite using boot.bin image. When I use the disk to boot, I surprisingly get:

Invalid Partition Table.

I've two questions though:

1 - Is it possible to create a boot disk, say with grub, that I can use it when I want to boot freeBSD, letting the MBR untouched? I've found some ways to use NTLDR to also boot freeBSD, but it's way to much work. A boot disk would be nice, how do I go by doing it?

2 - I'm planning to download Freesbie. I just wonder if it works like knoppix where we can, if we want, to also install it on the HD?. If so, does it use the same boot manager as FreeBSD (which clearly does not work for me..ghehe)?(I could not find any of those info at their page)

Thanks in advance!

dkaplowitz 04-13-2004 12:46 PM

Yes, you can have a floppy disk that will allow you to choose which OS to boot into, or to just use when you want to boot into whichever OS isn't the default. I've done it before, but it was a very long time ago, so I can't give you instructions. They should be easy to find though.

I don't know Freesbie all too much. You might want to look over their docs. You should have the option to install if you want. I think it's just a stripped down version of FreeBSD.

Sorry I couldn't help more.

Dave

Marble 04-13-2004 12:56 PM

Did you try installing the multiple boot MBR that was offered to you when you were installing FreeBSD? If you can boot into FreeBSD you can type $ sysinstall as root and fix anything that was broken.

I've never used Grub with FreeBSD, but googling it I found lots of comments:
http://geodsoft.com/howto/dualboot/grub.htm
for example...

Mega Man X 04-13-2004 01:06 PM

Thanks a lot dkaplowitz and Marble!!!

I will try to follow that link and try to build grub like that. If it fails, maybe I will stick with a single boot-BSD only or Freesbie to learn FreeBSD :).

Marble 04-13-2004 01:40 PM

I've never had a problem dual booting FreeBSD. I just used the default bootloader (for multi-booting) using FreeBSD. It's ugly, but installing Grub and using a pretty Bootloader is not high on my list at this time...

Keep trying though. I think you will find BSD's are well thought out and easy to understand and the ports system is quite amazing. Kernel is easy to compile, etc... Lots of reasons to give it a try.

Mega Man X 04-13-2004 02:12 PM

Marble, may I ask you something? Could you please post your partitions here ? I mean, there must be me doing something wrong. Did you do a /boot or did you install the boot loader at master boot record. My partitions looks like this:

first slice = win2k/FAT32
second slice = FAT32
third slice = Swap
fourth Slice = FreeBSD. ONLY "/" root partition

I wish I could post my actual df -h, but I cannot go to the internet with that computer :(.

Thanks!

P.S: the boot loader is ugly, but I kinda liked the Daemon made in ASCII, lol :)

Marble 04-13-2004 02:52 PM

The way I partitioned it (80 gig drive):

15 gigs XP - ntfs - installed XP, finished install (actually it was already installed when I decided to put BSD on this box.)

Put in the FreeBSD disc and FreeBSD will put all it's slices on one partition.
No need to make a swap partition outside the bsd partition.

Using FreeBSD's fdisk I just create another 15 gig partition and let the auto defaults slice it up. They are basically the same as I would do it anyways.

Now I install. It will prompt me if I plan on booting another OS. If so I select the FreeBSD multi boot loader (name?).

Install. Nothing more easy than that.

Now when you boot up it won't know what windows is, so it will appear as a ?? instead of windows. You will have to edit the <bootloader>.conf file and edit that in.

You are going to have to write something on the MBR. Or else boot off a floppy every time you boot up.

Mega Man X 04-13-2004 04:12 PM

Thanks again Marble!

Well, I kinda got the feeling that FAT32 as my win2k partition is doing something funny in there. I'm formating it again as NTFS, install everything again and see how it goes :). I will keep you guys posted.

Now, about Freesbie, I've just downloaded and tried it out. Man, that thing is awesome... It works just as slow as Knoppix running from the CD (indeed) but when you startx, by default, it brings up a really amazinly configured XFCE4 environment. Really top notch stuff... Unfortunately, there seems to be not possible to make an HD install as Knoppix, but hey, I really loved that one :)...

Thanks all again!

Mega Man X 04-13-2004 04:26 PM

LOL, no, still no go. I've then installed Win2k, then FreeBSD. This time, win2k is set as NTFS. When I got into the prompt screen to boot:

F1 = ??
F2 = DOS
F3 = FreeBSD

I can boot FreeBSD normally, but when I try to boot win2k I get:

NTLDR is Missing
Press CTRL+ALT+DELETE to restart.

Guess I will have to wait for a while to play a little more with FreeBSD, afterall, I've been installing win2k and freebsd for two days in a row now :). I couldn't possibly be doing anything wrong now, so my wild guess is... there's something incompatible in this machine... either FreeBSD not liking the hard-drive or something...

Thanks for the help guys, I catch ya later if I decide to run only FreeBSD or Freesbie ;).

2damncommon 04-13-2004 10:15 PM

Have you tried using Lilo?
I am NOT booting Win2K, but do have FreeBSD, Solaris, and Windows 98 all booting. Couple Linux distros also.
I am going to keep your 'a:\sys c:' in mind. I have seen this problem mentioned before and hope I never need to know any more about it.

Mega Man X 04-14-2004 02:29 AM

Thanks 2damncommon!

Yeah, I've been googling a lot last night, and it seems to be a more common problem then I thought. Well, anyway, now I'm all set with FreeBSD only in my other machine so I can learn it a little bit. That is going to be good practice, since I could never compile a kernel successfully (shame, I know) and with BSD it's a must, since the sound card driver is not into the kernel by default.

So far, it looks cool. Sure, the first error message that I got: "libutil.so.3 not found" trying to run Blender, I had no idea how to fix(and I still don't, I've tried to enable dri and glx on the XF86Config, but that did not help..ghehe), but I'm working on it. If it was Linux, in few seconds I could find my way, but will take a time to get used to FreeBSD :).

Mega Man X 04-14-2004 02:30 AM

Oh yeah, about your question, I've not tried Lilo(well, yeah, with Slack), but I will take a look at it now. Thanks for the hint ;)

Marble 04-14-2004 03:01 AM

I don't know the source of your problem, but that missing NTLDR is a windows issue.

Mega Man X 04-14-2004 04:27 AM

yup. It seems that FreeBSD, for some reason, is overwriting the windows boot loader (NTLDR). I've found an article in swedish explaining how to boot FreeBSD with Windows XP boot loader NTLDR. That would be really great, since I can choose "none" to FreeBSD's boot loader and let XP/2k to do the job. This, if works with Linux as well, is a great thing in case you need to remove your distribution, say, to try a new one, and is afraid of messing up the boot record as I just did...

I've not tried it myself, since I've removed Win2k. If anyone is interested on the article I can make a rough translation of it.

Thanks again for the replies guys!

Cheers!

Mega Man X 04-15-2004 03:04 PM

Just to let you guys up-to-date, I am dual booting FreeBSD 5.2.1 and Slackware 9.0 without a problem. I've installed first Slack on the first slice and lilo on MBR, then FreeBSD. I even let FreeBSD installs it's boot loader and I can choose either Linux or FreeBSD during boot time... To my astonishment, choosing Linux, calls Lilo, so FreeBSD was not really overwriting the MBR. It really was something weird with Windows 2000 boot loader and FreeBSD... Though, I never had problems with Win2k and Slack, so then again, it was weird :)

itismike 04-25-2004 07:48 AM

I had similar trouble dual-booting win2K and mandrake 10. It was suggested in the boot loader forum here that the boot.ini in the windows root directory needs to be edited. Why I don't really understand...I can't imagine that Linux or GAG would try to edit the file themselves...
-Mike

Mega Man X 05-01-2004 04:33 PM

Thanks itismike!!!

I've not been trying FBSD for a while, been a little busy, so I was not checking this forum Good to know that it was not only me having that issue. Thanks for sharing ;). This is quite weird and interesting actually :). I will try to look at the boot.ini when I install win2k again. Strange...

itismike 05-02-2004 01:56 AM

Your very welcome, Megaman. I sure have learned my lesson. It'll be a cold day in hell before I dual-boot a single hard drive. From now on I'm using a boot floppy to send the boot loader to the other (Linux) partition or maybe I'll try to learn the syntax for Windows boot loader. Grub, LILO and GAG are not welcome on my boot sector!

mrcheeks 05-02-2004 02:52 AM

NTLDR disappearing can be a service pack fault or a virus or something else. a floppy boot disk + a cdrom allows you to copy NTLDR from the cd to the win disk with the expand function if i remember. When i was dual booting freebsd and win i had this problem only once and it was after service pack installation...

Manadien 05-04-2004 12:39 PM

Quote:

Originally posted by Megaman X
LOL, no, still no go. I've then installed Win2k, then FreeBSD. This time, win2k is set as NTFS. When I got into the prompt screen to boot:

F1 = ??
F2 = DOS
F3 = FreeBSD

When you had Win2k did you have it split into two drives (C: and D)? If you did you would need to select F1 to boot into windows. Hitting F2 would have been passing the boot process to your D: drive which would have not had the boot files (boot.ini, ntldr.exe, etc). Also if the D: drive was formatted as FAT32 that is why it shows up as DOS, NTFS paritions usually give you the ?? like in the F1.

rehab junkie 05-16-2004 10:04 PM

From the FreeBSD FAQ: http://www.freebsd.org/doc/en_US.ISO...#NT-BOOTLOADER


9.10. How can I use the NT loader to boot FreeBSD?

The general idea is that you copy the first sector of your native root FreeBSD partition into a file in the DOS/NT partition. Assuming you name that file something like c:\bootsect.bsd (inspired by c:\bootsect.dos), you can then edit the c:\boot.ini file to come up with something like this:
Code:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT"
C:\BOOTSECT.BSD="FreeBSD"
C:\="DOS"

If FreeBSD is installed on the same disk as the NT boot partition simply copy /boot/boot1 to C:\BOOTSECT.BSD. However, if FreeBSD is installed on a different disk /boot/boot1 will not work, /boot/boot0 is needed.

/boot/boot0 needs to be installed using sysinstall by selecting the FreeBSD boot manager on the screen which asks if you wish to use a boot manager. This is because /boot/boot0 has the partition table area filled with NULL characters but sysinstall copies the partition table before copying /boot/boot0 to the MBR.

Warning: Do not simply copy /boot/boot0 instead of /boot/boot1; you will overwrite your partition table and render your computer un-bootable!

When the FreeBSD boot manager runs it records the last OS booted by setting the active flag on the partition table entry for that OS and then writes the whole 512-bytes of itself back to the MBR so if you just copy /boot/boot0 to C:\BOOTSECT.BSD then it writes an empty partition table, with the active flag set on one entry, to the MBR.

rehab junkie 05-16-2004 10:06 PM

From the above it would seem infinitely simpler to use the NT bootloader than FreeBSD's.

rehab junkie 05-18-2004 11:07 PM

Hmm. Out of curiosity I tried shrinking my NTFS W2K partition on a disk to one half, installing FreeBSD 5.2.1-release on the other half, and letting the boot loader decide what to do. It worked first go with no further configuration required.


Now I have a second installation of FreeBSD :rolleyes:

SlackerLX 12-17-2004 12:46 PM

I recommend using GAG v.4 for multiboot. Always warks for me

cyto 12-17-2004 04:58 PM

Hey megamanx. I can't help u, sorry. But i will be watching this thread closely. Because i am going to install in my real pc in few months. Dual boot with windows xp and freebsd 5.3 in my SATA hardrive(250gb). So if u find a solution dont forget to post it here, so it will be useful for other noobs like me. Thanks a lot!

Out of curiousity, R u swedish? Because u said that u will translate swedish webpage if anyone need. Sorry i couldn't resist it.

Cheers.

Mega Man X 12-17-2004 05:30 PM

Hi there cyto! :)

Great to see you sticking with FreeBSD. Well, actually, I never tried dual booting FreeBSD with Win2K again after this (or dual booting FreeBSD with any other OS for that matter). I simply decided to dedicate a machine to FreeBSD exclusively instead(old machine, but still works fine). This thread was possibly the last time I've tried FreeBSD before I gave up. Now I'm back into it again.

I'd love to try dual booting FreeBSD with WinXP to see if the results are different. I might get some time around Xmas or so... hopefully ;).

What I'd recommend you is to backup all your data before installing FreeBSD/WinXP. I don't keep anything important in one of my machines which I use only for testing *nix. It's like a hobby of mine, besides playing games. LOL.

And I really am from Sweden as you guessed, ghehe. I'd ratter fix my profile someday :).

itismike 12-17-2004 05:57 PM

I agree that GAG is a very nice utility, and I use it to boot my second OS, but I am still reluctant to install it on my hard drive after spending days and weeks repairing my system...I just have it on a floppy that sits in my PC until I wish to reboot into the other OS.

My problem from my earlier post which I referred to above turned out to be a bug in the "Anaconda" installer used in various flavors of Linux such as Mandrake, Fedora (core 2 and 3) and a few more. Even installing it on separate drives with nothing written to the windows disk, it gets pooched.

My solution is to physically unplug the windows drive (watch your jumpers) and install Linux. Then reattach the cables and pop a GAG disk in the floppy.

Have fun!

Mike

cyto 12-18-2004 03:33 PM

Quote:

Originally posted by Megaman X
Hi there cyto! :)

Great to see you sticking with FreeBSD. Well, actually, I never tried dual booting FreeBSD with Win2K again after this (or dual booting FreeBSD with any other OS for that matter). I simply decided to dedicate a machine to FreeBSD exclusively instead(old machine, but still works fine). This thread was possibly the last time I've tried FreeBSD before I gave up. Now I'm back into it again.

I'd love to try dual booting FreeBSD with WinXP to see if the results are different. I might get some time around Xmas or so... hopefully ;).

What I'd recommend you is to backup all your data before installing FreeBSD/WinXP. I don't keep anything important in one of my machines which I use only for testing *nix. It's like a hobby of mine, besides playing games. LOL.

And I really am from Sweden as you guessed, ghehe. I'd ratter fix my profile someday :).

I will be somewhere around here(freebsd forum). I test *nix in vmware first and try to learn stuffs. I havent even tried some of the distro in my real workstation. So .. see u later :D

Cheers


All times are GMT -5. The time now is 05:21 AM.