ACPI administration advocacy advocacy opinion apache audio authentication bash calendar commandline cron database debian desktop development disk dvd emacs email exim files firefox firewall ftp fun grub hardware hardware html images installation ipod kde knoppix laptop latex mplayer multimedia mysql network nfs openoffice opinion opinion pdf perl php postgresql printing scripting scsi security shell sitenews slackware spam ssh subversion svk t23 t43 text thinkpad thunderbird time users windows wine wordpress xwindows xwindows
Recently, I installed Debian on a new system. It came pre-loaded with Vista. I used the gparted to shrink the Vista partition and create some new partitions. Thusly:
/dev/sda1 49G NTFS /mnt/windoze /dev/sda2 981M ext3 / /dev/sda6 5.8G ext3 /var /dev/sda7 587M ext3 /tmp /dev/sda8 229G ext3 /home /dev/sda9 4GB swap
After partitioning I installed Debian using the Netinst CD.
Unfortunately, Vista wouldn't boot after the partition resize. So I had to reinstall it from the install DVD. But then I couldn't boot Linux, because Vista had clobbered my master boot record. Grr...
I hoped that Debian was still on the disk. I booted using the Knoppix live CD and went to the terminal.
First, get the grub shell.
grub
Type:
find /boot/grub/stage1
This returns the location, in my case (hd0,1). Now type:
root (hd0,1)
Or whatever your location was. Then setup the MBR:
setup (hd0)
Now type 'quit' to quit grub. This restored my MBR. It allowed booting of both Windows and Linux. Luckily, Vista hadn't zapped my entire Linux installation.