Grub problems after installing second hard disk and SuSE11.0
This should have been a simple upgrade but 2 days later I'm still fighthing. I hope someone can help. I have a computer that had Windows and SuSE10.0 on SATA disk sda, and I added a new SATA disk sdb and installed SuSE11.0 on this thinking it would be the easiest way to triple boot.
I think the important information for debugging is this: Code:
hefty:/ # fdisk -l Code:
hefty:/ # cat /boot/grub/device.map Code:
hefty:/ # cat /boot/grub/menu.lst I've been through various stages of not booting, now at least my computer boots to the old 10.0 and Windows OK, but any attempt to boot to SuSE11.0 results in a Grub error 25 and the opportunity to reboot to something else. The problem probably lies in either the way Grub is installed on sdb or in the magic (x,y) values in menu.lst, but I'm fumbling in the dark. Can anyone help? Thanks in advance. |
Did you try following command on /dev/sdb1 --> openSUSE 11 right?
#grub-install |
Booted from the SuSE11 live CD that just brings up the Yast Boot Loader Settings page and then I'm not sure what to do next. I tried the Grub console but don't know what to do.
Meanwhile with some fiddling about with the boot command lines I've determined that Grub is not happy with anything on sdb and does not like 'root (hd1,0)' or any version of this command, returning an error 25 'Can't read disk' or similar. It seems something is missing there... Thanks for the suggestion. |
Are you able to boot opensuse 11 in failsafe mode? You have an entry for failsafe in the menu.lst with (hd1,0) while your regular opensuse has (hd1,1). At the grub prompt from opensuse 10.0, do "geometry (hd0) to get info the run the following commands consecutively: 'find /sbin/init' and then 'find /boot/vmlinuz' to see if these files are there. Leave the quotes off and there is a space after 'find'.
You could try commenting out the title entry for each stanza and rebooting to see which works and remove the incorrect entries. Put a hash mark (#)to the left of title. |
Thanks for the suggestions. None of the openSuSE 11.0 boots on sdb work, none at all, they don't get past Grub stage 1.5. The results (booted to SuSE10) are:
Code:
grub> geometry (hd0) After an unsuccessful boot the computer returns to a grub menu which allows the entries to be edited and tried easily, however I've found nothing that works from the SuSE11 installation - each returns a grub error 25. Thanks for your help. |
You have two Linux partitions on sdb? My Opensuse (10.3) also shows as ext2fs when I run geometry command. You only have a vmlinuz and initrd file on the third partition of the first drive and you will be unable to boot the Opensuse 11.0 on the second drive without them. That is definitely part of the problem. When you do the 'find' command in Grub for /sbin/init and /boot/vmlinuz it should find these files on whatever number of drives/partitions you have.
Do you have anything on sdb2 or just formatted? The kernel/initrd files were not installed for some reason? Since you have nothing installed on sdb (right) the easiest thing to do would be to re-install 11.0 to sdb1. Before doing that, you could try to see if the Opensuse 11 files are there.Log on to 10.0 as root, create a directory: mkdir /mnt/opensuse11, then try to mount it (as root): mount -t ext2 /dev/sdb1 /mnt/opensuse11, if this shows no errors run: cd /mnt/opensuse11, then: ls -l, see if there are any results. If you can see files, then your original install was mostly successful. However, without the initrd and vmlinuz files in the /boot directory, nothing will boot. Luck! |
Thanks for the tips - I think the openSuSE11 installation was mostly successful, at least sdb1 has all the files it's supposed to have, including /boot/vmlinuz and /sbin/init. sdb2 also contains the same, the result of another install experiment I'd guess.
Code:
toby@hefty:~> su What I'm thinking of now is deleting all partitions on sdb, removing sda (unplugging it), doing a full clean install on sdb as whatever drive it appears as, then putting sda back and merging the Grub configurations from the two. Is this likely to work or make things worse? Can you think of anything during the openSuSE11 install process that I should make sure to select? It seems something isn't quite configured or installed correctly during Yast's best guess automatic installation from the live CD, but so far I have no idea what. |
I'm not sure what you were doing with these commands "ls boot/vmlinuz" and "ls sbin/init". You need to do "ls /boot/ to see what files are in the /boot directory. Try running these commands again sequentially (as root):
toby@hefty:~> su Password: hefty:/home/toby # mkdir /mnt/opensuse11 hefty:/home/toby # mount -t ext2 /dev/sdb1 /mnt/opensuse11 hefty:/home/toby # cd /mnt/opensuse11 hefty:/home/toby # ls /boot/ See if you get results from this. Then run them again changing the 'sdb1' above to /sdb2' and see what results you get. This is to see if you have the vmlinuz and initrd files in the /boot directory, same as the geometry command in grub. I don't think they are there. Try these and let us know results. You should have this: vmlinuz-2.6.25.5-1.1-default, as well as an initrd file w/same numbers. These are listed in your menu.lst for 11.0 and it's strange they are not there when you do the 'find /boot/vmlinuz? |
Hi yancek, now you've confused me a little... If Opensuse11 is mounted on /mnt/opensuse11 then the command 'ls /boot/' will give me the contents of the local disk, not the disk mounted in /mnt/opensuse11.
Anyway, both appear to give the expected results: Code:
toby@hefty:~> su From Grub (running booted to SuSE10.0 from the sda2 partition), I'd expect different results from this: Code:
grub> root (hd1,0) From the configuration files, which I am now starting to understand a little more, everything looks good but I'm suspicious there's no mention of hd1 in /etc/grub.conf: Code:
setup --stage2=/boot/grub/stage2 (hd0,2) (hd0,2) |
My mistake. I forgot to ask you to use the forward slash (/) at the end of this command: hefty:/home/toby # cd /mnt/opensuse11, it should be:
hefty:/home/toby # cd /mnt/opensuse11/ I changed directories on my computer to my opensuse and ran the command: ls boot, which showed my opensuse /boot files. So the results of the first command: hefty:/home/toby # cd /mnt/opensuse11 hefty:/mnt/opensuse11 # ls /boot/ show the /boot files for opensuse 10 (I think that's what you were running from?) The results of the second command: hefty:/mnt/opensuse11 # ls boot show the /boot files for opensuse 11. What this means is that your initrd and vmlinuz (kernel) files are there on sdb1. If you are booting from Kubuntu or Opensuse 10, don't worry if the stage1 file is in Opensuse 11, doesn't matter. You have three OS's on the computer but I'm not sure which you are booting from as you have changed? Although each distro will have the stage1, stage2, etc. files, these files are only used from one of the distros. If you are booting from Kubuntu you need the stanzas (entries) for each OS in the Kubuntu menu.lst, if you are booting from opensuse 10, you need correct entries in the opensuse 10 menu.lst. Post back w/results. |
Many thanks for your continued support... I've been tracking a similar thread on another board where the guy having trouble gave up and used LILO.
From appearances it seems that when my computer boots it finds the Grub installed with SUSE10.0. The three installed OS are: sda1 Windows 2000 sda3 SUSE Linux 10.0 sdb1 openSUSE Linux 11.0 Usually the PC boots to SuSE10.0 which I've been using for some years, other possibilities available to me now are the openSUSE11.0 live CD or the 'Super'Grub CD. When booted to SUSE10.0 the /boot/grub/menu.lst contains: Quote:
When I select to boot openSUSE 11.0 the execution gets as far as the kernel command and returns an 'Error 25: Disk read error' which when I then play around with Grub is returned for every command to do with sdb1. I'm starting to conclude that Grub has issues with SATA disks, or something in my computer, and switching to LILO is the sensible solution. Edit: For a risky experiment I used Yast to install LILO as boot loader and still the system wouldn't start from sdb1 so I reverted to Grub. Perhaps the next step is to unplug sda and install openSUSE 11.0 on 'sdb' when it's alone in the PC and see what happens. Equally defeatist would be to back up sda to sdb, create a new partition on sda and install openSUSE 11.0 there and then move home to sdb later. |
ok I will jump in here to add to the confusion. If you want to try lilo go ahead....sob
I gather sdb linux opensuse was installed last? can you remember if you installed its grub to mbr or the the root partition on sdb1? 2) leaping ahead....if you have a good live cd...you can redo grub into mbr and choose which menu to use....I suggest the one on sda root (hd0,2) setup (hd0) ....and if last line contains "succeeded" quit |
That's correct. sdb is new and the idea was to use it with a clean install of openSUSE 11.0 until I had re-installed all applications from SUSE 10.0, then wipe the SUSE 10.0 installation.
I'm not sure if there's an MBR on sdb, but there's certainly one on sda as that's where the PC usually boots. The three commands you suggest work fine as you suggest, however running the same when booted to SUSE 10.0 on sdb: Code:
grub> root (hd1,0) |
I had a look through your Grub troubleshooting pages... It seems that Grub can't make any sense of the content of sdb:
Code:
grub> root (hd1,0) |
hmmm
well it detects sdb1 as ext2 immediately after you typed root (hd1,0) can you try kernel /boot/ (and press tab please) I do not rule out the possibility its all grubs fault...heh heh but I do not use opensuse and maybe the installer has got confused? |
oops only just spotted you have a post above...forget all that.
grub can not find a proper grub setup stage files on sdb1. I suspect opensuse is in need of correction. Have you tried to mount manually opensuse in suse? with root powers try this Code:
su 2) I suspect that sdb1 /boot/grub is missing files...you could use the trouble shooter way but this way is easier |
darn it....just re-reading the top posts.
if you are not completely peeved off...what is sdb2 please? I would like you to post the sdb's /etc/fstab ....you may have to mount sdb2 to get it...if sdb1 was a separate boot partition. cheerio |
aus9, Suse has a gui in YaST to modify the boot loader but I have found it easier through terminal.
|
Larry
Yes I agree I have always used a terminal to install grub to get the success messages but I am not sure our original poster is happy with grub at the moment so I hope he can shed some light on his sdb setup. I want HellesAngel to continue to use the sda bootloader or dice grub and go for lilo. However, I can not help with lilo...but maybe opensuse scripts will stuff up lilo as well? I can hang around here for half an hour and see if OP has any more info he can share. |
I have never tried to mix the two (Grub & Lilo) except by chainloading.
|
Here you go:
Code:
grub> root (hd1,0) Will mount sdb1 and post the contents of /etc/fstab. Half a minute... |
Code:
hefty:/home/toby # mount -t ext2 /dev/sdb1 /mnt/opensuse11 Edit2: And the contents of (sdb1)/boot/grub/ Code:
hefty:/mnt/opensuse11/boot/grub # ls -al |
quick work...hope I wasn't too demanding?
in the meantime...I have read some of the above posts so feel free to ignore my waffle 1) sdb has no bootable dos partition....thats the missing asterix see your post 1 for an asterix in sda table. fix it with suse....with root powers Code:
fdisk /dev/sdb 3) Post 7 concerns me a heck of a lot....hint hint so sdb2 contains the same as sdb1....thats not good...and as suggested by yancek....a clean install of sdb is called for. sorry....but I do not think even lilo can rescue this. 4) your sdb fstab table says part 2 is supposed to a swap....but you claim its a mirror of sdb1 that should be enough proof install has failed. But you have learnt more than I ever did on how to use grub....suck suck. 5) I suggest you rebuild....after making sdb1 bootable by all means install lilo if you want to...I am almost an old man so have no fear that you may one day come back to grubland. good luck |
No problem, I'm trying to make progress while the wife's out! Since earlier posts I rebuilt sdb and it now contains the correct stuff:
sdb1 - full install of openSUSE 11.0. sdb2 - empty space for all my /home stuff I made the fdisk steps you suggested above - how would I see if that has made the difference? The disk is now bootable: Code:
Command (m for help): p The swap space from fstab is on the other disk, it's confusing from the disk-by-id form. |
ok did not realise that...but you should create a swap on sdb as I thought you might eventually get rid of sda linux.
500G might be better off with a few more partitions tho. since you were so quick to do a clean install....can I talk you into at least 4 primary partitions or an extended system. The trouble with lots of logical partitions is that info on each part is logically held in that part....which is why some companies have tried to avoid the IBM limit of 4 primaries. Leaping ahead....I would have part 1 for MS part 2 for linux 1 part 3 for linux 2 part 4 swap and each linux is nice and large and install virtualbox on it so you can play around with downloaded distros. if you are as naughty as me....I installed and ran vbox....then copies the dot folder to a spare partition and symbolically linked it back to my old system....because I use partimage to save images but there is no need to image something that is available to d/l and is already an image....well I am a cheap skate as well. |
Thanks for the help - I think I just have to conclude that Grub cannot load openSUSE on a second disk sdb when configured by YaST and booted from sda and make another partition on sda for the openSUSE 11.0 installation. I feel defeated, but didn't switch to LILO...
|
Noticed that in your first post of the opensuse 10 menu.lst the 10 stanzas had root (hd0,2) while you had no such entries for the 11.0 partitions. Did you choose the default Grub installation when installing 11.0, i.e. installing Grub to mbr of sda1?
|
Yes, I let YaST do what it felt best but read it through and couldn't see any obvious errors. I've been through several iterations over the past few days...
It's really odd, I just can't think of any reason why this should not work and my motivation to spend much more time is running low... |
Have you tried editing your menu.lst file in opensuse 10 to show root (hd1,0), in the line after title, before kernel? Might be worth a try? One of your more recent posts shows your vmlinuz and initrd files in the opensuse 11 on sdb1 so the necessary files are there to boot.
I generally don't have new installations put Grub in the mbr because something might go wrong. I think it is easier to just modify a current menu.lst I know is working rather than hope the new install detects all OS's on the system and makes entries. I know that doesn't always happen. Installing to the /boot directory of an installation of a new OS doesn't and modifying my current menu.lst seems easier, although some would disagree. The default in most installs is to install Grub to the mbr of disk 1. No sure if the suggestion above will help, does get frustrating but we learn from all our efforts. Good Luck! |
yancek....yes I am in Australia so needed a sleep
I spotted there was no sdb entry in the menu for sda. but me thinks the saikee style might be the safest bios boots to sda and uses grub for sda and menu from sda sda menu is amended with root powers to have an extra line to boot sdb1 ------- title opensuse on sdb root (hd1,0) chainloader +1 ------- redo grub commands from within suse on sda to ensure its right Code:
su (or sudo or whatever) sdb1 /boot/grub |
The chainloading makes sense, particularly in this situation?? I noticed the OP had two different entries for windows (hd1,0) and (hd0,0) in his initial post and am wondering if he had sda disconnected during the opensuse 11 install or switched drives in BIOS.
Well, hopefully he has everything working now. |
Quote:
Quote:
Code:
grub> root (hd0,2) I added this entry to sda/boot/grub/menu.lst: Quote:
Code:
root (hd1,0) |
Quote:
Quote:
Thanks for your continued support - any further ideas? I think I'll go to the openSUSE site and open a bug report.... Edit: I scanned openSUSE's bug database and found this grub installation into mbr of second disk impossible which sounds relevant, although I'm still not 100% clear about the role the MBR of each disk plays in a two disk setup where only one is required to actually 'boot' the computer, the other being required only to 'boot' the chosen OS. OK, I took the plunge and opened a bug report: https://bugzilla.novell.com/show_bug.cgi?id=413135 |
umm yeah I hope you are right....just to eliminate tiny things about adding second drives.....did your bios detect it correctly?
are the connectors firmly in. and I know they show up as sdX and not hdX but are they by any chance IDE or atapi drives? if so, have you jumpered as cable select? instead of slave 2) thanks for the bug link....but we tried to install grub on sdb1 (root partition) and I read that bug as failing if tried for mbr of drive 2? 3) why don't you have a go and installing lilo into root partition sdb1? You already have the chainloader for sda menu so maybe grub will boot to lilo and lilo will kick off opensuse? I know you are more frustrated than me....but I have not liked opensuse when I tried it...when you made a system change the config scripts too bloody ages to run. I am currently testing sidux....and altho I am not used to debian style it is looking awefully good. You have more patience than me.....I was shocked when my trusty commands failed for you. I felt like committing....no not really but I can not explain it. I hope it is a bug which means its an opensuse thing....but it damages grub's reputation all this headache. thankyou very much for all the feedback responses you have given. Others may spot what I and yancek can not? |
I've only just spotted th8is thread, so pardon me if I repeat things which have already been said. My desktop has two hdd's with Win2K, Suse 10.3, and Ubuntu 8.04 thus:
Code:
dougal:~ # fdisk -l sda3 is the Linux swap & sdb10 is for the Win2K PageFile (a trick I learned with NT4 servers, which seems to make it faster). Suse 10.3 root is sdb1, and Ubuntu is in sdb9. Grub is on the MBR of sda, and Ubuntu was installed with Grub loaded to its partition, then I just copied the lines from it's menu.lst to the one for Suse. I've used this same config on other boxes with various combinations and it has always worked, though on the most recent one I used chainload commands in the main OS menu.lst to point to the other Linux's. Makes it easier when you re-install them. |
great answers. all you are lame at all.
|
Thanks for the reply - same output from my PC gives this:
Code:
hefty:/home/toby # fdisk -l |
HellesAngel
Back again to ask some questions and suggestions 1) In your first post, the sdb entry has a resume for sda swap. Can you use a live cd and show us the /etc/fstab for sdb to prove fstab is using sda's swap pls? 2) SDB....has 2 partitions agreed.....but I am wondering if sdb1 is the /boot partition? grub find ....finds actual files so if you have no vmlinuz on sdb1 it will not work but the vmlinzu-version x will root (hd1,0) try find /grub/menu.lst find /boot/grub/menu.lst If top line works...you have a separate /boot partition otherwise the next line should work.....and if the next one fails.....grrrrr. 3) bootable flag.....did you try to toggle the bootable flag I suggested earlier? |
Thanks for the continuing help! The bug report at SUSE is grinding through the process but let's attack from every angle:
Code:
hefty:/home/toby # mount -t ext2 /dev/sdb1 /mnt/opensuse11 Then from grub: Code:
grub> root (hd1,0) Code:
hefty:/mnt/opensuse11/etc # fdisk -l |
So, now I get the following on boot to openSUSE 11.0:
Code:
root (hd1,0) From sda the configuration files are now: device.map: Code:
(hd0) /dev/sda Code:
# Modified by YaST2. Last modification on Tue Aug 26 08:58:51 CEST 2008 Code:
setup --stage2=/boot/grub/stage2 (hd0,2) (hd0,2) |
hangon Hell
run that past me again.....the last bit. Where exactly is this grub.conf file? Its not right....its not right.....IMHO .... yippee....could be the source of the error. 1) I assume its a /etc/grub.conf on suse 10....sda.? 2) What I am proposing....assuming you are now multi-skilled in using a live cd....is use root powers to make that file unreadable or better still move it to your /home. redo grub. I do not like that file.....hint hint. I think suse has got the wrong end of the stick and is attempting to do map command on you when it...suse grub on sda....should be able to chainload suse on sdb. And that map command will explain why its not finding its menu files because it says HD0,2.....sorry for the shout.....but grub is now looking at sda partition 3....OMG what a stuff up 3) So attempt 1.....move it to /home and see if you can reboot into sda suse then if ok......lets redo those chainloader command for grub to chainload to sdb1....with a chainloader menu for suse on sda. Code:
su If succeeded change suse on sda menu.lst so you have title sdb chainloader root (hd1,0) chainloader +1 I shall wait before expanding on my ideas, |
Which Opensuse is the grub.conf from? I have a similar setup with two versions of suse. Here is my /etc/grub.conf from the first partition which would be equivalent to your 10.0, mine is on sdb1:
root (hd1,0) install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) /boot/grub/stage20x8000 (hd1,0)/boot/grub/menu.lst quit Below are the contents of opensuse 10.3 on hdb11 setup --stage2=/boot/grub/stage2 (hd1,10) (hd1,10) quit I expect your contents will be different but, the important part I see is that the entries you show point to the third partition on the first drive when they should be pointing to (hd1,0). This applies only if the last post of yours for "grub.conf" was from opensuse11.0. I'd suggest taking a look at the /etc/grub.conf in 10.0 and 11.0 and comparing them. |
Many thanks for the suggestions - following aus9's idea I moved /etc/grub.conf on sda3 (the SUSE 10.0) out of the way. Then I'm not sure what you meant by redo grub so I tried:
Code:
grub> root (hd0,2) Then: Code:
hefty:/home/toby # grub-install /dev/sda3 The computer is booted normally using the SUSE10.0 installation on sda3 - is it necessary to reboot using the live CD to apply these changes? The next steps you suggested bring the following, sadly predictable results: Code:
grub> root (hd1,0) |
Can you boot any OS now? If so can you boot a Suse? Being honest you all have lost me half way down the second page. aus9 you were probably right in suggesting he boot by chainloading. When making changes to Suse's boot order or config files I found it best to do through YaST because they have changed the name of some of the directories. But if he does not have one Suse that will boot then he will probably have to do a repair or new install.
|
ok sorry lets try that again.
when I asked where is this file....I assume your answer is /dev/sda3 for the one posted and /dev/sdb1 for the one not posted. 2) The one you did not move....from /dev/sdb1.....is that symbolically linked to /boot/grub/menu.lst? What I want you to do, is to move all of these /etc/grub.conf out of their pathways or change their permissions to --- no read no write no execute. I am thinking that the map command had stopped the manual commands I have previously failed to get working and looking at your post..... my poor suggestion on redo grub I shall explain again. P1) I assume you have still moved sd A /etc/grub.conf away from /etc so boot a live cd to move sdb1 if live cd does not automatically mount sdb1 with read write powers you will need to umount the read only sdb1...or if its not mounted in any way just follow the next bit You may of course have a live cd that already mounts in read/write mode maybe at /mnt/sdb1? Code:
su Then issue command umount /z for P3 P2) redo grub for sda within live cd Code:
su Your last effort put a grub into your root partition of sda3 but left grub in mbr sda. Forget the suse /etc/grub.conf please. P3) Now the chainloader Code:
su P4) Lets review grub redone for mbr in sda links to sda3's booting files grub for sdb1 is in root of sdb1 and will need a chainload command from sda3's menu Since you have already done the menu try a reboot and see if you can get into sda3 as per Larry's question Then try to get into sdb1 The bottom line is I think the reason why my previous commands did not work for you was the fact that suse has introduced a not needed etc files and one of them caused a map command to confuse the grub command for chainloading. P5) If any part fails....do not proceed with the next bit.....and obviously if you can not boot sda....re-use the live cd to restore the /etc file in case I am wrong? good luck |
I'd assume the /etc/grub.conf file Helles posted was from sdb2, that just based upon a comparison of my /etc/grub.conf files. I'm wondering if this file serves a purpose and, if so what. Wasn't aware of this files existence before today?? I've checked the other distros on my computer and none have a grub.conf in the /etc directory.
Getting extremely confusing! |
Finally, the end
Hi everyone, one final post to this thread to say that I never did get the dual boot working and I got fed up. I now have a single boot system with SUSE11.0 and am pretty happy. The boys at SUSE didn't really take the bug report seriously and it remains a mystery why this relatively simple configuration doesn't work. In the end the best solution is the simplest on that works and I took it... Many thanks for your help, we really should have nailed it...
|
All times are GMT -5. The time now is 03:05 PM. |