PDA

View Full Version : [other] How to remove another Linux OS and get to GRUB



jaydoc
May 27th, 2008, 09:46 PM
Hi...

I recently installed a KDE distro - PCLinuxOS Minime....

A great distro - but I have had it with KDE, at least for now....

GNOME on PCLinuxOS 2008 GNOME Remaster (on my Laptop), as well as on Ubuntu Hardy (Desktop) is at least as configurable as KDE, at the very least it suits me better.... Also there is still some problem with the infamous PATA Jmicron controller for Minime.

For these reasons I want to remove MiniMe from the Dual boot, and hand my desktop entirely over to Hardy....

The problem is - GRUB has PCLinuxOS as default boot. How can I format that partition, yet still retain the GRUB menu...? MiniMe detected Hardy Install during installation and offered to add it to the menu for me....

So how do I remove MiniMe and retain Ubuntu...?

Thanks.:)

Paqman
May 27th, 2008, 10:04 PM
First thing to do is sort Grub out. Grub comes in two parts as far as you're concerned:

The MBR
The file /boot/grub/menu.lst

Every copy of Linux you've installed will include it's own menu.lst file. Basically, the Grub setup on the MBR points to one of them. This would normally be the last one you installed.

So you want to make sure Grub is pointing to an installation that isn't going to be wiped. To do this:


sudo grub
root hd(0,0)
setup (hd0)
quit


You'll need to change the hd(0,0) to match the location of the copy of menu.lst you want to use. Grub numbers from zero, so hd(0,0) is actually drive 1 partition 1 (probably called sda1 elsewhere in your system)

You can also remove any entries to the distro you're wiping from menu.lst.

Once Grub is quite happily booting you using a menu.lst contained on a partiton you're keeping, you can fire up Gparted and format/delete the partition containing whatever distros you want gone. And that's it!

Duck2006
May 27th, 2008, 10:11 PM
Some reading on grub.

http://users.bigpond.net.au/hermanzone/p15.htm

jaydoc
May 28th, 2008, 02:30 PM
RED ALERT..... SOS..... SOS.....!

@paqman

I did exactly as suggested..... And it was all well.... I got back my Ubuntu Grub Menu intact as it was....

So I went in and deleted the partition that had MiniMe on it.... I was meaning to format it later.... so didn't format it. it was left empty....

Maybe it led to the numbering of the partitions going wrong, but on reboot there was just a black screen with a message - no boot partition found.

The greatest problem is the installation Hardy CD seems to have gone corrupt, so I have to use another distro's liveCD ( PCLinuxOS 2007) to boot.... and I saw that my Ubuntu partition has the data safely. that's a relief.

SO HOW CAN I GET BACK MY INSTALL. What went wrong....?

Do help out.

jaydoc
May 28th, 2008, 02:43 PM
I did try the following to try and reinstall GRUB.

sudo grub
find /boot/grub/stage1
root (hd0,5) That was what I got from find
setup (hd0) everything seemed OK from the output I got....
quit

Rebooted... STILL the SAME Problem.

meierfra.
May 28th, 2008, 05:54 PM
Some bios refuse to boot if you do not have a boot flag on a primary partition. Boot from a LiveCD and type


sudo cfdisk /dev/sda
(You might have to change the "sda")

the "boot" tap on the bottom is for setting boot flags.

jaydoc
May 28th, 2008, 07:19 PM
@meierfra

I tried.... it doesn't work.....

Any other suggestion...?

meierfra.
May 28th, 2008, 07:46 PM
I didn't had much hope, but thought it's worth a try. Just to make sure, you put the boot flag on a primary partition (sda1 to sda4)?

meierfra.
May 28th, 2008, 07:53 PM
no boot partition found.

Do you know whether this message was from "grub" or from your bios? (Sounds more like a message from you bios)

damis648
May 28th, 2008, 07:57 PM
i have a dell XPS M1530 and i got "no boot partition found" and i know it was from my Bios, so i am passing that to you, as it is probably your Bios.