installed ubuntu 7.04 on vista system, now can't load anything, get GRUB 17 error

Asked by ruggrat

My question is similar to other GRUB boot problems, but I don't see any suggested solutions that apply to me, though I may have missed something. I am very new to Linux and don't understand many of the commands and why they are necessary, nor do I understand why Linux would have overwritten something on my C drive. These low level commands are very confusing to me.
At the moment I am nearly dead in the water; my Vista system cannot be loaded, my Linux as well, and I can only run the Live CD version of Ubunto 7.04 (meaning that all the personalization done is lost when the system is turned off).
I was running Vista on C drive, SATA WD 500GB, and installed Ubuntu 7.04 on my USB2 connected WD 200GB drive which was empty to start with. I also have a 120GB drive attached on USB but it wasn't involved, nor was my 2GB thumbdrive on USB.

I noticed that Ralph Janke asked specific questions about responses to specific commands. Hoping that Ralph is still out there, below are the results when inputting these commands:
1. blkid:
ubuntu@ubuntu:~$ blkid
/dev/sdb1: TYPE="ntfs"
/dev/sdc1: UUID="9466-51ED" TYPE="vfat"
/dev/sdc5: TYPE="swap" UUID="6c48eee0-e135-4dee-ad59-d04dace31067"
/dev/sdd1: UUID="445fdf86-5f4c-4235-a13d-be97cde703af" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdd5: TYPE="swap" UUID="4811372d-7be9-49b2-b731-dc4d41a4f0df"
2. sudo lshw -C disk
ubuntu@ubuntu:~$ sudo lshw -C disk
  *-disk
       description: SCSI Disk
       product: 00JB-55GVA0
       vendor: WDC WD20
       physical id: 0.0.0
       bus info: scsi@4:0.0.0
       logical name: /dev/sdd
       version: 0811
       size: 186GB
       capabilities: partitioned partitioned:dos
     *-volume:0
          description: Linux filesystem partition
          physical id: 1
          bus info: scsi@4:0.0.0,1
          logical name: /dev/sdd1
          capacity: 181GB
          capabilities: primary bootable
     *-volume:1
          description: Extended partition
          physical id: 2
          bus info: scsi@4:0.0.0,2
          logical name: /dev/sdd2
          size: 4447MB
          capacity: 4447MB
          capabilities: primary extended partitioned partitioned:extended
        *-logicalvolume
             description: Linux swap / Solaris partition
             physical id: 5
             logical name: /dev/sdd5
             capacity: 4447MB
             capabilities: nofs
  *-disk
       description: SCSI Disk
       product: 00JB-00CRA0
       vendor: WDC WD12
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sdb
       version: 0811
       size: 111GB
       capabilities: partitioned partitioned:dos
     *-volume
          description: HPFS/NTFS partition
          physical id: 1
          bus info: scsi@2:0.0.0,1
          logical name: /dev/sdb1
          capacity: 111GB
          capabilities: primary
  *-disk
       description: SCSI Disk
       product: USB 2.0 FD
       vendor: PNY
       physical id: 0.0.0
       bus info: scsi@3:0.0.0
       logical name: /dev/sdc
       version: PMAP
       size: 1968MB
       capabilities: removable
     *-disc
          physical id: 0
          logical name: /dev/sdc
          size: 1968MB
          capabilities: partitioned partitioned:dos
        *-volume:0
             description: W95 FAT32 partition
             physical id: 1
             logical name: /dev/sdc1
             capacity: 1819MB
             capabilities: primary bootable
        *-volume:1
             description: Extended partition
             physical id: 2
             size: 141MB
             capacity: 141MB
             capabilities: primary extended partitioned partitioned:extended
           *-logicalvolume
                description: Linux swap / Solaris partition
                physical id: 5
                logical name: /dev/sdc5
                capacity: 141MB
                capabilities: nofs
  *-disk
       description: SCSI Disk
       product: WDC WD5000KS-00M
       vendor: ATA
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 07.0
       serial: WD-WCANU2061491
       size: 465GB
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5
     *-volume
          description: HPFS/NTFS partition
          physical id: 1
          bus info: scsi@0:0.0.0,1
          logical name: /dev/sda1
          capacity: 465GB
          capabilities: primary bootable
  *-cdrom
       description: DVD-RAM writer
       product: DVDRW SHM-165P6S
       vendor: LITE-ON
       physical id: 1
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/dvd
       logical name: /dev/scd0
       logical name: /dev/sr0
       version: MS0N
       capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5
     *-disc
          physical id: 0
          logical name: /dev/cdrom

