Try this: In YaST Boot Loader under the Boot Loader Installation tab, install grub to the “root partition” boot sector. In that same dialog window, go to Options and check the box for “Write Generic Boot Code to MBR”. Make sure the “Set active flag” is also checked. Generic master boot code will chain to the active partition boot sector, which will in turn call grub stage2 (this is the Windows “chain load” method, as opposed to having grub stage1 in the MBR which loads stage2, i.e., the “direct” method).
On a different tack, and just on a hunch, is it possible at all that after the upgrade your system starting seeing the SATA drive as the first drive and the IDE as the second? Take a look at your /etc/fstab - if it is mounting by “device ID” (the new default method which identifies drives by serial number) rather than “device name” (i.e., “/dev/sdb”), the order could have been changed without noticeable effect (except in grub where only device-name is used, which would then fail).
And double-check your disk bios settings, too. With your drive, you probably have an LBA or equiv setting needed.
Unfortunately, we can’t be certain exactly how the DVD is doing the boot hand-off. I installed 11.0 on an empty disk, installing grub on the newly created root partition’s boot sector and marking it active, instead of installing grub in the MBR. Worked fine; the generic MBR code which is placed there during partitioning chained to the partition boot sector. The DVD appeared to call the master boot code rather than going directly to the boot sector - when I zeroed out the master boot code in the MBR, the DVD hand-off failed. It may be that the DVD is not chain loading from the MBR but may be using an element in the partition table (which is what the master boot code does) or other logic to get to the boot sector. In other words, the DVD is using the MBR but possibly doing so differently than the master boot code does. We just don’t know.
If you cannot find anything amiss, and the above suggestion re using the generic boot code + partition boot sector doesn’t work either, I would try installing lilo. You don’t have a complicated, multi-booting, changing setup - hence, lilo should do fine. Unlike grub, lilo does not use a pointer and an external loader; everything needed is embedded in the boot record. I’ve seen lilo work where grub would not, with no one knowing the reason why. Before switching, be sure to back up your existing MBR twice, one from YaST and the other from a terminal as root, thus:
Because, the MBR contains the partition table, and if that gets borked, nothing will boot the drive. I would also create a grub boot floppy (if you have a floppy drive), very handy.
I installed GRUB from YAST using your method (flag and generic method) and 1) Grub still did not load and 2) I could not boot from the DVD / harddrive option !
Then I remembered that I had altered the menu.lst and device.map for the one disk test ! So I went back using the repair option from the DVD, mounted my root partition and edited my device.map and menu.lst to set them as they were when it worked. I re-installed grub.
But now, without the DVD, grub does not load: sits at “GRUB Loading stage2” and with the DVD, it is not booting using the harddrive option anymore ! I am using my portable MAC to write this !
Bottom line:
chain loading the loading sequences did something that affected my system a great deal
Ok, I think having bad menu.lst and device.map files caused the issue. I repaired my system using the DVD. It found errors in GRUB, I managed to repair it and it booted again (with the DVD inside as usual). Then I went in YAST/Boot loader and forced the set flag and chaining options. I booted again: no change from before. It does only boot with the DVD inside.
Hargh ! I am getting frustrated even more ! At least my system works.
Once again, first and foremost, please make a backup of the MBR as described above. Even if the boot code is not working, the MBR still holds the partition table! By far the easiest fix when you got into the un-bootable situation above, would have been to just restore the MBR with dd. Murphy’s Law is real - so have a second MBR backup on separate media (like a floppy) as well as backup boot media (another plug here for making a boot floppy!).
This may help you: SuperGrub boot disk and if you haven’t made one already then do so ASAP. This allows me to now easily recover my similarly not booting dual hard disk 10.0/11.0 computer to at least get the SuSE 10.0 system going.
I’m still no nearer finding a solution either and if you weren’t similarly stuck I’d be thinking my second disk was defect.
Thanks guys, but as I said, I am back to square ONE. I can ONLY boot using the DVD and say “Boot from Harddrive”. And it works ! But if I boot with no disk inside, it sits at “GRUB Loading stage 1.5.”. Weird …
If tests fails and I cannot boot, I can always use the repair option from the DVD and not worry about the MBR.
I don’t want to put too much energy in this. If you guys have an idea, I will be glad to test it.
I also have SATA drives and Grub would not ‘get it right’. I tried multiple times to no avail. Finally I tried Lilo instead - and no problem. Personally I think Grub has trouble with some SATA drive setups.
Like Mingus725 suggests, try using Lilo instead. It worked for me. Good luck!
specify in the BIOS as the 1st bootable disk, the one that does NOT have the boot partirion (!). In my case /dev/sda
install LILO with in the loader options the /dev/sda disk as the top one in the list
install the GENERIC code in the MBR and activate the boot partition
And it boots with no problem ! Unreal.
I tried all the GRUB configurations !
One weird thing: I installed LILO having my /dev/sdb drive as primary boot drive in the BIOS and at boot it would see the GRUB information ! So i tried to force grub to be install on the MBR of my sda drive but it wouldn’t boot either.
So in the end, I think the boot loader needs to be installed in the MBR of the 1st disk (/dev/sda) regardless where my OS resides. That is very twisted. It may be some food for future GRUB or LILO releases.
Cheers All, thanks for your help. Much appreciated. I almost gave up.
The reason I suggested lilo, and probably the reason it worked, is because lilo does not use disk geometries while grub does. When the bios loads, it builds a hardware map that it stores in its CMOS. Grub like many other boot loaders (and partitioning, imaging, and cloning tools) uses the disk geometries as written by the bios. Except that sometimes there is a problem doing that. Lilo does not use the map.
Also just fyi, unless the system is booting from a volume boot record - typically a floppy or bootable optical media - there must be code in the MBR. The “generic” code that YaST will write there is just like many another. The code is located in the first sector of the disk, the bios is hard-coded to call that code; generic code will scan the partition table for the active primary and chain to the boot sector on that partition, transfering execution to that code. Grub can be installed in the MBR to behave this way, but it’s primary design is to bypass the partition boot sector, so it goes straight from MBR to the loader (in grub’s case, /boot/grub/stage2). Lilo’s loader is installed with it, so there is no chaining or branching at all; the main drawback of lilo is that if the disk or boot configuration needs to be changed, whereas that can be done with grub by editing device.map and/or menu.lst, lilo must be re-installed.
Ok, I got that.
Still for my configuration GRUB is not working as it should. If I specify the sdb as primary boot device in the BIOS and install GRUB on it, the system will not boot on its own !
LILO seems to install itself on the sda and I have to use this one as the primary boot device in the BIOS. I tried to do the same with GRUB but failed …
Thanks for all your comments and insight info.
Other inssues I have with my 11.0 X64 are:
java does not work properly or not all all with my browsers
my USB webcam (MICROSOFT VX3000) driver is not very good and the image sucks
I am having issues with my sound recording pitch from the microphone: I sound like DRACULA on skype !
Miro used to work flawlessly with 10.3. now I cannot play videos correctly with xine or gstreamer. I have to resort to wathc videos outside of miro with mplayer …
I would think that you could install lilo on whichever drive you wish, as long as you have the config alignment correct (so the pointer is right). Again, the distinguishing characteristics of lilo vis-a-vis grub is lilo’s embedding (as opposed to chaining) and its not using the bios map.
Re Java: Getting all the right versions of Java installed and the pointers right can be a pain; there are a lot more than you might think. As root do
#update-alternatives --display java
and you will see all the pointers, which versions of Java are being looked for (may not be what you have installed now), and which is the “best” version. I needed to run update-alternatives to re-set the pointers after I upgraded, as I had to do a couple of times after prev upgrades. Find where the primary java engine is on your system. On my x64 it’s at:
/usr/lib/jvm/java-1.6.0-sun-1.6.0.u6/jre/bin/java
I’m using the 586 version of Firefox with 586 java, because it’s IMO a simpler method of getting the java plugin working with FF; this is using Sun’s plugin which only comes as 32-bit. Alternatively, there is an open-source engine (the “openjdk” and “icedtea” vsns) which has a 64-bit plugin which will work with FF 64-bit (if you go this route, stick with openjdk; icedtea is not fully baked). Same for Seamonkey as FF. Konqueror doesn’t use a plugin; it calls the java engine directly. You just need to give Konq the correct path in its Java config. I don’t use Opera anymore, don’t remember how it config’s java.
Re Miro: I stopped using it, but remember it was a bit difficult getting set up. The package is from Packman; sometimes Packman’s packages don’t resolve all the dependencies. Run Miro from a terminal and it may throw errors that point you to where the problem is.
Are you using KDE 4? My install had gstreamer set up as the default phonon (the new multi-media framework) audio backend. Didn’t work (it is KDE 4 after all), didn’t want to bother with why. Installed the phonon-backend-xine package and in the KDE sound config switched the phonon backend to xine. And of course, using Packman’s libxine. All is fine now.
Hope that helps. There are virtually always solutions, although can be frustrating to find them. Good luck.
Ok, here I am again with the same problem. This time, I kept only my SATA drive (/dev/sda) on the 4th master of my MB. And GRUB will saty stuck in stage 2 unless I boot from the DVD …
I tried to install LILO like last time but it fails with this message:
LILO version 22.8, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2006 John Coffman
Released 19-Feb-2007 and compiled at 11:12:39 on Dec 3 2008
Running Linux kernel 2.6.27.7-9-default on x86_64
raid_setup returns offset = 00000000 ndisk = 0
BIOS VolumeID Device
Reading boot sector from /dev/disk/by-id/ata-ST3320620AS_5QF4CLDP-part2
pf_hard_disk_scan: ndevs=1
0800 00041486 /dev/sda
device codes (user assigned pf) = 0
device codes (user assigned) = 0
device codes (BIOS assigned) = 0
device codes (canonical) = 1
Warning: Device 0x0800: Inconsistent partition table, 2nd entry
CHS address in PT: 278:90:1 –> LBA (4471740)
LBA address in PT: 4209030 –> CHS (262:0:1)
Fatal: Either FIX-TABLE or IGNORE-TABLE must be specified
If not sure, first try IGNORE-TABLE (-P ignore)
What do you mean by the SATA being “on the 4th master”? There is no “master” for SATA, just ports. And by the way, is that 4th by label printed on the mobo or 4th as listed by the bios - and have you checked that 4th on mobo is same as 4th in bios?
Post back output of:
fdisk -lu
Lilo is reporting a partition table error. Check in your bios for your disk configuration settings; you should have a setting for LBA (alternatively it could say Large, or Auto - make it LBA). And how old is this bios?
Sorry, I was precise enough in my post. I have a MB with four ports: two IDE and two SATA. The Bios labels the SATA I have my disk on as “4th master”. That’s all.
It’s a western digital 300Gb with three partitions (swap (sda1), / (*sda2) and /home (sda3)).
I will post the scripts results tomorrow.
GRUB installs fine (no errors) at the opposite of LILO but I cannot boot without the DVD in the drive and use the “boot from harddrive” option. Since I had the same problem in the past and you helped me, I tried the same tricks, no luck …
I don’t see how the MBR could be write-protected - code needs to write to it all the time (partition table, boot flag, disk signature where W$ keeps its drive-letter cross-ref, etc.).
Have you tried switching the drive to the other SATA port?
The LILO error is indicating a problem in the 2nd record in the partition table, which is why I asked to look at it. There could be a problem with the LBA calculation or bad bits being passed by the bios.
After you post back I’ll review what we did the last time and see if we can try a few new tricks.
My other SATA connector is broken, no luck there …
fdisk -lu
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00041486
Device Boot Start End Blocks Id System
/dev/sda1 63 4209029 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 4209030 46154744 20972857+ 83 Linux
/dev/sda3 46154745 625137344 289491300 83 Linux
You have the so-called “generic boot code” in your MBR that openSUSE will optionally install (this is actually the old DOS code, nearly identical to XP & Vista’s). sda2 has its boot flag set in the table, making it the “active” primary.
I notice your fdisk is now reporting 1 disk, not 2 as the last time around. And looks like what was sdb is now sda. Are we dealing with only one disk now?
Also, what is the machine? Some machines (like Thinkpads) do proprietary weirdness with the sectors.
machine is a desktop: hp pavilion a1310n, old clunker …
Only one disk now, I thought having the two disk was getting me into trouble. Last time the MBR was on sdb, now I only have sda.