Results 1 to 7 of 7
Well, I tried to put Debian on my home computer dual boot (this is my third attempt, because I keep changing my system; the first two times worked fine). I ...
- 04-20-2006 #1Just Joined!
- Join Date
- May 2005
- Location
- Maryland, USA
- Posts
- 32
Foobar on Debian Install
Well, I tried to put Debian on my home computer dual boot (this is my third attempt, because I keep changing my system; the first two times worked fine). I am quite familiar with Linux as it is a big part of my day job, so I am surprised at the results of tonight's work:
I install Debain to dual boot with windows, and GRUB sees Windows and writes to mbr. On reboot, all I get is "Error loading operating system!"
What do I do now? Is there any way to repair this?
Regards,
p
- 04-20-2006 #2
Repair the MBR with Grub:
http://www.gnu.org/software/grub/man...-GRUB-natively
If that doesn't work, try a live CD (Knoppix), and do a
to see if the partition table is OK.Code:fdisk -l
If the partition table is corrupted, then you'll just have the rewrite it with fdisk (partitions have to be same size as they were)."To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."
-Bruce Lee
- 04-21-2006 #3Just Joined!
- Join Date
- May 2005
- Location
- Maryland, USA
- Posts
- 32
I got GRUB to load up properly, but it appears the entry to load linux is pointing to the wrong place! I hit the linux kernel in GRUB and I get the following:
root (hd1,1)
Error 22: No such partition
How do I find out what the partition is? I thought it was hd1,1 since my computer boots off of the sata hard drive (my 2nd hard drive in bios). hd1,0 is windows and it boots fine.
- 04-22-2006 #4Linux Engineer
- Join Date
- Oct 2004
- Location
- Vancouver
- Posts
- 1,366
not sure if you are taking this into account or not, but hd numbers and partitions start at 0 in grub, so for two examples hardrive 1, 2nd partition would be (hd0,1), hard drive 2, 4th part would be (hd1,3)
Operating System: GNU Emacs
- 04-23-2006 #5Just Joined!
- Join Date
- May 2005
- Location
- Maryland, USA
- Posts
- 32
I am pretty sure my mapping is correct for the linux root. Here is my GRUB menu.lst file:
---------------------------------------------------------------------------
## ## End Default Options ##
title Debian GNU/Linux, kernel 2.6.8-11-amd64-generic Default
root (hd1,1)
kernel /boot/vmlinuz root=/dev/sda2 ro console=tty0
initrd /boot/initrd.img
savedefault
boot
title Debian GNU/Linux, kernel 2.6.8-11-amd64-generic Default (recovery mode)
root (hd1,1)
kernel /boot/vmlinuz root=/dev/sda2 ro console=tty0 single
initrd /boot/initrd.img
savedefault
boot
title Debian GNU/Linux, kernel 2.6.8-11-amd64-generic
root (hd1,1)
kernel /boot/vmlinuz-2.6.8-11-amd64-generic root=/dev/sda2 ro console=tty0
initrd /boot/initrd.img-2.6.8-11-amd64-generic
savedefault
boot
title Debian GNU/Linux, kernel 2.6.8-11-amd64-generic (recovery mode)
root (hd1,1)
kernel /boot/vmlinuz-2.6.8-11-amd64-generic root=/dev/sda2 ro console=tty0 single
initrd /boot/initrd.img-2.6.8-11-amd64-generic
savedefault
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd1,0)
savedefault
makeactive
chainloader +1
---------------------------------------------------------------------------
And my devices map is:
(hd0) /dev/hda
(hd1) /dev/sda
So I'm stumped right now! It finds widows just fine, but gives me that Error 22 when trying to get linux!
- 04-24-2006 #6Linux User
- Join Date
- Jul 2004
- Posts
- 256
I ran into the exact same problem when I booted off my second drive. The drive orders do not remain the same, hd0 now points to the drive you boot off of.
Originally Posted by pmartin
The drive that has grub: /dev/hdb2
Since I set bios to boot from /dev/hdb, /dev/hdb becomes (hd0) in grub, so
/dev/hdb2 becomes "root (hd0,1)"
Tip: when you get that error, you can edit the 'root' line, type (hd[tab] and you'll get a list of valid devies, and (hd0[tab] to get a list of partitions. (Tab too early and you'll get a list of all possible, not which ones you have)
grub error codes: http://www.gnu.org/software/grub/man...e2-errors.html--monkey
- 04-26-2006 #7Just Joined!
- Join Date
- May 2005
- Location
- Maryland, USA
- Posts
- 32
Though it doesn't really make sense, your solution worked! I went to edit the grub listing and tab into the "hd" drive mapping, and the results showed me the linux partition.
Thanks for the help everyone!


Reply With Quote