3. sudo fdisk -l:

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 60802 488384512 7 HPFS/NTFS

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 1 14594 117218304 7 HPFS/NTFS

Disk /dev/sdc: 2063 MB, 2063597568 bytes
255 heads, 63 sectors/track, 250 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdc1 * 1 232 1863508+ b W95 FAT32
/dev/sdc2 233 250 144585 5 Extended
/dev/sdc5 233 250 144553+ 82 Linux swap / Solaris

Disk /dev/sdd: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdd1 * 1 23754 190803973+ 83 Linux
/dev/sdd2 23755 24321 4554427+ 5 Extended
/dev/sdd5 23755 24321 4554396 82 Linux swap / Solaris

I would appreciate a definitive concrete solution if someone has it. I am a longtime Windows user and would like to eventually free myself from Microsoft. Looking on the internet, this GRUB error 17 seems to be quite common and to have been around for years; it would seem to me some prevention could have been included in Linux releases so the MBR is not corrupted by Linux GRUB so easily and catastrophically.

Michael
(ruggrat)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Cesare Tirabassi
Solved:
Last query:
Last reply:
Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

Michael,

>nor do I understand why Linux would have overwritten something on my C drive

Your C drive is used by your system to boot. Since Windows doesn´t bother to think that another OS can be installed, we need to modify it so that you can indeed choose which OS to boot.

Can we have a look at your /boot/grub/menu.lst file too?

Can you also check with Gparted (included in the LiveCD) that only the sda disk has the boot flag on?

Revision history for this message
Cesare Tirabassi (norsetto) said :
#2

>Can you also check with Gparted (included in the LiveCD) that only the sda disk has the boot flag on?

Actually, there is no need to do that. Sorry for asking.

Revision history for this message
ruggrat (mic1940-gmail) said :
#3

Thanks for looking at this problem Cesare.
I agree completely that Windows ought to let another OS be installed, and we know that MS would like to be a monopoly. But I must say that GRUB error 17 kind of puts a halt on everything, as one cannot go forward. It appears that the MBR is affected in some way. I was finally able to repair the Master Boot Record by starting up with my Vista disk and doing the suggested procedures, and now I do have Vista back, but Vista only. Perhaps there is a way to coexist, if you know it, please give me the instructions.

I would be glad to give you the /boot/grub/menu.lst contents. Could you give me the exact command sequence to do this, as I am really a novice to Linux.
Michael
ruggrat

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#4

Ubuntu and Vista can co-exist quite happily on internal disks. When you use USB disks though things get a little bit more complicated. For example if you install Ubuntu on the USB disk then part of GRUB is on the C drive and part is on the USB disk. If you then remove the USB disk then GRUB can't boot because it can't find itself.

You should really look at booting from USB - selected when you switch on - when you want to boot Linux, and boot to C: when you want to boot windows.

The following page details how to boot from USB:-

https://help.ubuntu.com/community/BootFromUSB

Revision history for this message
Cesare Tirabassi (norsetto) said :
#5

Well, I'm glad you have Vista back.
On the subject of dual-booting on two hard disks, perhaps you want to check out this page and associated links:

http://ubuntuforums.org/showthread.php?t=179902&highlight=dualboot

Not knowing how you performed the installation is hard to judge what went wrong. Of course, it could be a problem with the Ubuntu installer, and we would appreciate any information you could give us that could allow us to fix it.

Error 17 is not unrecoverable, in general it is just an issue of changing a digit or 2 in the file I mentioned above.
Now grub is gone, so there is no much sense to do anything about it.

Revision history for this message
ruggrat (mic1940-gmail) said :
#6

Cesare, Alan
Thanks for spending the time with my novice questions and problems. I have looked through the forums suggested, and tried many things, but, in the end, I have ended up in failure to have a bootable USB drive. GAG seems to work for Vista but cannot find Linux. I can see that there is no asterisk under the "boot" for my USB drives, and nothing I key in seems to work.

I also have done the following:
Reinstalled Feisty Fawn on the 200GB USB2 drive
Installed GAG on 500GB drive where Vista lives. GAG can boot Vista but doesn't find Ubuntu Linux
Now I have an internal SATA drive, 500GB with Vista, and external USB2 drive, 200GB with Ubuntu, a thumbdrive usb2, 2GB

