Click to See Complete Forum and Search --> : SUSE 10.1 using existing grub


BostonDriver
07-22-2006, 04:24 PM
I'm trying to install SUSE 10.1 onto a new disk (/dev/sdb) to "kick the tires".

My existing disk (/dev/sda) uses GRUB to boot XP, FC5 and FreeBSD 6.1. My goal is to use grub in the MBR and one /boot, swap (and /home at some point) for all Linux distributions I decide to install.

The SUSE install pretty well, the existing /boot (ext3; /dev/sda4) and Linux Swap (/dev/sda5) partitons are detected and re-used. However, I cannot seem to get SUSE to simply update the existing grub.conf.

I'm given the option to "merge" the existing grub config, but this doesn't seem to mean what I think as the FC5 (ext3) and FreeBSD partitions are not "merged" in.

In "expert" mode, I can see all partitions for all OSes/filesystem types just fine.

I am using all the default values provided by the install for grub. I believe that the installation detects grub in the MBR of /dev/sda (and as I said, /boot is detected in /dev/sda4). However, this is my first crack at SUSE, so I could be mistaken.

Should I be able to get the SUSE installation to simply add a stanza to my existing grub.conf?

If so, what should I be looking for. I probably missed an option (or mis-interpreted one.)

Worst case, I simply edit grub.conf manually after SUSE is installed. But doing that, I don't learn anything.

Thanks for any help.

dkeav
07-22-2006, 04:53 PM
just manually edit the grub.conf/menu.lst in the /boot/grub/ dir on whatever install the grub in the mbr is representing and add all your OS's

BostonDriver
07-22-2006, 05:06 PM
just manually edit the grub.conf/menu.lst in the /boot/grub/ dir on whatever install the grub in the mbr is representing and add all your OS's

When? :-)

Should I add a stanza for SUSE to the existing grub.conf before installing SUSE or install SUSE (and blow away my existing grub.conf) then add back my other OS'es?

I know I can do the later, but hope that the SUSE install was a bit more aware of prior configurations.

Thanks.

dkeav
07-22-2006, 09:34 PM
i havnt installed suse, so i dont know for sure, but most installers allow you some configuration when it comes to installing a bootloader, since you already have a bootloader available to you, you dont need suse to install one, so wherever in the installer just disable installing grub, and edit your current working grub configuration to boot suse for you

BostonDriver
07-23-2006, 08:20 AM
i havnt installed suse, so i dont know for sure, but most installers allow you some configuration when it comes to installing a bootloader, since you already have a bootloader available to you, you dont need suse to install one, so wherever in the installer just disable installing grub, and edit your current working grub configuration to boot suse for you

I did see this option, but when it gave me the warning that "the system may not boot", I decided to google, then ask here first.

SUSE gives 3 choices, grub, lilo and none. If I do not install a bootloader, I doubt the installation will be smart enough to put what is needed into /boot. If so, I probably couldn't boot SUSE.

dkeav
07-23-2006, 11:13 AM
it will still put the kernel in /boot that is all you need to boot suse, if you already have a working grub in the mbr from your fc5 install

i'm not sure you are fulling understanding how booting an OS works, try reading some documentation on grub it might make more sense then

BostonDriver
07-23-2006, 11:36 AM
it will still put the kernel in /boot that is all you need to boot suse, if you already have a working grub in the mbr from your fc5 install

i'm not sure you are fulling understanding how booting an OS works, try reading some documentation on grub it might make more sense then

I may not fully understand grub.

The SUSE install process, by default, in the partitions section, does not indicate that /boot will be mounted. The bootloader section reads like it detects (and will use) the existing grub in the MBR of the first disk. No mention is made about what will be done regarding /boot. So I'm not sure if the existing boot partition (which is only an ext3 filesystem) will be used or a new /boot will be created and used under the suse /.

I guess I need to understand how the grub 1st stage (in the MBR) knows where to find /boot. Then determine what SUSE has done (uses original /boot partition or creates its own subdirectory under suse /) and what SUSE did to grub (if anything) after the install.

e.g. with FC5, because I had a boot partition, I never needed to re-run grub when grub.conf changed. Will this still be the case?

BostonDriver
07-23-2006, 12:12 PM
Quick update -

The installation finished. As I suspected, suse 10.1 created a subdirectory "boot" under the suse / filesystem. This is what suse taught grub to use now to look for grub.conf.

Now I need to figure out how to teach grub to use the original hda0,3 primary partition. Then I guess I simply move everything from suse's /boot into that partition.

I'm guessing (and a suggestion to anyone who searches and finds this thread later on) that if I told the installation to mount /dev/sda3 as /boot, that sues 10.1 would have used this. Of course, do not select "format this partition". I considered doing this initially, but received some message that turned me off.

Any pointers on what to read so I can teach grub to look in the old place for /boot? I have the grub manual from GNU, but 1st pass through, didn't see anything. I probably do not know the term I need (or, don't have enough coffee in me just yet.)

BostonDriver
07-24-2006, 10:11 AM
Now I need to figure out how to teach grub to use the original hda0,3 primary partition. Then I guess I simply move everything from suse's /boot into that partition.

I needed to boot into grub's cli. To do this I hit escape at the graphical menu. I used the setup command to tell grub on the MBR where I wanted it to find boot. Initally FC5's install did all this so I didn't know how any of this was done (or that it was even possible) until I RTFM'ed. The section on this is real small in the grub manual.

I copied what I belive I needed from the suse /boot directory into the (now common) /boot partition. I didnt' copy everything as I'm not sure what some of these files (and directories) are for. FC5 doesn't have them, so they are probably SUSE "features" or enhancements. But since this exercise is to learn about SUSE, it seems like the first place to start.


I'm guessing (and a suggestion to anyone who searches and finds this thread later on) that if I told the installation to mount /dev/sda3 as /boot, that sues 10.1 would have used this. Of course, do not select "format this partition". I considered doing this initially, but received some message that turned me off.


Now that I've been through this once, and have a bit of SUSE under my belt, I believe that telling the SUSE install to mount (and not format) the existing /boot primary partition would have at least put all the files in /boot.

dkeav
07-24-2006, 05:47 PM
the only files you need in /boot to boot an OS is your kernel and/or initrd images grub only needs to be installed on the actual OS that is doing the booting in this case FC5 is the install that grub resides on and is going to boot suse, you dont need any bootloader or any files that belong to a bootloader installed on the suse install of /boot, you can share /boot between the two os's if you want, but be warned to make sure they dont use the same kernel names