Join or Login

Fix grub after windows xp install - pclinuxos

by me

You installed PCLinuxOS, because windows was giving you major headaches. Everything is perfectly setup in PCLinuxOS, all your setting for thunderbird, favorites, LAMP, all the different browsers, bookmarks and what not. Now your itching!! Computers shouldn’t work this good, I need to dual boot windows xp and PCLinuxOS. Break up the monotony of one operating system. Plus You have to get your fix of Rome: Total War.

Problem: Windows XP installation Master Boot Record (MBR) masks your PCLinuxOS GRand Unified Bootloader (GRUB).
Solution: rebuild grub and then add Windows XP to the boot menu.lst.

Here is how I did it.

NOTE: this is based on a 40 gb hard drive, with a swap as the first partition followed by root, /home, windows. see pic below. sloppy pic I know.partitions pclinuxos - swap, /, /home, windows

First we fix grub so we can boot into PCLOS.

You will need your original PCLinuxOS live-cd I used the 2007 version of PCLinuxOS.

After you have booted windows xp, did all your updates and windows xp is working properly. Pop in the PCLinuxOS cd and restart your computer, of course making sure your BIOS has a cd-rom as the first boot device.

I logged in as guest and used the terminal program- super user mode under System -> Terminals, but I am sure you can log in as root. First you have to enter grub find the partition your PCLinuxOS grub is on.

code:
grub
find /boot/grub/stage1

it should spit out (hd0,*) with * being the partition number your grub is on, mine is (hd0,4).
so after you get that information and you are still in the grub prompt.

code:
root (hd0,4)
setup (hd0)
quit

now restart computer taking the PCLinuxOS disk out of your cd-rom drive and pressing <enter>. Your computer should boot the familiar PCLinuxOS boot menu.

Now go into File Manager - Super User Mode, That would be under System->File Tools. Go Into your root Folder and then into boot, then grub, and open the menu.lst file with an editor..

at the end of the file press <enter> twice. All boot menu items must be seperated by a newline. Here is my menu.lst for example.

code:
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,4)/usr/share/gfxboot/themes/pclinuxos/boot/message
default 0


title linux
kernel (hd0,4)/boot/vmlinuz
BOOT_IMAGE=linux root=/dev/hda5 acpi=on splash=verbose vga=788
initrd (hd0,4)/boot/initrd.img


title linux-nonfb
kernel (hd0,4)/boot/vmlinuz
BOOT_IMAGE=linux-nonfb root=/dev/hda5 acpi=on splash=verbose
initrd (hd0,4)/boot/initrd.img


title failsafe
kernel (hd0,4)/boot/vmlinuz
BOOT_IMAGE=failsafe root=/dev/hda5 failsafe acpi=on
initrd (hd0,4)/boot/initrd.img


title Windows XP
rootnoverify (hd0,2)
makeactive
chainloader +1

as windows is located on the (hd0,2) partition. you can find this by opening a terminal and typing in
code:
fdisk -l

It’s the partition with the file system NTFS or FAT32 depending on the filesystem you chose when you installed windows xp.
Hard drives are like multi-dimensional arrays with (hd0,1) being hda2, with hda equaling hd0 and 1 being the partition labeled /dev/hda2, if it where (hd1,2) hd1 would be hdb and 2 would be the third partition and so on, So my (hd0,2) is actually the partition labeled /dev/hda3.
Well I hope this helps some people from banging their heads againt the electronic filing system (computer).

Tags: ,

9 Responses to “Fix grub after windows xp install - pclinuxos”

  1. windows xp id install Says:

    [...] GRand Unified Bootloader GRUB.Solution: rebuild grub and then add windows XP to the boot menu.lst.http://h8ersclub.com/fix-grub-after-windows-xp-install-pclinuxos/Windows XP - Identify Current Product Key in Windows XP InstallationApr 19, 2007 … Keywords: [...]

  2. pclinuxos Says:

    [...] GRand Unified Bootloader GRUB.Solution: rebuild grub and then add Windows XP to the boot menu.lst.http://h8ersclub.com/fix-grub-after-windows-xp-install-pclinuxos/RE: maybe ubuntu should get to work - Newmobilecomputing.comThe next rung down are the spins: [...]

  3. Aaron Says:

    I couldn’t understand some parts of this article b after windows xp install - pclinuxos | The H8ers Club, but I guess I just need to check some more resources regarding this, because it sounds interesting.

  4. me Says:

    If you do not know what an array is. I will explain, an array is a set of constants or variables. Like what are you doing today could be an array of ( laundry, work, eating , bathroom, smoking a cigarette, *) you would do all these things all day but in what section of the day would you do these things? so We can put your day in this order. Where “*” is a wild card ( being anything that comes up ) or variable, in mathematical terms. so in the terms of a daily life the day may be composed like this.
    daily life

    $dailylife = array( laundry, work, eating , bathroom, smoking a cigarette, *)

    with the daily life configuration script
    $dailylife[3];
    $dailylife[5];
    $dailylife[4];
    $dailylife[2];
    $dailylife[5];
    $dailylife[4];
    $dailylife[1];
    $dailylife[5];
    $dailylife[4];
    $dailylife[0];
    $dailylife[5];
    $dailylife[4];
    $dailylife[3];
    $dailylife[5];
    $dailylife[4];
    $dailylife[5];
    You really shouldn’t smoke so much and relax and as arrays are, $dailylife[3] would be the same as bathroom. This is because all arrays start as 0. So $dailylife[0] would be laundry. The hard drives are arrays too, in this program. So hd0,0 would be your first hard drive and first partition. I hope this helps in your understanding of this article.

  5. chamila Says:

    i did it without getting that difficult…………….

    simply put the l;ive cd again and redo MBR. and saved…..its funny…grub loader returned ….

  6. me Says:

    While of course you can do that, and is the easiest way. But in essence you are not learning how to work with grub. It’s not really difficult to learn. All you have to remember is that arrays start with 0. I know I could have written an article two sentences long. Just hit redo mbr, but I like to know how things work, just in case redo MBR fails.

  7. chamila Says:

    sorry………….! i did’t mean to hurt anyone…. i just mentioned for another one like me who is searching…linuxworld and who are new to linux. one of my friends has omitted linux simply because of that reason he coudn’t fix it. i appreciate the method of yours absolutely.

  8. me Says:

    your comment really hurt me and I cried. lol. ah chamila no biggy their is about fifteen different ways to skin a cat, I counted.

  9. JP Says:

    This was very helpful! Everyone else out there seems to only have instructions for when you load Windows first, but not Linux first. This saved me gobs of time. THANKS!

Leave a Reply

Powered by WordPress