What I would like: Choose the OS I want from GAG, from any drive, including thumbdrive. I have spent a day on trying various commands suggested in tutorials and forums, eventually I could not make the dual boot work. I think I managed to put GRUB on the external USB drive, but cannot succeed with the commands to make it bootable.

Here are the current settings for commands "fdisk -l","blkid",and the contents of menu.lst.
fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 60802 488384512 7 HPFS/NTFS

Disk /dev/sdb: 2063 MB, 2063597568 bytes
255 heads, 63 sectors/track, 250 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 1 250 2008093+ b W95 FAT32

Disk /dev/sdc: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdc1 1 12164 97707298+ 83 Linux
/dev/sdc2 12165 12893 5855692+ 82 Linux swap / Solaris
/dev/sdc3 12894 24321 91795410 b W95 FAT32
ubuntu@ubuntu:~$

blkid
ubuntu@ubuntu:~$ blkid
/dev/sdb1: UUID="EA82-49DD" TYPE="vfat"
/dev/sdc1: UUID="6c6feb1d-18ab-4123-b3f7-05208cdba5bb" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdc2: TYPE="swap" UUID="5fa35dda-036d-49e5-9829-5e6e7174fd59"
/dev/sdc3: UUID="9D1F-9626" TYPE="vfat"
ubuntu@ubuntu:~$

Contents of 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 num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# 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=6c6feb1d-18ab-4123-b3f7-05208cdba5bb ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd2,0)

