Click to See Complete Forum and Search --> : Mandrake/Gentoo Dual Boot Problem
unbound18
10-14-2003, 01:54 AM
Help!
Here is my situation, and I'd appreciate any help I could get. I currently have two hard drives. One initially had Win2000 and the other had Mandrake 9.1. I decided to install Gentoo on a second partition on the windows drive. The problem is that when I installed Gentoo it messed with my boot loader. Now I can boot into Gentoo and Windows. I really need to be able to boot into my Mandarke system and I don't know what to do. All I should have to do is edit /etc/lilo.conf and add the Mandrake address right? I have no idea how to do this. I didn't note any of the Mandrake kernel information as I didn't intend to loose it all. If someone could help me out I would really appreciate it.
Thanks in advance..
In case it helps. The Mandrake drive is /dev/hdb1 for boot and /dev/hdb3 for root.
I know that I have to modify the fstab too, but how??
freakmn
10-14-2003, 02:08 AM
To find out the kernel, I would boot gentoo, mount the mandrake drive (ex. mount /dev/hdb1 /mnt/hdb1), and look in the /boot of the mandrake drive to find out the kernel image name (ex. bzImage-2.4.22). Then use your favorite test editor to add the following lines to your /etc/lilo.conf (of the gentoo drive for now.)
image=/mnt/hdb1/bzImage-2.4.22 #Enter your actual kernel image that you found out earlier
label=Mandrake
root=/dev/hdb3
save and run lilo. You should have an option for Mandrake now.
<edit>
once you have done that, you can try to merge the two /etc/lilo.conf's to have all boot images available. IIRC, Mandrake defaults to have a few different images (failsafe, linux, something else...), and if you want to keep those, you will have to rebuild them by hand. If I were you, I would take the most complex lilo.conf and add to it, so most of the images will probably work, even if you mess up. If you aren't comfortable doing that by yourself, post back and someone will probably help you piece them together.
</edit>
Greg
unbound18
10-14-2003, 12:45 PM
Well, this is the farthest I've got so far. But it says that it is missing an init file or some thing.
I added this to my lilo.conf
image=/mnt/hdb1/boot/vmlinuz
label="mandrake"
root=/dev/hdb6
initrd=/mnt/hdb1/boot/initrd.img
I have also tried to do the root as /mnt/hdb6 but I don't know if i did it right or something, becausei didn't work.
Thanks, any other ideas?
mdwatts
10-14-2003, 05:07 PM
Where did you have the Mandrake bootloader installed?
If the Mandrake boot/root partition on the second HD, then it will be as easy as adding
other=/dev/hdb#
label=Mandrake
to /etc/lilo.conf
If the Gentoo Lilo overwrote Mandrake's Lilo that was originally installed in the mbr, then you will need to boot into Mandrake (rescue mode), change it's own /etc/lilo.conf to point to the Mandrake boot/root partition and then run /sbin/lilo (as root) before you can add Mandrake the the Gentoo Lilo.
MasonS
10-14-2003, 05:17 PM
Originally posted by unbound18
Well, this is the farthest I've got so far. But it says that it is missing an init file or some thing.
I added this to my lilo.conf
image=/mnt/hdb1/boot/vmlinuz
label="mandrake"
root=/dev/hdb6
initrd=/mnt/hdb1/boot/initrd.img
I have also tried to do the root as /mnt/hdb6 but I don't know if i did it right or something, becausei didn't work.
Thanks, any other ideas?
If Mandrake is on its own drive, then it seems strange that root would be on hdb6...more like hdb2 or 3, I would think. Did you actually mount the Mandrake root partition in Gentoo? If so, then just copy Mandrake's lilo.conf entry into Gentoo's lilo.conf and run lilo (according to the first reply). I think I've had that init error when I've screwed up where the root partition is. I'm not sure, so if it does it again then post the error.
EDIT: Also, having quotes around the label is dubious, so remove them.
unbound18
10-16-2003, 01:22 AM
mdwatts,
The bootloader for both systems has been installed on hda. I booted into rescue mode and couldnt' really figure out what to do. First of all, I was lost at what screen I was actually dealing with. Also, I don't know what program I would use to edit out of the shell.
That aside, I can get into the mandrake drive if I just mount and look at the lilo.conf. I've made the mandrake entry in the Gentoo lilo.conf exactly the same. Is this a problem? Must be because it obviously doesn't work. I think I just dove off the deep end when I can't swim.
unbound18
10-16-2003, 01:37 AM
Alright, I'll outline the problem once again. I can't get into mandrake which is installed on a separate HD than Gentoo and Windows. On the mandrake drive (hdb), the root and boot directories are both on hdb1. My goal is to use any boot loader I can to get my mandrake back which is currently unbootable. When I try to load Mandrake from the Gentoo lilo it says that it can't find the init file for mandrake. Here is my gentoo lilo.conf:
boot=/dev/hda
map=/boot/map
instsall=/boot/boot.b
prompt
timeout=0
default=gk_linux
image=boot/kernel-2.4.20-gaming-r3
label=gk_linux
root=/dev/hda7
initrd=/boot/initrd-2.4.20-gaming-r3
append="root=/dev/hda7 init=/linuxrc"
other=/dev/hda1
label=dos
image=/hdb1/boot/vmlinuz
label=mandrake
root=/hdb1
init=/hdb1/boot/initrd-2.4.21-0.13mdk.img
That's all, I'm assuming that hdb isn't mounting correctly or something. Do I have to make changes in the gentoo fstab in order to make it work? Would if help to install the lilo loader into the /dv/hdb? Personally, my priority for now is to get into Mandrake so if that mght work I'd be willing to try it. Mandrake recovery worked a little, but I couldn't get into KDE or anything. Thanks in advance for your help.
MasonS
10-16-2003, 07:30 AM
Remove the references to hdb1 in everything EXCEPT the root entry.
image=/boot/vmlinuz
label=mandrake
root=/hdb1
init=/boot/initrd-2.4.21-0.13mdk.img
I also think init should be initrd as per the Gentoo entry.
unbound18
10-16-2003, 11:44 AM
Well! That kinda worked a little. I mounted /dev/hdb1 into the /mnt/gentoo/boot2 folder so that it looked the same as the gentoo one. Changed the lilo.conf to
image=/boot2/boot/vmlinuz
label=mandrake
root=/dev/hdb1
init=/boot2/boot/initrd-2.4.21-0.12mdk.img
Mandrake booted with almost no issues. A couple services don't work but I think that it is because I previous loaded mandrake from rescue mode. I check the directories and all my files are still there! Best news I've heard in a while. Now, when manrake is booted into that mode, how can I get into KDE? It prompts me to log in, so I do as root. Then I'm given all my directories. Oh, and when I do it there is like -bash not found error or somthing. Could someone walk me through and help me get X running again on that drive? Thanks a llot for helping me this far!
MasonS
10-16-2003, 12:54 PM
Someone please correct me if I wrong:
You don't need the Mandrake partition mounted to the Gentoo root filesystem so stop doing that with regard to LILO. It was suggested that you do so to check Mandrake's lilo.conf so that you could get the proper entry in the Gentoo lilo.conf and run LILO again. The Mandrake entry in your Gentoo lilo.conf should look EXACTLY like it does in the Mandrake lilo.conf.
That being said: Remove all references to /boot2 in your lilo.conf and change init to initrd so that your Mandrake entry in your Gentoo lilo.conf looks like this:
image=/boot/vmlinuz
label=mandrake
root=/dev/hdb1
initrd=/boot/initrd-2.4.21-0.13mdk.img
Run lilo again. Boot again.
If there is any trouble, post the error that you receive and where you receive it.
unbound18
10-16-2003, 01:17 PM
I have to enter the Gentoo filesystem in order to run /sbin/lilo. Right? If I do that then /dev/hdb1 has to be mounted somewhere I think. I changed my /etc/lilo.conf to:
image=/boot/vmlinuz
label=mandrake
root=/dev/hdb1
initrd=/boot/initrd-2.4.21-0.13mdk.img
That doesn't work though because vmlinuz isn't in the /boot directory. Isn't it on a totally different hard drive? Anyway, when I run /sbin/lilo it adds my gentoo fine and dos fine, but it won't load mandrake because it says:
Fatal: open /boot/vmlinuz: No such file or directory
That was the reason that I had mounted /dev/hdb1 into the whole /boot2 thing. That actually let me boot into mandrake. It's just that I think running the rescue screwed up some things with it. Hmmmm, what does this all mean...
dalek
10-16-2003, 02:44 PM
Do not flame me. I will tell how I did it and it worked. You can try this if you want. Any time you update the kernel you will need to update both places and run /sbin/lilo.
I am assuming you are in Gentoo trying to run /sbin/lilo to add Mandrake so here goes.
Lilo is looking for vmlinux in the /boot directory but it is not there since you have it mounted from Gentoo. It is actually in /mnt/mandrake/boot not /boot. I assume you named it mandrake. Put a copy of the Mandrake vmlinux kernel file in the /boot directory of your Gentoo. As long as the Gentoo entry does not point to it, it will not load or see the Mandrake kernel. However when you run /sbin/lilo it will see the kernel and say 'it is there where it should be'. Even if it is not technically.
I tried this on mine and it worked fine. Both OS's boot without a problem. The only thing is that if anything changes and you want to update lilo you have to do it from Gentoo or reverse the entire process to do it from Mandrake.
Did that make sense? It took me a while to figure that out. I guess you could also put a link but I haven't tried. Since I have two different versions of kernel between Gentoo and my Mandrake I checked, it is loading the proper kernel, Mandrake for Mandrake and Gentoo for Gentoo. It works so I figure screw it. It's happy and I'm happy. Well done!
Hope that helps. See if you can fool that thing too. I assume grub does work better for this reason. I couldn't figure out the drive naming scheme though.
:D :D :D
unbound18
10-16-2003, 07:51 PM
dalek, that is was a good call. I had to copy the kernel and the init file over and it worked. It did the same thing as my crazy sketchy mounted boot2 trick did though. Mandrake loaded in both cases, but i think that the boot is messed up.
I think that when I did the recovery mode from the Mandrake cd the boot got messed up. So I can boot into mandrake, but it's like the shell and I'm trying to get KDE back. I guess I'm just not sure what do after I have messed things up with Mandrake recovery mode. I'm forced to login before anything. So, that's the situation. Thanks for the help this far.
dalek
10-16-2003, 09:25 PM
At least I didn't get burned because of that post. I expected to get flamed big time. I figure if it works and doesn't #%^@& something up, do it.
Your welcome. It's not our fault lilo is so stupid. I guess that's why so many use grub. I still can't figure out that naming thing. :confused:
Later
:D :D :D :D
Oh, may try to redo as a upgrade. It will give you yet another entry in your lilo but it may correct whatever is messed up.
Just a thought. Might work, might not.
unbound18
10-16-2003, 09:31 PM
Hmmm...hypothetically I should be able to upgrade to Mandrake 9.2 or something and not erase all my info. Maybe that is worth a shot. I think I'll probably be doing a serious backup of everything on that drive though...command line style. Should be fun. We'll see what happens..
MMYoung
10-16-2003, 10:09 PM
I'm using MDK 9.1 as my primary linux distro for right now. I'm also using Windows 2000 Pro. When I installed MDK it loaded the necessary "stuff" in lilo to boot to Win2k.
I then install Slackware 9.1 and had it install lilo to its root partition. When I rebooted into MDK I just, as su, mounted the slackware root partition. Then I created a directory on my MDK / partition call slackboot. I cd'd over to /mnt/slack and copied the contents of the boot directory to the slackboot directory on my MDK partition. Pointed lilo to that directory for the vimluz and initred (System.map). Rebooted, selected Slackware and there it was. Did the same thing for Gentoo. Now when I upgrade my kernels or the whole distro all I have to do is copy the /mnt/slack or /mnt/gentoo boot directory files to the /slackboot or /gentooboot directory in MDK and I'm good to go.
Hope this helps,
MMYoung
BTW, I actually got this tip from a post on this forum somewhere but can't remember the thread location now.
dalek
10-16-2003, 10:12 PM
Create a new partition and copy over your /home directory. That will save a lot of your stuff and settings to.
I would just reinstall with 9.2 instead of upgrading. If you chose to do that just hit F1 and type in expert. When you select your partitions just point it to the one you copied to and make it /home and use the old partitions for the rest. After the partitions are written you will get a screen asking what partitions to format, just make sure it does not format the /home partition but does format the rest. Make sure you remember which it is, like /dev/hda6 or whatever.
I have reinstalled that way a few times and it saves all your documents and most settings for all users except root of course. It will be gone.
Just my two cents worth for whatever that is worth.
:D :D :D