PDA

View Full Version : Duplicate Linux Icons in rEFIt


Maxwolf
29th July 2007, 11:50 PM
I am making this post because I have been working on this problem for over 48 hours and finally figured it out. If you own a MacBook Intel the newer versions with the 64-bit registrars this is for you but I am sure this will work on the slightly older ones aswell (not to make you feel any worse, na-na bo-bo).

But onto the copy and pasting!

What I Did:
I was installing Ubuntu 7.04 Feisty on my MacBook cause I was tired of the cold emotionless world that is Debian (even though Ubuntu is Debian but whatever).

I do not like using GRUB as my boot-loader because when I load Windows GRUB still pops up and sometimes the keyboard does not work and the only solution is to just reboot multiple times until the keyboard just works (I am dead serious, it just works sometimes, less often than not, but only in pre-OS bootloader like GRUB).

Normally you can chroot and just remove grub and then install lilo, make your /etc/lilo.conf by hand and then execute lilo by itself and it reads your config and installs the bootloader into /dev/sda3 (which is where linux would be if you are triple booting!)

But I screwed it up and installed lilo to /dev/sda and rebooted and now I have two linux icons that both launch grub and lilo is no where in sight...

ArRgGhh! :confused:

What Happened:
After a long night and a pack of smokes I figured out that GRUB writes itself to the MBR (aka /dev/sda) and that is alright, but I don't want GRUB so it handles Windows too even if you choose just Windows from the rEDIt menu it's still accessing the same MBR so the same thing happens, so I have three buttons in my rEDIt menu that do the same thing...not sexy. :(

I need to format my MBR on /dev/sda because there is nothing there for GRUB anyway, its just scanning the drives and see's one of them is Windows and one is Linux and then ontop of that my screwed up install of lilo is showing up too.

What You Need To Do:
I installed a couple tools in the Ubuntu apt-sources by default if not you might have to do some hunting but anyway:

ms-sys
Write a Microsoft compatible boot record

extipl
Yet Another Boot Selector for IBM-PC compatibles

Windows XP CD
You will need this too boot into recovery mode so we can keep Windows from freaking out on us due to playing with MBR.

The Execution:
The first thing you need to do is pop in your Windows CD (if you have an install that is) and then boot it until it asks you what you want to do, press R for recovery mode and then tell it what install of Windows you want to modify for me this was 1 (aka C:\WINDOWS).

Once you are at the prompt type the following commands:

fixboot c:
fixmbr
exitAfter typing exit the system will reboot. What all this does is formats your MBR as if you just freshly installed Windows. We do this to prevent Windows from freaking out when we do the other tasks. GRUB is now removed from your MBR, when you boot up the machine you should have just ONE icon now but it will still use GRUB (or if it uses LILO you can stop and you are DONE).

If GRUB still loads on your /dev/sda3 (or you have two icons still):
Just load up your install of Linux and if you have those two tools listed above installed then give these spells a chance. The first one is extipl. The on-screen instructions are very simple and I refuse to give you commands to copy and paste into it as I don't know your config so just flag your Linux partition (for me /dev/sda3) as not active.

Next would be the ms-sys program. Using this you can write a zero'd out MBR on your /dev/sda because GRUB might still actually be installed there for some reason. Then ontop of that we will write a WINDOWS ONLY MBR on /dev/sda3 so LILO can goto town on a fresh one.


ms-sys -z /dev/sda
ms-sys -m -f /dev/sda3The reason for the blank Windows 2k/XP/2003 partition on the /dev/sda3 is so LILO knows that Windows does exist on the machine because it does exist (on my machine).

liloYou can run lilo now and it will ask if it can install to the MBR and you of course tell it yes. It will add the boot option and setup everything for you. Reboot now and you have three icons for a triple boot MacBook. When you press LInux it will use LILO and load and when you press Windows it will instantly load Windows.

Have a good day!