Results 1 to 9 of 9
Hi. I have a Debian installation on my desktop PC, but after installing Windows XP Pro on an other partition, there's no option at boot up anymore to boot the ...
- 02-10-2006 #1
How can I boot Debian Linux after have installed Windows? Or: how to restore GRUB?
Hi. I have a Debian installation on my desktop PC, but after installing Windows XP Pro on an other partition, there's no option at boot up anymore to boot the Debian Linux OS: the GRUB menu is gone and my system goes strait into Windows.
How can I restore the GRUB menu? Or just reinstall it?
When I boot up from the Debian installation CD there's an option to install the GRUB boot loader, but when I try to do that, I go to the partitioning section first. My guess is that I have to set a bootable flag or something first before I can install GRUB. Am I right? Would setting the bootable flag on what was my / (root) partition anable me to install a nice GRUB that lets me choose between Debian and Windows?
Thanks,
Daan
- 02-10-2006 #2
Hi,
the windoze installation has overwritten your MBR.
An easy way to restore GRUB is to boot from a LiveCD (for example KNOPPIX).
Boot from a LiveCD and mount the partition which contains the boot directory
of your Debian system (i.e. to /mnt/target)
Edit /mnt/target/boot/grub/menu.lst and add an entry for your Windows
installation.
Type grub to get a GRUB shell. In the GRUB shell, you should first runCode:title Windows XP # Adjust the root entry for your system!!!!! # (hd0,1) is the second partition of the primary master root (hd0,1) makeactive chainloader +1 boot
the root command, to tell GRUB where to find the necessary files:
(hd0,0) stands for hda1. If your are not sure, which partition you shouldCode:root (hd0,0)
enter here, you can figure it out with:
To install GRUB in the MBR of the first drive enter:Code:find /boot/grub/stage1
Now type quit, reboot your system and cross your fingersCode:setup (hd0)

Cheers
JAN
- 02-10-2006 #3
Thanks Jan!
I did as you told me and as soon as found out that I had to run the grub command as root, it was really easy. (You can run grub as a normal user, but than it will nor respond as you said it would).
Thanks again,
Daan
- 01-13-2007 #4Just Joined!
- Join Date
- Dec 2006
- Posts
- 8
GRUB Loading stage.1.5
I did what Jan said, but when I boot I get the following message:
(with a bunch of strange signs after it)Code:GRUB Loading stage.1.5
Can anyone please tell me what to do. This is really working on my nervs now.
Thank you.
- 01-13-2007 #5
please provide a little more details. which distro? is there any other OS installed in Harddisk? how many harddisks do you have? is it a fresh install?
CasperIt is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 01-13-2007 #6
Here are a couple ways of doing it and hopefully one of them will work for you:
Boot with a Knoppix CD (or some other live-cd), or use a rescue/boot floppy like Tomsrtbt ( http://www.toms.net/rb/ ); determine your root partition and mount it to a temporary mount point; then chroot into it; then reinstall GRUB:
sudo mkdir /mnt/temp
sudo mount /dev/hda1 /mnt/temp
(change /dev/hda1 to match your own root partition)
sudo chroot /mnt/temp
sudo grub-install /dev/hda
or...
determine your root partition, then mount it "dev" option enabled with write permissions. If the filesystem isn't mounted you'll need to mount it like this (be sure to change "hda1" and "hda" to match the location/device in your own system):
sudo mount -o dev,rw /mnt/hda1
if it's already mounted, remount it like this:
sudo mount -o remount,dev,rw /mnt/hda1
now restore grub like this:
sudo chroot /mnt/hda1 grub-install /dev/hda
if it doesn't work using chroot, try remounting as outlined above and do:
sudo grub-install -root-directory=/mnt/hda1 /dev/hda
Kanotix has an option to "Restore Grub", simply boot with the livecd and choose restore grub.Debian Sid LXDE Kernel liquorix CPU Pentium IV 2.80GHz GeForce 9400 GT
Debian - "If you can't apt-get something, it isn't useful or doesn't exist"
Giant Debian sources.list | Debian upgrade script smxi | sysinfo script inxi
- 01-13-2007 #7Just Joined!
- Join Date
- Dec 2006
- Posts
- 8
Thanks for the reply. I'm running Debian Sarge and a installation is a few weeks old. I installed Windozs last night witch ate my GRUB!!! I have one hard disk with two partitions. Linux is on the first partition.
Originally Posted by devils_casper
- 01-13-2007 #8
boot up from Debian installation CD and type 'boot=/dev/hda1' at prompt. Debian will boot up. execute 'grub-install /dev/hda' in konsole to reinstall GRUB.
CasperIt is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 01-13-2007 #9Just Joined!
- Join Date
- Dec 2006
- Posts
- 8
Thank you both so much for your help! Its working now! I did what Craigevil said (the first way) and it worked. I used some other tutorials before posting here, but it didn't want to work. So... Great job Craig!


Reply With Quote