## 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

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-15-generic
root (hd2,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=6c6feb1d-18ab-4123-b3f7-05208cdba5bb ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd2,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=6c6feb1d-18ab-4123-b3f7-05208cdba5bb ro single
initrd /boot/initrd.img-2.6.20-15-generic

title Ubuntu, memtest86+
root (hd2,0)
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 Vista/Longhorn (loader)
root (hd0,0)
savedefault
chainloader +1

lshw -C disk:
ubuntu@ubuntu:~$ sudo lshw -C disk
  *-disk
       description: SCSI Disk
       product: 00JB-55GVA0
       vendor: WDC WD20
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sdc
       version: 0811
       size: 186GB
       capabilities: partitioned partitioned:dos
     *-volume:0
          description: Linux filesystem partition
          physical id: 1
          bus info: scsi@2:0.0.0,1
          logical name: /dev/sdc1
          capacity: 93GB
          capabilities: primary
     *-volume:1
          description: Linux swap / Solaris partition
          physical id: 2
          bus info: scsi@2:0.0.0,2
          logical name: /dev/sdc2
          capacity: 5718MB
          capabilities: primary nofs
     *-volume:2
          description: W95 FAT32 partition
          physical id: 3
          bus info: scsi@2:0.0.0,3
          logical name: /dev/sdc3
          capacity: 87GB
          capabilities: primary
  *-disk
       description: SCSI Disk
       product: USB 2.0 FD
       vendor: PNY
       physical id: 0.0.0
       bus info: scsi@3:0.0.0
       logical name: /dev/sdb
       version: PMAP
       size: 1968MB
       capabilities: removable
     *-disc
          physical id: 0
          logical name: /dev/sdb
          size: 1968MB
          capabilities: partitioned partitioned:dos
        *-volume
             description: W95 FAT32 partition
             physical id: 1
             logical name: /dev/sdb1
             capacity: 1961MB
             capabilities: primary
  *-disk
       description: SCSI Disk
       product: WDC WD5000KS-00M
       vendor: ATA
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 07.0
       serial: WD-WCANU2061491
       size: 465GB
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5
     *-volume
          description: HPFS/NTFS partition
          physical id: 1
          bus info: scsi@0:0.0.0,1
          logical name: /dev/sda1
          capacity: 465GB
          capabilities: primary bootable
  *-cdrom
       description: DVD-RAM writer
       product: DVDRW SHM-165P6S
       vendor: LITE-ON
       physical id: 1
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/dvd
       logical name: /dev/scd0
       logical name: /dev/sr0
       version: MS0N
       capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5
     *-disc
          physical id: 0
          logical name: /dev/cdrom
ubuntu@ubuntu:~$

I would appreciate a short line by line procedure that applies to the above settings to make my usb drive(s) bootable. I feel sure it is only a few command lines. Your help is much appreciated!

Michael
ruggrat

Revision history for this message
Cesare Tirabassi (norsetto) said :
#7

I know this is not the answer you are looking for, I'm sorry for that.
But, have you considered actually installing one of the drives you are now accessing externally through usb, as an internal drive?

Revision history for this message
ruggrat (mic1940-gmail) said :
#8

Hi Cesare,
You must be getting tired of nursing along such a novice, but thanks for
taking the time. (I myself am getting near the end of my ideas, maybe I
should give up after a few more tries)

I have considered installing the current USB drive internally, but it would
be a very temporary solution, since the drive would have to sit on the top
of the computer with the covers off. I have a Shuttle X with only one
internal drive bay. I did take out the floppy last year and there could be
space, but when I tried that, the system overheated. So as a temporary
measure, yes I could make it a second drive on IDE. My power-on
sequence sees USB drives, but there is no flag in BIOS to tick to say I want
to boot from USB.

By the way, I have -again- reinstalled Feisty Fawn on the USB drive, and
managed to actually get a boot asterisk but only after I allowed it to take
the entire disk as and ext partition (tried 5 times with various partition
sizes). Take a look at this and let me know what you think; can I somehow
get this to boot? I am tired of not being able to personalize my Linux. sdb1
appears to have the boot record.

ubuntu@ubuntu:~$ fdisk -l

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 23754 190803973+ 83 Linux
/dev/sdb2 23755 24321 4554427+ 5 Extended
/dev/sdb5 23755 24321 4554396 82 Linux swap / Solaris
ubuntu@ubuntu :~$
Would be nice to get GAG to recognize that the boot record is out there but
it doesn't even though I see the disk being accessed by its light flashing.
If I were to install Feisty Fawn on my internal 500GB's free remaining
210GB, then I would still face the problem of GRUB error 17 wiping out my
MBR or a part of it. So I am hesitant to do that. Additionally, when I
install, and I would choose "guided" on C drive, it wants to take more to
format as ext3 than there is actually available as "free" so I am nervous
about that too. How can I tell it not to grab so much space? The slider's
minimum appears larger than what is free. Getting really jumpy after the
wiping of my mbr.
Michael
ruggrat

On 5/13/07, Cesare Tirabassi <<email address hidden> > wrote:
>
> Your question #6372 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/6372
>
> Status: Open => Answered
>
> Cesare Tirabassi proposed the following answer:
> I know this is not the answer you are looking for, I'm sorry for that.
> But, have you considered actually installing one of the drives you are now
> accessing externally through usb, as an internal drive?
>
> _______________________________________________________________________
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/6372/+confirm?answer_id=6
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/6372
>

Revision history for this message
ruggrat (mic1940-gmail) said :
#9

By the way, How in the world can I make ANY changes to the menu.lst file???
Nothing I do will let me save the changes.
Nothing I found on the web or forums or documentation tells me how. I AM the
administrator and still it won't let me, I typed sudo and all that. Any
attempt to save comes back with the message that I am not allowed!
Frustrating.
Michael
ruggrat

On 5/13/07, Cesare Tirabassi <email address hidden> wrote:
>
> Your question #6372 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/6372
>
> Status: Open => Answered
>
> Cesare Tirabassi proposed the following answer:
> I know this is not the answer you are looking for, I'm sorry for that.
> But, have you considered actually installing one of the drives you are now
> accessing externally through usb, as an internal drive?
>
> _______________________________________________________________________
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/6372/+confirm?answer_id=6
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/6372
>

Revision history for this message
Best Cesare Tirabassi (norsetto) said :
#10

Michael,

concerning your first post, I'm not getting tired at all. Actually, it is not true, I'm getting tired: I'm getting tired that we can't help you better in solving your problem!
If you want to try installing on your 500 GB, you should indeed backup first all your data. Since you are not short of storage though, that shouldn't be a problem.
I'm a bit puzzled by you not being able to edit your menu.lst file.
I guess you are doing that from your LIVE CD opening a terminal. Perhaps you are trying to edit the file which is not on your hard disk? Check that you are doing it for the right device in /media (in your case it should be /media/sdb1, so change your directory with a cd /media/sdb1/boot/grub and then sudo gedit menu.lst).

Revision history for this message
ruggrat (mic1940-gmail) said :
#11

Thanks Cesare Tirabassi, that solved my question.