Unable to boot into windows without linux!

I installed openSUSE 11.0 on a portable hard drive along with GRUB. So now I can access both Windows (on my laptop) and openSUSE (on my portable drive). But when I disconnect the drive’s usb line, separating the drive from the laptop, and start the computer, I get a GRUB error 17 or 21, and can’t boot into windows unless I reconnect the openSUSE drive and reboot. When I reconnect the drive and reboot, I can access both openSUSE and Windows through the GRUB interface. But I want my drive to be portable and my laptop not dependant on the drive, so I can access Windows any time I want and openSUSE when I plug the drive in. How do I go about doing this?

The reason: Grub code was written to the Master Boot Record (MBR) of the first drive. That code points to the grub menu in the second drive. But if it’s not connected it goes nowhere and you get an error of course.

Here are three options:

  • Put a tiny boot partition on drive 1 and transfer the contents of the Linux directory /boot to that partition. The grub menu is in the /boot directory so it will always be available, despite whether drive 2 is connected or not
  • Switch back to booting by using windows bootloader. Put windows code back in the MBR of drive 1. Add the instruction to boot Suse ias an option in the windows bootloader. The windows bootloader resides on drive 1.
  • Use the menu from the bios to choose whether to boot from drive 1 or drive 2 — on my computer it’s the F11 key that makes the menu pop up. Put the Suse bootloader into the MBR of drive 2. Put the windows bootloader into the MBR of drive 1. Select which to boot essentially from thr F11 key (or whatever key it is for you).

This happened because you installed GRUB into the MBR of your laptop’s hard drive, rather than to the root partition of the external drive. Although people with desktops may do this, it’s not a good idea, because once you lose the external hard drive, you end up with the situation you are in.

It can be fixed, though. Check this article on installing to an external hard drive: Installing SuSE on External USB Drive - openSUSE

Looks like I was writing my reply around the same time as you swerdna … oops!

Um, can you write out where and what do I do to edit those options? I forgot to mention I’m a supernoob with linux and wasn’t much of a experienced Windows user.

Well I suppose it should be the easiest. Perhaps a few questions first:
q1: What is the windows – vista, xp?
q2: how many partitions are there on the notebook drive and what are they for, in order from the beginning/first?
q3: would it bother you to put windows back the way it was, so it boots normally, and reinstall Suse on the second drive, using the bios boot key (like my F11), or would you prefer one of the other options?

1.xp
2.three,C,E,F(plus a G:cd/dvd)
3.i think i did just that a while ago. i inserted windows xp installation cd and went to repair and typed fixmbr. now i can boot into windows xp, just cant boot into linux unless i reinstall opensuse. if i can access opensuse whenever i connect the usb hdd then yes i prefer the bios boot key. do u just press a key or do u have to go into bios and change the boot priority everytime u want to boot linux? right now no matter how i change the priority, boot just wont locate linux. help would be appreciated, thx.

The bios boot key thing then goes like this:
You temporarily change the boot sequence in the bios - but only for as long as it takes to reinstall Suse onto the usb drive. Leave it that way during the installation because Suse needs to reboot during the procedure and because Suse will install Grub bootloader to the MBR – and it will be the MBR of the usb drive when the boot order is switched. So that leaves drive 1 untouched/unchanged.

When the installation is finished you put the bios boot sequence back the way it was in the factory - to boot from windows (so you can travel with the notebook). Whenever you want to use Suse you connect the usb drive and press F11 (or whatever it is for you) to boot from it.

Try that

Nope. Doesnt seem to work, i even tried disabling my notebook drive and exclude it from boot, still didnt work. In the installation settings part of the yast installation, the GRUB booting location was written to /dev/sda(MBR), should i change that? My drives are as follows:
/dev/sdb1 linux swap
/dev/sdb2 root partition
/dev/sdb3 home partition
/dev/sda1 windows C
/dev/sda2 windows E
/dev/sda3 windows F

Edit: deleting some bad advice

So I don’t understand. Can you please boot into Suse and open console and enter these two commands and then copy/paste the fdisk dialogue back here:

su
fdisk -l

Thanks

after deleting the partitions on my usb hdd, the “fdisk -l” command shows as follows:

