![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Linux Support Linux - Operating Systems and Applications Support |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
MBR might be FUBARed.
Okay, so story:
I'm running Ubuntu Hardy (with a separate home partition) next to XP. I rarely boot into XP, cause I hate it. But I have to use it for video editing. Slowly, over the last two years, that partition has deteriorated, and a few weeks ago, it died from a virus. I shrugged it off, and started doing my video editing on my laptop, because I couldn't easily repair it. It was so blown apart that I basically resigned myself to reformatting that partition, but I was putting that off for a bit. Today, I had to get my desktop running XP, because my laptop doesn't have the port I need for video capture. So I booted up GParted in Ubuntu, and nuked the partition with XP on it, and rebooted with an XP disk in. It gave me some bogus error about not creating a partition because there were already too many, so I went to boot back into Ubuntu, to change my swap setup. But it didn't boot into Ubuntu. It didn't even go to grub. It just gave me a black screen with, "Reboot and select proper boot device or insert boot media in selected boot device." It let me boot into a cd, but refused to go to grub. I tried a Hardy live CD, but my boot folder looked fine. So I booted back into the XP cd, and installed that. Now, when I turn on my PC, it goes straight to XP. I can still see my other partitions with Explorer2FS, but I don't know how to tell my PC to go to boot loader. And since I no longer have my XP recovery partition (deleted it so I could install XP), I'll have to fix my menu.lst, but that can come later. Help, please? --Matt
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Manager
Join Date: Sep 2004
Location: Colorado
Posts: 988
OS: Mac OS 9.1, Mac OS X 10.5.8, WinXP Pro, FreeBSD 6.0, Gentoo Linux
|
Re: MBR might be FUBARed.
Basically Windows and sometimes Windows programs will overwrite the code already in the MBR. Annoying, but a fact of Windows.
You should just need to reinstall GRUB to the MBR. This can be done by booting a Ubuntu, Kubuntu or any Linux LiveCD that has the GRUB utilities. Boot from your Linux install/diagnostic disc of choice, open a terminal (Terminal, Konsole, xterm, etc) and get root access with sudo su - (with the dash) Then use grub-install --no-floppy /dev/drive where drive is hard drive that's first in the BIOS boot order list. Often this is the one that Linux is installed to, but can be different. If you need help figuring out what drive should be, post the output of fdisk -l and whatever's in /boot/grub/grub.conf (or menu.lst - same thing).
__________________
![]() Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it. When posting what errors you get, please give the full message. It makes helping you much easier. Last edited by shuuhen; 07-20-2008 at 09:42 PM. |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
Okay, I tried, but grub install yelled at me, here are menu.lst, fdisk -l, and error messages.
root@ubuntu:/media/disk/boot/grub# cat menu.lst # menu.lst - See: grub(8), info grub, update-grub(8) # grub-install(8), grub-floppy(8), # grub-md5-crypt, /usr/share/doc/grub # and /usr/share/doc/grub-doc/. default 0 ## timeout sec # Set a timeout, in SEC seconds, before automatically booting the default entry # (normally the first entry defined). timeout 10 # # examples # # title Windows 95/98/NT/2000 # root (hd0,0) # makeactive # chainloader +1 # # title Linux # root (hd0,1) # kernel /vmlinuz root=/dev/hda2 ro # # # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST ### BEGIN AUTOMAGIC KERNELS LIST ## lines between the AUTOMAGIC KERNELS LIST markers will be modified ## by the debian update-grub script except for the default options below ## DO NOT UNCOMMENT THEM, Just edit them to your needs ## ## Start Default Options ## ## default kernel options ## default kernel options for automagic boot options ## If you want special options for specific kernels use kopt_x_y_z ## where x.y.z is kernel version. Minor versions can be omitted. ## e.g. kopt=root=/dev/hda1 ro ## kopt_2_6_8=root=/dev/hdc1 ro ## kopt_2_6_8_2_686=root=/dev/hdc2 ro # kopt=root=UUID=8f3a3a4f-83b0-400e-be69-0dd295029a47 ro ## Setup crashdump menu entries ## e.g. crashdump=1 # crashdump=0 ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd0,5) ## should update-grub create alternative automagic boot options ## e.g. alternative=true ## alternative=false # alternative=true ## should update-grub lock alternative automagic boot options ## e.g. lockalternative=true ## lockalternative=false # lockalternative=false ## additional options to use with the default boot option, but not with the ## alternatives ## e.g. defoptions=vga=791 resume=/dev/hda5 # defoptions=quiet splash ## should update-grub lock old automagic boot options ## e.g. lockold=false ## lockold=true # lockold=false ## Xen hypervisor options to use with the default Xen boot option # xenhopt= ## Xen Linux kernel options to use with the default Xen boot option # xenkopt=console=tty0 ## altoption boot targets option ## multiple altoptions lines are allowed ## e.g. altoptions=(extra menu suffix) extra boot options ## altoptions=(recovery) single # altoptions=(recovery mode) single ## controls how many kernels should be put into the menu.lst ## only counts the first occurence of a kernel, not the ## alternative kernel options ## e.g. howmany=all ## howmany=7 # howmany=all ## should update-grub create memtest86 boot option ## e.g. memtest86=true ## memtest86=false # memtest86=true ## should update-grub adjust the value of the default booted system ## can be true or false # updatedefaultentry=false ## should update-grub add savedefault to the default options ## can be true or false # savedefault=false ## ## End Default Options ## title Ubuntu 8.04.1, kernel 2.6.24-19-generic root (hd0,5) kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=8f3a3a4f-83b0-400e-be69-0dd295029a47 ro quiet splash initrd /boot/initrd.img-2.6.24-19-generic quiet title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode) root (hd0,5) kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=8f3a3a4f-83b0-400e-be69-0dd295029a47 ro single initrd /boot/initrd.img-2.6.24-19-generic title Ubuntu 8.04.1, memtest86+ root (hd0,5) kernel /boot/memtest86+.bin quiet ### 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 Windows NT/2000/XP root (hd0,0) savedefault makeactive chainloader +1 # This entry automatically added by the Debian installer for a non-linux OS # on /dev/sda2 title Windows XP Media Center Edition root (hd0,1) savedefault makeactive chainloader +1 root@ubuntu:/media/disk/boot/grub# fdisk -l omitting empty partition (5) Disk /dev/sda: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x06b4ed26 Device Boot Start End Blocks Id System /dev/sda1 * 1 5737 46082421 7 HPFS/NTFS /dev/sda2 11751 22946 89931870 83 Linux /dev/sda3 22947 24321 11044687+ f W95 Ext'd (LBA) /dev/sda4 24208 24321 915673+ 82 Linux swap / Solaris /dev/sda5 * 22947 24147 9646969+ 83 Linux /dev/sda6 24148 24207 481918+ 82 Linux swap / Solaris Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x41ffc810 Device Boot Start End Blocks Id System /dev/sdb1 * 1 38912 312560608+ c W95 FAT32 (LBA) Disk /dev/sdc: 4039 MB, 4039114752 bytes 37 heads, 36 sectors/track, 5922 cylinders Units = cylinders of 1332 * 512 = 681984 bytes Disk identifier: 0x04030201 Device Boot Start End Blocks Id System /dev/sdc1 1 5923 3944444 b W95 FAT32 Disk /dev/sdd: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track, 24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0ed9d69f Device Boot Start End Blocks Id System /dev/sdd1 * 1 24792 199141708+ c W95 FAT32 (LBA) root@ubuntu:/media/disk/boot/grub# grub-install --no-floppy /dev/sda5 Could not find device for /boot: Not found or not a block device. Did I do it wrong?
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#4 (permalink) |
|
Manager
Join Date: Sep 2004
Location: Colorado
Posts: 988
OS: Mac OS 9.1, Mac OS X 10.5.8, WinXP Pro, FreeBSD 6.0, Gentoo Linux
|
Re: MBR might be FUBARed.
Mostly ok, but you want to say grub-install --no-floppy /dev/sda to specify the drive. The bootloader is something installed once for a physical drive, not on a per-partition basis (usually - I've heard "interesting" setups are possible).
__________________
![]() Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it. When posting what errors you get, please give the full message. It makes helping you much easier. |
|
|
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
Same issue.
root@ubuntu:~# grub-install --no-floppy /dev/sda Probing devices to guess BIOS drives. This may take a long time. Could not find device for /boot: Not found or not a block device. o.0 On my laptop, I set up a separate boot partition and installed to that, but I did that during a regular install. Could I try that manually, or would it help?
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#6 (permalink) |
|
Manager
Join Date: Sep 2004
Location: Colorado
Posts: 988
OS: Mac OS 9.1, Mac OS X 10.5.8, WinXP Pro, FreeBSD 6.0, Gentoo Linux
|
Re: MBR might be FUBARed.
Hmm... strange. You could try
Code:
grub --no-floppy grub> root (hd0,5) grub> setup (hd0) grub> quit
__________________
![]() Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it. When posting what errors you get, please give the full message. It makes helping you much easier. |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,5)/boot/grub/stage2 /boot/grub/menu.lst"... failed Error 12: Invalid device requested Lame. I can reinstall if I have to, my home is on a separate partition. If I have to do that, though, is there a way to back up programs I have installed so I don't have to reinstall everything?
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#8 (permalink) | |
|
Registered User
Join Date: Dec 2006
Location: UK
Posts: 229
OS: PCLinux2009/Ubuntu/XP
|
Re: MBR might be FUBARed.
Quote:
Thats almost correct except you have to use grub FIND. So boot fro Hardy Live CD, open terminal and become sudo, start a grub shell e.g. sudo grub grub> now use find /boot/grub/stage 1 grub> find /boot/grub/stage1 This will return the partion where grub is installed, it will be sda2 or sda5 from your fdisk -l (hd0,1) or (hd0,4) in grub notation now enter the grub partition using the line above e.g grub> root (hd0,4) finally grub> setup (hd0) Quit grub and reboot. |
|
|
|
|
|
|
#9 (permalink) |
|
Manager
Join Date: Sep 2004
Location: Colorado
Posts: 988
OS: Mac OS 9.1, Mac OS X 10.5.8, WinXP Pro, FreeBSD 6.0, Gentoo Linux
|
Re: MBR might be FUBARed.
Heh, hal8000 is right. Instead of using hd(0,5) use hd(0,4). Your grub.conf doesn't seem to match up with fdisk output. Of the two, fdisk should be the correct one. GRUB indexes drives and partitions from zero and Linux indexes partitions from 1. So if you have /dev/sda5 in Linux, that will generally be hd(0,4) to GRUB.
__________________
![]() Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it. When posting what errors you get, please give the full message. It makes helping you much easier. |
|
|
|
|
|
#10 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
So I read your reply, and I was like, "Oh, of course. I'm an idiot."
But... grub> find /boot/grub/stage1 (hd0,5) grub> root (hd0,4) grub> setup (hd0) Error 17: Cannot mount selected partition grub> root (hd0,5) grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,5)/boot/grub/stage2 /boot/grub/menu.lst"... failed Error 12: Invalid device requested It says that hd0,5 is the root partition, even though that's sda5. o.0 Weird.
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#11 (permalink) |
|
Registered User
Join Date: Jan 2006
Location: The voices in my head disagree...
Posts: 163
OS: Windows XP: Home Edition SP2/Ububtu 8.04
|
Re: MBR might be FUBARed.
hd0 just refers to the drive grub will install on i think, so hd0,5, refers to sda5 which is your linux partition. grub refers to hard drives with numbers rather than letters. hda, hdb/sda, sdb in a linux mounting scheme but grub refers to these as hd0 and hd1. I might be wrong, but I think this is how it was explained to me.
__________________
Extrico subjectio quod verum ero evidens No one can make you feel inferior without your consent. -- Eleanor Roosevelt "it may be alright to be content with what you have; never with what you are."--B.C. Forbes Last edited by dragonember; 07-25-2008 at 02:27 PM. |
|
|
|
|
|
#12 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
That doesn't help in the literal sense, dragonember, but thanks.
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#13 (permalink) |
|
Registered User
Join Date: Jan 2006
Location: The voices in my head disagree...
Posts: 163
OS: Windows XP: Home Edition SP2/Ububtu 8.04
|
Re: MBR might be FUBARed.
all i was saying was that hd0,5 refers to the same partition as "sda5". When you said it was weird i figured you meant you thought it was referring to different partitions. Since (it should be) referring to the same partition, you should not be getting that error. you havn't by chance booted using a live disc and tried to mount that partition have you? Just to make sure software and hardware wise that it is accessible. just an idea since this error seems to be plaguing you.
__________________
Extrico subjectio quod verum ero evidens No one can make you feel inferior without your consent. -- Eleanor Roosevelt "it may be alright to be content with what you have; never with what you are."--B.C. Forbes |
|
|
|
|
|
#14 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
Yes, I've been using a liveCD this whole time. The problem is that I can't get into grub to get to Ubuntu, and my computer is going straight to the Windows partition.
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#15 (permalink) |
|
Manager
Join Date: Sep 2004
Location: Colorado
Posts: 988
OS: Mac OS 9.1, Mac OS X 10.5.8, WinXP Pro, FreeBSD 6.0, Gentoo Linux
|
Re: MBR might be FUBARed.
Hmm... could you post the contents of /boot/grub/device.map?
You might also consider trying to do this from a Knoppix LiveCD. Always worked for me, not that it should be any different from the install disc...
__________________
![]() Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it. When posting what errors you get, please give the full message. It makes helping you much easier. |
|
|
|
|
|
#16 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
device.map:
(hd0) /dev/sda (hd1) /dev/sdb (hd2) /dev/sdc I'll try Knoppix when it downloads and I get a chance to reboot.
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#17 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
Well, Knoppix is pretty fail:
root@Knoppix:~# grub-install --no-floppy /dev/sda /sbin/grub-install: line 386: //sbin/grub: Input/output error sed: can't read /boot/grub/device.map: No such file or directory grep: /boot/grub/device.map: No such file or directory /dev/sda does not have any corresponding BIOS drive. root@Knoppix:~# grub-install --no-floppy /dev/sda5 /sbin/grub-install: line 386: //sbin/grub: Input/output error sed: can't read /boot/grub/device.map: No such file or directory grep: /boot/grub/device.map: No such file or directory /dev/sda5 does not have any corresponding BIOS drive. root@Knoppix:~# grub-install --no-floppy hd0 /sbin/grub-install: line 386: //sbin/grub: Input/output error sed: can't read /boot/grub/device.map: No such file or directory Could not find device for /boot: Not found or not a block device. root@Knoppix:~# grub -su: /sbin/grub: Input/output error
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#18 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
Has the Internet forgotten me? Nooooooo.
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
|
|
#19 (permalink) |
|
Manager
Join Date: Sep 2004
Location: Colorado
Posts: 988
OS: Mac OS 9.1, Mac OS X 10.5.8, WinXP Pro, FreeBSD 6.0, Gentoo Linux
|
Re: MBR might be FUBARed.
No, but the world has made me busy, so I haven't yet had time to figure out why GRUB would be acting so strange.
__________________
![]() Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it. When posting what errors you get, please give the full message. It makes helping you much easier. |
|
|
|
|
|
#20 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Upstate NY
Posts: 207
OS: Windows 7 RC1, Mac OS X 10.5, Ubuntu 9.04, Windows XP, Mandriva Spring 2009
|
Re: MBR might be FUBARed.
Weird:
I tried reinstalling Hardy, but it saw sda, but not the partitions on it, so that was weird and scary. I did manage to get back into my ubuntu partition, using the Super Grub Disk, great utility. I might be able to fix my mbr with it, but not sure yet. I can, at least, use it to boot into my hardy install.
__________________
Slow and Steady Wins the Race... Uhm, unless it's a real race. |
|
|
|
![]() |
| Thread Tools | |
|
|