grub fail to load... error 17
Hi, I deleted a partition with Vista... it was just some NTFS backup partition that came with the computer and now grub can't find itself... I'm wondering if maybe I deleted stage2 because the backup partition was the first partition on the drive?
My error is: grub loading 1.5 please wait... Error 17 I'm using grub to chainload vista and default is ubuntu. (Should it really be using stage1_5? I thought it would be stage2) Anyways here's fdisk -l (Current) Code:
Disk /dev/sda: 200.0 GB, 200049647616 bytes Code:
# menu.lst - See: grub(8), info grub, update-grub(8) |
When you deleted the partition, all partition numbers AFTER the one deleted changed: reduced by one.
Boot from a liveCD, and edit /boot/grub/menu.lst and /etc/fstab. Subtract one from the partition numbers following the one deleted. Booting the liveCd should verify my claim. Just look at the /etc/fstab of the running liveCD to see the partition numbers assigned to existing partitions, or run fdisk -l in a console. |
Thanks, but are you sure I gotta manually do that? There isn't a command to make it resync or something?
|
Yes you have to do it manually.
*AND* you have to rerun setup to rebuild the MBR code to get it to point to the correct partition. As of yet,it hasn't even found the menu.lst - it's complaining about your attempt to boot the extended partition. |
Alright mates... I feel kinda stupid but nevertheless I gotta ask...
What do I change in my fstab and menu.lst? I am unsure of how to determine which partition comes AFTER the one deleted... I already submitted my menu.lst, but here is my fstab (its very confusing...) Code:
# /etc/fstab: static file system information. |
Based on the output of 'fdisk -l (Current)', the edits should be:
menu.lst All Ubuntu entries, change (hd0,2) to (hd0,1) to agree with '/dev/sda2 12549 23149 85152532+ 83 Linux' from the fdisk output. At the bottom of menu.lst, delete or comment out this Windows entry; it no longer exists per fdisk: # This entry automatically added by the Debian installer for a non-linux OS # on /dev/sda2 title Windows Vista/Longhorn (loader) root (hd0,1) savedefault makeactive chainloader +1 /etc/fstab change this: # /dev/sda3 UUID=b2e49a99-8664-4af8-b741-ca2208dde761 / ext3 defaults,errors=remount-ro 0 1 # /dev/sda1 UUID=7C5085E968AC80CE /media/sda1 ntfs defaults,nls=utf8,umask=007,gid=46 0 1 # /dev/sda2 UUID=2C88743C8874071C /media/sda2 ntfs defaults,nls=utf8,umask=007,gid=46 0 1 # /dev/sda5 UUID=b370ec8b-1e5c-455e-a923-22030c5adb7a none swap sw 0 0 to this: # /dev/sda2 UUID=b2e49a99-8664-4af8-b741-ca2208dde761 / ext3 defaults,errors=remount-ro 0 1 # /dev/sda1 UUID=7C5085E968AC80CE /media/sda1 ntfs defaults,nls=utf8,umask=007,gid=46 0 1 # /dev/sda5 UUID=b370ec8b-1e5c-455e-a923-22030c5adb7a none swap sw 0 0 to match device designations in fdisk output. It should not be necessary to run grub-install again. Getting the device numbers straight in menu.lst and fstab tells grub where to find the rest of itself to boot Linux, or hand off the boot process to Windows. |
bigrigdriver has the right idea, but some updates:
- For Vista, change "root (hd0,1)" to "root (hd0,0)" - should work o.k. - don't worry about fstab for now; UUID is really useful in situations like this. Update the comments later if you want. All this won't fix the error 17 - for that you'll need to update the loader code. Should be do-able from the grub prompt you get. |
I followed those directions, but still getting same error. If I should try grub-install, how do I do it?
Edit: didn't see syg00's reply. In response to him, I'm not getting a grub prompt :( I'm booting a ubuntu live cd then i go to terminal and mount the linux partition, then i chroot to it and run grub, then i do: setup (hd0) and it says error. Or if i do find /boot/grub/stage1. it gives error. What should i do? Code:
Device Boot Start End Blocks Id System |
Try "find /grub/stage1" - should give you (hd0,1). As per bigrigdriver's post above, this is what you need for (grub) root. Then (from your grub prompt) enter
Code:
root (hd0,1) |
All times are GMT -5. The time now is 01:25 AM. |