linux:/home/linux/Desktop # fdisk -l
omitting empty partition (5)

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd045d045

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1824 14651248+ c W95 FAT32 (LBA)
/dev/sda2 1825 9729 63496912+ f W95 Ext’d (LBA)
/dev/sda5 4257 6688 19535008+ b W95 FAT32
/dev/sda6 6689 9729 24426801 b W95 FAT32

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xdaa821ee

Device Boot Start End Blocks Id System

I tried setting the GRUB boot location to the root partition and selecting “set active flag in partition table for boot partition” during installation, it all seemed to work well, able to go into windows without usb hdd connecting, until I connect the usb hdd and go into the grub boot menu and select opensuse 11.0. after that i get an error 17 and cant access opensuse. what seems to be wrong?

OK I understand from your fdisk that you need to install Grub code in the MBR of drive 2 (sdb) – But Suse won’t let you. So let’s try to do it by hand:

Now boot off Suse’s install DVD and select from the DVD boot menu to activate “rescue system” and login as root and issue these commands:

grub

grub > root (hd1,1) <-------that’s correct if the root partition is sdb2
grub > setup (hd1) <-------that’s the MBR of drive sdb
grub > quit

Now take out the DVD and boot using the F-key bios menu thing pointing to the usb drive.

PS: In response to the grub command “root(hd1,1)” you must get a statement “Filesystem type is ext2fs, partition type 0x83” – stop if you don’t

can i do it with a cd? or is it only the dvd that has it?

you can do it with a live cd of 11.0. You can boot to the end. Log on (or whatever happens at he end). Opena console.terminal window. Enetr su to become root. Eneter grub. Then test with this command:
find /boot/grub/menu.lst
it should echo this:
(hd1,1)
then away you go with root (hd1,1) and so on.

I tried that. It seemed to work, but when I got to the booting part things went wrong. There were three options to boot from:

1.OpenSUSE 11.0
2.Windows
3.Failsafe OpenSUSE 11.0

When I selected 1 or 3, I got an error message:

root(hd1,1)
Filesystem type unknown, partition 0xf
…(loads of system information)…
Error 17: Cannot mount selected partition

When I selected 2, I got:

rootnoverify(hd1,1)
chainloader(hd0,0)+1
Error 13: Invalid or unsupported executable format

After disconnecting the usb HDD, I can boot into Windows successfully. But I can’t access openSUSE or access anything at all with GRUB bootloader.

What seems to be wrong?

I’m at end of my ideas. We’ve tried the repair from opensuse.org and other common tweaks. Can you retrieve and post here the contents of menu.lst and device.map, located respectively at /boot/grub/menu.lst and /boot/grub/device.map? In the meantime some drive-by viewer might see the problem – and I’ll PM to mingus725 for opinions.

@Crypterion, I set up a use case on my test box to exactly replicate your system, i.e., internal with Windows and USB external. Have installed and got it booting with the bios switch, but the grub setup is not right so I’d rather not post what I did even though it worked. 2am here; let me work it tomorrow and sort out grub’s confusion. Will then post correct solution.

I am not sure one gets the opportunity during install, but my memory tells me that somewhere in the install process one is asked to check how GRUB should be installed. One can then change the menu, but I thought that also the disk where to put the MBR can be chosen. If that is the case you should take the ‘external’ for that.

If that is not the case (or in the situation you are now), you could try the following:

  1. Use the rescue DVD to start GRUB and write an MBR with the right contents to ‘external’. by typing in GRUB:
root (hd1,1)
setup (hd1)
quit
  1. Use an XP rescue to restore the MBR on ‘internal’.

And think about the following:
An ‘external disk’ says only something about the fact that it is not encased in the same box as an ‘internal disk’. This does not mean that disconnecting it (although much easier done fysicaly) is different to the software you use than the removal of any other disk.

hcw, I did try that during the above posts, it didn’t work, and for the results you can check those posts. I suppose it does work, just not on my laptop. I have a BenQ Joybook with duo core.

By the way, thanks for all the help you guys. I can’t express my gratitude. If it interferes with your time or my problem simply just can’t be solved because of my laptop, then don’t try. It would be better to put time on something else than rescue a dead system.

But if it could be helped, is it possible put openSUSE to windows bootloader and boot with it? If so, can any one tell me the instructions? thanks.

Hope this helps:
Boot Multiboot openSUSE Windows (2000, XP, Vista - any mix) with Windows bootloader.