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
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.
- 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:
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?