Grub Trouble
Hey, I use SimplyMEPIS 3.3.1-1 on a second 80gb hard drive, with xp on the first 40gb. I have grub on my mbr, and recently got it into my head to install ubuntu on some of the free space. Well, Ubuntu's installation of grub said it recognized "Debian Linux 3.1", which MEPIS is based off of. However, when I rebooted the system, only the memtest option for mepis still existed. Windows worked, and I put in a LiveCD of mepis. When I installed grub frum MEPIS OS Center and rebooted, it only recognized my previous MEPIS installation and not ubuntu.
my fdisk -l looks like this: Code:
Disk /dev/sda: 65 MB, 65536000 bytes hdb1 is mepis /, hdb2 is swap, hdb3 is /home, hdb4 is ubuntu /. sda1 is my usb drive. According to QTParted from MEPIS, hdb1 is 10gb, hdb2 is 1.46gb, hdb3 is 40gb, and hdb4 is 6.52gb, with 18.35gb free space. |
Use ONE of your installs to control grub, whichever you prefer.
Please provide the contents of /boot/grub/menu.lst and the output of # ls -l /boot for each distro, and I'll explain how to go further You should probably take a look at $ apropos grub $ man update-grub |
I did all the following from MEPIS (hence the /mnt/hdb4/boot)
Here is the result of my MEPIS menu.lst: Code:
timeout 15 Code:
# menu.lst - See: grub(8), info grub, update-grub(8) Code:
RedNovember@1[~]$ ls -l /boot I was thinking about possibly adding SUSE 10.0 and Slackware later. Would this affect that at all? |
OK, so what you probably want to do is have MEPIS controlling the bootloader in the MBR,
and every other distro you install can have a bootloader on their own partition. So, in MEPIS add this to /boot/grub/menu.lst: title Ubuntu root (hd1,3) chainloader +1 boot See how that works for you. I'd recommend you backup your MBR, grub config and make sure you never install a bootloader to the MBR. You might want to get tricky and be able to go back the other way by chainloading from Ubuntu to MEPIS: so edit /mnt/hdb4/boot/grub/menu.lst and add title MEPIS root (hd1,0) chainloader +1 boot Get the idea? |
I see what you're saying. What would happen if I did this? Would it then take me to another grub screen after I selected Ubuntu? I would think that since the Ubuntu bootloader would be on its partition, it would take me straight to Ubuntu. Is this what would happen?
Also, how would I back up my MBR? Thanks a lot for all the advice. I was wondering about this for a while. |
Yes it should take you from the MEPIS grub screen to the Ubuntu one.
To backup your MBR (assuming you're booting from hda) # dd if=/dev/hda of=MyMBR.img bs=1 count=446 by default, dd uses bs=512, which would also copy your partition table ... (which is the last 64 bytes of the first sector) ...not something you always want to do. Remember to save this file on an external device. |
Ok, I edited my menu.lst for my MEPIS grub, but if I select Ubuntu, it takes me to a blue and black screen for "GNU Grub", and asks me to select an option again. I assume this is because I don't have Grub on my Ubuntu partition. Would I have to download/burn an Ubuntu LiveCD to install Ubuntu's grub on the partition? or would the Ubuntu install cd do that?
|
Quote:
It would probably be easiest for you to reinstall Ubuntu and write the bootloader to hda4 rather than the MBR. |
All right, thanks for all the help... I think this will probably solve the problem.
|
GRUB and LILO always conflict with Windows. And GNU GRUB is not so robust, causing many problems during boot.
So try GRUB for DOS please. It is a cross-platform boot loader based on GNU GRUB. The GRUB.EXE can be started from DOS/Win9x; and GRLDR can be started from BOOT.INI of Windows NT/2K/XP/2003; and even more, the GRUB.EXE can be started from LINUX via the KEXEC tool. By using GRUB.EXE or GRLDR, you don't have to touch your MBR. It is the safest way coexisting with DOS/Windows. You needn't install GRUB for DOS. Just run GRUB.EXE from DOS, or append a line of "C:\GRLDR=START GRUB" into your BOOT.INI(restart and select the "START GRUB" menu item), that will do. Download GRUB for DOS here: http://freshmeat.net/projects/grub4dos/ There is a fat12grldr.img file with the GRUB for DOS release. You can create a GRUB bootable floppy with this fat12grldr.img file. Or, you can just copy GRUB.EXE to your DOS floppy and run GRUB.EXE to enter the GRUB environment. If the system has no DOS/WINDOWS, you may use the bootlace.com utility to write GRLDR boot record onto the MBR. |
lemme see if i'm following this right...
if i were to add: title dsl root (hda5) chainloader +1 boot ... then it would allow me to boot my dsl install from my 5th partition on my first hd. and if i were to add title SUSE root (hda1) chainloader +1 boot it would add another option to boot SUSE from the first hd? and i could install as many distros as i have the partitions for and all i need to do to allow me to boot from them all once again is to add those 4 lines of code to the grub config??? it seems too good to be true. its really that simple?? eep, before i post.. i noticed the hds are writen a little different.... so (hda5) would become (hd0,5).... that right? |
Quote:
root (hd0,4) and it would chainload the bootloader on hda5 Quote:
Quote:
Each subsequent install will need to have their bootloader installed to the /boot partition (or / if there is not a separate boot partition) for the respective distro. DO NOT INSTALL THE BOOTLOADER FOR SUBSEQUENT DISTROS IN THE MBR! It is good, true and simple :) Quote:
...(hd[disk][partition]) Remember to make backups of your bootloaders AND SAVE THEM ON REMOTE/REMOVABLE MEDIA, because if you make a mistake while playing around you might find it tricky to recover. |
so in theory this sould proove no problem for even having multiple opperating systems to boot from different partitions on the same physicla drive? even logical partitions in the extended partition??? or is that pushing it?
|
Yes, you can have multiple OS's chainloaded on any partition (primary or logical).
They do not have to be on the same physical drive. To essentially have a 'back' button on a chainloaded OS's boot menu, just chainload the MBR. |
All times are GMT -5. The time now is 10:22 AM. |