how to recover Suse 11.0 /boot files if Ubuntu's grub lost them & can't boot to suse
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to recover Suse 11.0 /boot files if Ubuntu's grub lost them & can't boot to suse
Hi!
As I have encountered an Ubuntu drive designation bug when re-installing Hardy after having installed Suse 11.0. (again) and not realising the problem until I installed Ubuntu's grub on sdc1 to follow the "faulty" partitionner scheme. This caused me to be incapable of booting into any OS: Suse, Windows or Ubuntu (yet when I reverse my bios order it's confirmed that windows still boots fine and my partitions appear to have things installed at least seen graphically in gparted).
My other linux OS were designated a /boot partition on the 1st drive (IDE) and in the past, Gutsy Ubuntu's grub was able to list all my OS entries fine so that is why I prefer to install Ubuntu last. But now Ubuntu switched my drive sda to sdc and (second drive SCSI) sdb to sda and (3rd drive SCSI) sdc to sdb!!! I thought this was some new installation approach (since I am still a relative newbie) and I forgot that /boot and grub must be on the first drive, so I went along with the faulty alternate install of Hardy! Note: Suse designates the 1st drive as sdc as well not sda, and I put it's grub on sdc1 during suse install but for some reason Suse on its own, could properly boot at that point!!
So a long story short, after I will try to re-install Ubuntu correctly (it seems the installer changes its designation of drives at each reinstall, so I might get the right one again!) is there a way of getting my Suse bootable again without re-installing a 3rd time???? I can't count on Ubuntu's grub or can I? since my /boot partition was automatically formatted during the ubuntu install in order to have it mounted as /boot ... Is that what I am supposed to do? I am wondering if I did one step different a year back when I installed Suse 10.2 (JAD) and then Ubuntu Gutsy - everything went smooth back then...
Anyone had similar experiences or has advice esp. with Open Suse/Ubuntu/Windows - multiboot installation?
ok, don't use ubuntu's grub. it has some funky configurations that aren't very suitible for a multiboot setup. but with the drive designation, it doesn't matter if /boot is sde15, as long as it is the only drive that is bootable. the bios will find a bootable drive, regardless of the order.
the problem is, im not very familiar with detaching /boot, so i really don't know where suse or ubuntu put their kernel and initrd, so you will have to hunt for them if you want to recover without reinstall. they may have been deleted along with /boot partition. just look around. if they're still there, then you can just re-install grub, which is pretty simple. if you can't find the kernel and stuff, then you will have to re-install to get them back. or you could recompile the kernel from the source. suse's is in /usr/src, not sure about ubuntu's. but it would just be easier to re-install. i can only supply you with grub files, since i run suse 10.3
to prevent this in the future, you can get rid of the /boot partition. it is not important to seperate /boot, and it causes more trouble. (as you can see) just install grub on suse, since it works the best, and leave it at that. this way, changing device orders doesn't affect the bootloader. which it shouldn't anyway.
Well I was coached by a more experienced Ubuntu user, so I guess that's why I use it's grub last- and the last installation time last year went well. It got all my entries right in the /menu.lst, and it got at least 2 entries right (windows and itself) the first hardy install but I finally have access to my /grub/menu.lst from this live cd and I am spotting errors!
Suse's entry is definitely missing!
I only copied the non-default entries:
title Ubuntu 8.04.1, kernel 2.6.24-19-rt (recovery mode)
root (hd2,0)
kernel /vmlinuz-2.6.24-19-rt root=UUID=817fde36-4ab2-46d6-8763-290f15a45aeb ro single
initrd /initrd.img-2.6.24-19-rt
title Ubuntu 8.04.1, memtest86+
root (hd2,0)
kernel /memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
chainloader +1
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sdc8.
title Ubuntu 7.10 (7.10) (on /dev/sdc8)
root (hd2,7)
kernel /boot/vmlinuz-2.6.22-14-rt root=/dev/sdc8
initrd /boot/initrd.img-2.6.22-14-rt
savedefault
boot
This last entry I tried to fix myself and still it's not correct, but you can see that Ubuntu does put its kernel and intrd files in /boot, now the problem is that Suse's /boot folder is empty! So I don't know if perhaps there is something within it's / folder but I will sudo access it tommorow because I'm burnt tonight!
I've had something similar so now I do this. On a desktop PC with 2 hard drives, the partial partition list is:
Code:
/dev/sda1 ntfs Windows2K system (boot flag set)
/dev/sda9 swap
/dev/sdb1 ext3 Suse 11.0 / (boot flag set)
/dev/sdb7 ext3 Ubuntu 8.04.1 /
There are other ext 3 & ntfs partitions for data, and Suse & Ubuntu use the same swap. I and installed Ubuntu's GRUB on /dev/sdb7, and use Suse's GRUB to boot Ubuntu using chainloader, thus:
Code:
# Modified by YaST2. Last modification on Sun Oct 5 17:09:34 BST 2008
default 0
timeout 8
gfxmenu (hd1,0)/boot/message
###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd1,0)
kernel /boot/vmlinuz-2.6.25.16-0.1-default root=/dev/disk/by-id/.. (etc)
initrd /boot/initrd-2.6.25.16-0.1-default
###Don't change this comment - YaST2 identifier: Original name: Ubuntu 8.04.1###
title Ubuntu 8.04.1
rootnoverify (hd1,0)
chainloader (hd1,6)+1
###Don't change this comment - YaST2 identifier: Original name: windows 1###
title Win 2K Pro
rootnoverify (hd1,0)
chainloader (hd0,0)+1
This prevents Ubuntu screwing it all up, as it did the first time. I've now done 3 machines like this and it works fine. Ubuntu's GRUB has a menu with all the OS's, but if that gets annoying you can edit it by hand. Kernel upgrades to Suse or Ubuntu also make no difference.
Hi!
Thnks for the help, I tried variations in yast menu.lst to no avail. and tried to quickly reinstall ubuntu again without mounting my boot partition this time, thus preserving the suse grub files. I tried a configfile method and got into ubuntu finally, but without the gui. Now it seems it's because I didn't install everything from the DVD in my tiredness, so I hope this is why I couldn't connect to Xserver. I wanted to know the following:
If this Ubuntu is on another drive (not the master) and not on same drive as windows, is the / supposed to be flagged bootable or not? Is it better to install grub on mbr or / (the configfile method seemed to suggest the first part of /). So far, bootflagging / and having grub on / seemed to work, minus the gui... Did you have any multi OS multidrive situations at all?
I have two boxes which have Windows, Suse & Ubuntu, and two hard drives. One has Win2K on the first partition of the first drive, Suse on the first logical partition, and Ubuntu on the first partition of the second drive. Both hdd have the boot flag set for the first partition, though Linux doesn't really care AFAIK. I think you only need the partition with the MBR set bootable, so at least the first partition on the first drive.
My other box has Win2K on the first partition of the first drive, and Suse on partition 1, and Ubuntu on partition 5. In both, I use the Suse GRUB to boot, with the first stage on the MBR of drive 1, and use chainloader to boot Windows and Ubuntu. I also have an external USB drive which I use for testing other ditro's, so this box sometimes has 3 hard drives, and again I use chainloader sections to boot these extra OS's.
As long as you keep one GRUB as the master, and put the GRUB's for any other OS's on their root partitions, then this seems to be the safest way to go with multiple drives and multiple OS's. I know there are people on this forum who have dozens of bootable partitions for testing.
Well my problems were solved with 2 boot partitions at start of the drive, since 2 OS were on my 500 GIG IDE drive and boot files could not bypass old cylinder limit of 1024MB can't remember now (grub error 18). I wanted to preserve all boot files either in / or separate for each distro, and this was the only solution!
So in BOOT partition: I have Ubuntu's boot and grub files from old version which is my "master grub" and is flagged as boot. The re-installed openSUSE has it's boot and grub files in BOOT2 partition, and I realised that I although I mounted this partition as /boot, I did not check that partition as active! Thus openSUSE is chainloaded succesfully from my "master" grub on BOOT(1). My future install of Ubuntu Hardy LTS already has a chainload link for it in the "master" grub again. All I have to do is to install it's grub to / on the non-bootable SCSI drive (according to bios) and voila! All done. My Windows still has flagged boot and bootfiles in MBR on same drive, and is also chainloaded.
Note: I have decided to use my second SCSI drive for /home and more...
Now that I figured things out, after many re-tries, like entering commands in grub's cli to install grub, I can maybe help someone else too.....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.