Hy guys i wish to know to edit boot option in linux. when i have two operating systems one of which is windows xp.can any one help me?

Dani AI

Generated

Good question. Dual-boot is all about the bootloader. Building on ’s point, first check which GRUB you have, since steps differ:

  • Find your GRUB version:

    grub-install --version

    If it shows 2.x, follow the next section; 0.97 indicates legacy GRUB.

GRUB 2 (most modern distros):

  • Try auto-detect first (Debian/Ubuntu):

    sudo update-grub

    If Windows is not detected, ensure the os-prober package is installed, then run it again. On Fedora/openSUSE, the equivalent is:

    sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  • Manual entry (replace hd0,msdos1 with your XP partition, e.g. /dev/sda1):

    menuentry "Windows XP" {
        set root=(hd0,msdos1)
        chainloader +1
    }

    Then regenerate the config. See the GRUB manual for details on chainloading and device notation GRUB manual and Debian’s overview of GRUB tools Debian wiki: GRUB.

Legacy GRUB:

  • Add a Windows chainloader stanza to your boot menu (adjust the disk/partition as needed):

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

    Note: (hd0,0) is the first disk, first partition. This approach is documented in the GRUB manual linked above.

If you installed XP after Linux and your boot menu vanished (as hints can happen), restore GRUB from a Linux live environment:

sudo grub-install /dev/sda
sudo update-grub   # or grub-mkconfig -o /boot/grub/grub.cfg

Tips:

  • Use sudo fdisk -l or lsblk -f to confirm which partition holds XP.
  • If XP lives on a second drive, you may need a drive map (GRUB 2: drivemap -s; legacy: map) so Windows thinks it is on the first disk. The manuals cover this in depth GRUB manual.

Recommended Answers

All 2 Replies

Yes, is xp already installed?

If so it should have automatically been added. If not you will probably have to edit /boot/grub/menu.lst

you should first install xp then install linux
you should install linux in your last drive than other drive

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.