grub.conf for Windows vista or xp dual boot

Cpanel/Whm License $3/mo Plesk License $10/mo Cloudlinux License $5/mo

Q. Where can I find sample grub.conf for Windows vista dual boot system? My entries in grub.conf for Windows Vista accidentally deleted and now I am not able to boot using Grub.

A. GNU GRUB, the GRand Unified Bootloader is intended to provide important bootloader features such as dual booting, command line and graphical interfaces etc. In addition to loading Linux and FreeBSD, it implements the Multiboot standard, which allows for flexible loading of multiple boot images

One unique feature of GRUB is that it can understand filesystems at boot time, rather than just simple blocklists. Hence, you can load any kernel in the file system from the boot prompt without having to edit configuration files or rerun a special installation program. You can enter the GRUB command to boot into Window vista but it requires very good understanding of devices.

Your best option is to boot into Linux and edit /etc/grub.conf or /boot/grub.conf or /boot/grub/menu.lst file and place following code for Windows XP or Windows Vista:
Open grub configuration file
# vi grub.conf
Append following lines for Windows XP or Windows Vista:
title Microsoft Windows Vista
root (hd0,1)
savedefault
makeactive
chainloader +1

Above grub configuration assume that your Windows is installed on first hard disk second partition (/dev/hda2). You only need to adjust line root (hd0,1) as per your setup.

Where,

  • title Microsoft Windows Vista: Start a new boot entry, and set its name to the contents of the rest of the line
  • root (hd0,1) : hd0 specifies your first hard disk (hard disk numbering starts with zero) and 1 number specifies second partition (partition numbering starts with zero). This is where your Windows Vista/XP. Set the current root device to the device device, then attempt to mount it to get the partition size (for passing the partition descriptor in ES:ESI, used by some chain-loaded boot loaders), the BSD drive-type (for booting BSD kernels using their native boot format), and correctly determine the PC partition where a BSD sub-partition is located. The optional hdbias parameter is a number to tell a BSD kernel how many BIOS drive numbers are on controllers before the current one. For example, if there is an IDE disk and a SCSI disk, and your FreeBSD root partition is on the SCSI disk, then use a 1′ for hdbias.
  • savedefault : With this configuration, GRUB will choose the entry booted previously as the default entry.
  • makeactive : Set the active partition on the root disk to GRUB’s root device
  • chainloader +1 : Load file as a chain-loader. Like any other file loaded by the filesystem code, it can use the blocklist notation to grab the first sector of the current partition with +1.

Save and close the file. Reboot Linux:
# reboot

If you need to fix a dual boot Windows Vista and Linux problem please read this article, it explains how to fix a dual boot system if you had to reinstall Windows Vista and you can no longer boot to Linux?

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Related posts

Zuckerberg to Study Crypto in Quest to Fix Facebook

SXI ADMIN

Zooko Wilcox Envisions ‘Ambitious’ Changes for Zcash Cryptocurrency

SXI ADMIN

ZombieChain Comes Alive: Can Ethereum Sidechains Save the Dapps?

SXI ADMIN

ZoKrates Seeks to Bring Best of Zcash to Ethereum with Devcon Debut

SXI ADMIN

Zk-Starks? New Take on Zcash Tech Could Power Truly Private Blockchains

SXI ADMIN

Zk-Snarks Everywhere: Ethereum Privacy Tech Hits Tipping Point

SXI ADMIN

ZipZap to Offer Cash-for-Bitcoin Service at 28,000 UK Locations

SXI ADMIN

ZipZap Resumes Cash-to-Bitcoin Services for UK Shoppers

SXI ADMIN

ZipZap Raises $1.1 Million to Grow Global Bitcoin Payments Network

SXI ADMIN

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More