How do I unstick half a Grub?

My machine is caught in an interesting deadlock … help?

I thought it might be interesting to try to install openSuse 11.0 onto a USB stick. (The usual data: Toshiba Satellite, AMD Athlon X2, 2G RAM, 8G stick, 32-bit LiveCD distro). I went through the usual installation menus without difficulty; it saw the USB stick as /dev/sdb1, repartitioned and formatted it, no problem. This laptop’s BIOS has the option to boot from USB, so I told GRUB to go with its defaults on the same drive. We then copied data onto the stick for awhile, and then it came time to reboot.

Up popped the BIOS boot-device menu. I selected USB. Bam! “No Operating System” and halt.

Hmmmm.

I restarted and tried booting up the hard disk, which has Vista on it. To my horror, the words “GRUB 1.5 …” appeared, promptly followed by “Error 21” and halt. What is GRUB doing on the hard disk?!

I restarted and tried selecting CD boot, booting the LiveCD, which is the only thing that works.

I’ve done some exploring at the raw device level. GRUB doesn’t listen really well to what device you would like it to install the loader to. In my case, it went straight for the throat into the hard disk at /dev/hda1 and wrote over the Vista loader.

THIS IS A BUG IN YOUR INSTALLER, SUSE PEOPLE.

Just to make this a bit more surreal, over on the memory stick, there is a /boot/grub area with all the grub stuff – images, stage1 and stage2 loaders, menu.lst to config grub, etc.

The problem is (I think) that when GRUB starts, the machine is at a pretty low level. The memory stick, and the USB sub system, aren’t really initialized for Linux yet, because the frickin’ kernel isn’t even loaded!

So I have half a Grub on my MBR sector that can’t continue a boot.

I have tried and can’t shrink my NTFS partition on the hard disk to make a Linux partition to give to the Gods of Grub to get past this. If I could figure out a way to restore the original Vista partition, I’d do it.

Any ideas would be welcomed. I’m stuck.

– thanks,

Dave Small

Hi Dave, welcome here.
You can reinstall the vista bootloader like so:
Insert the Vista installation disk and proceed to the final screen where you have the option to Repair Your Computer. Select Repair but do not opt for the automatic repair plus restart. Instead select Next and then select the Command Prompt. Enter this:

bootrec.exe /FixMbr

in the console and follow that with the command exit. Then select to reboot.

Maybe you would consider booting Suse from the windows bootloader once you get vista back and the panic subsides. There’s more on that here:
Boot Multiboot openSUSE Windows (2000, XP, Vista - any mix) with Windows bootloader.

Swerdna

Well, Dave, this is a bit of a problem, and the GRUB documentation does go into some detail about how they can get confused about disk drives, and I don’t think they’ve even caught up to the whole bootable USB memory stick business.

After swearing at this for three days, here’s what worked.

I went to the Suse 11.0 System -> Boot Loader configger panel. Thence to the second “tab” behind the first. Turn off everything. Turn on “Generic Boot Loader”. This happy option was put in there by someone with exactly your problem in mind. I love the person who wrote this. It loads what-ever operating system is marked active, as defined by the active partition. (Manipulating the marked-active one is really easy to do with “fdisk” (for example, fdisk /dev/hda to get into the util). Use the pulldown Other option to de-fang Grub and to tell it to just write. Click OK and watch your hard disk light to make sure it writes.

If it works, your HD will boot, and Windows will tell you that something went really wrong, and should it repair it? If you’re an experienced Windows hand, you know the answer to letting Windows automatically repair anything is “hell no!”. Select “Just Start Up”.

There you go, Dave. Hope this helps.

– Dave

There is a little finesse to getting a usb install – really a little insight.

1st if one looks at /boot/grub, there will exist Grub: stage1, various stage1.5(s) and stage2. The various stage1.5(s) are for differing file systems and devices. There will also be other files like device map, etc

Re: boot usb-HDD
“it saw the USB stick as /dev/sdb1” however, when you select & boot the usb-HDD that will become /dev/sdb0. You will need to edit the usb-HDD install’s /boot/grub/menu.lst to reflect that.

Installing SuSE on External USB Drive - openSUSE says it far better than I can:)

Re: Vista – I see swerdna was faster than my response

Stay with it; you are close:)

Edit: when you get that usb-HDD working, it will only work with the system you used to install it. If you want it to run on “any” box there is “Portable SuSE” which you apply to that install & you can take it to any box and it will run (if it will boot usb-drive): see: Portable SUSE - openSUSE