GRUB Problem

I am sure this is an easy fix, but I have no clue exactly how to do it.

GRUB currently only has the options to start Linux and Linux Failsafe. The problem is that I also have Vista installed on my PC and that option no longer shows up.

I read something about needing to change certain information in ./boot/grub/menu.lst but I’m not sure exactly what, so I will post some information with the hopes that someone can help! Thanks

menu.lst

# Modified by YaST2. Last modification on Sat May 15 14:55:55 EDT 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,3)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX
    root (hd0,3)
    kernel /boot/vmlinuz root=/dev/disk/by-id/ata-WDC_WD1600BEVS-75RST0_WD-WXE507578501-part4    repair=1 splash=silent quiet showopts vga=0x314
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE LINUX
    root (hd0,3)
    kernel /boot/vmlinuz root=/dev/disk/by-id/ata-WDC_WD1600BEVS-75RST0_WD-WXE507578501-part4 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x314
    initrd /boot/initrd


fdisk -l
My Windows partition is /sda2


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          13      104391   de  Dell Utility
/dev/sda2              14       15137   121483530    7  HPFS/NTFS
/dev/sda3           19131       19458     2620447+   f  W95 Ext'd (LBA)
/dev/sda4   *       15138       19130    32073772+  83  Linux
/dev/sda5           19131       19458     2620416   dd  Unknown

Partition table entries are not in disk order

to edit the file do this in a terminal

kdesu kwrite /boot/grub/menu.lst

or in gnome

gnomesu gedit /boot/grub/menu.lst

add this


###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
rootnoverify (hd0,1)
chainloader +1

save - and reboot

And I think that caf4926 should have praised you by being the first one in a long, long time that provided the exact and wanted information in your first post.

He always has to ask for* fdisk -l*, etc but for this one. lol!

Thank you very much, I knew it was an easy fix. This is a very helpful place!

You are welcome
And yes, well done posting the info we needed in the first place;)

Sorry, I couldn’t find a link for starting a ‘new thread’, but this is still a Grub Problem…

What started as an effort to reinstall Win XP Pro to see if I could get the Internet connection to work from there… 2 Weeks now of trying to google this and fix it. I foolishly uninstalled SuSE 11.2 KDE Live CD, so there really isn’t any Linux on this laptop (that can be fixed by repeating the installation, though). In the meantime, I’m wanting Win XP so I can use what I’m familiar with to track down the NetworkManager Connection problem… for my efforts I now how this problem: GRUB doesn’t seem to be able to find any OS to boot.

Here’s the hardware and GRUB info, in that order:

Computer - laptop

  1. 2006 Sony Vaio Centrino Duo x86 64-bit

  2. Arch Linux Install wiped out the WINXP Professional (took over the whole machine)
    … Tried SuSE KDE LIVE CD (64-bit version) install to get rid of Arch Linux. Network Manager under SuSE KDE won’t let Yast handle Internet Configuration, yet all efforts at a terminal indicate that the ports and devices are there and working or streaming. Still can’t get on Internet with it. :sigh:
    …Decided to uninstall SuSE KDE LIVE and go back to Win XP Pro, maybe it would configure and access the Internet.

  3. 2 days ago I attempted F10 at system logo boot… this started the Sony System Recovery routine.

  4. Win XP Pro now found in partitions when booting from the KDE LIVE CD and using Dolphin to determine if any files got copied during system recovery… they did.
    … however, all partitions under Dolphin are named as follows:

    Volume (ntfs) - apparently the Sony System Recovery (a.k.a. D:)
    Volume (ext4) - only has linux, lost+found and sylky (user) empty folders
    Volume (ntfs) - has to be Win XP (a.k.a. C:) complete with RECYCLE BIN and
    AUTOEXEC.BAT, CONFIG.SYS, MSDOS.SYS and boot.ini
    [Note: all 3 volumes are time stamped in 2006, so this should mean that
    the System Recovery actually did take place, just short of booting]

Here’s ‘boot.ini’ [contents]

[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=“Microsoft Windows XP Professional” /noexecute=optin /fastdetect

  1. GRUB is the only thing that loads on bootup!!! I knew nothing about GRUB or how to use it, and still don’t nor do I want to… way too much time wasted googling and now totally confused about GRUB
  2. However, GRUB claims:

grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x12
Partition num: 2, Filesystem type unknown, partition type 0x82
Partition num: 4, Filesystem type unknown, partition type 0x7
Partition num: 5, Filesystem type unknown, partition type 0x83

I have no idea what happened to Partition num: 1, or 3, nor do I know how to find them if they are even in there somewhere and merely playing “Hide 'N Seek”. :slight_smile:

Here’s fdisk -l

linux:/home/linux # fdisk -l

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

Device Boot Start End Blocks Id System
/dev/sda1 1 784 6297448+ 12 Compaq diagnostics
/dev/sda2 * 785 14401 109378552+ f W95 Ext’d (LBA)
/dev/sda3 14402 14593 1542240 82 Linux swap / Solaris
/dev/sda5 785 3395 20972826 7 HPFS/NTFS
/dev/sda6 3396 14401 88405663+ 83 Linux
linux:/home/linux #

…so, if fdisk -l can get all this info, then the volumes/filesystemtypes ought not be corrupt.

Now, brace yourself because I am pretty much GUI dependent… I’m very weak at the terminal access command line stuff… I need my GUI to figure out what I’m looking at, if it is in there at all, and otherwise communicate with this electronic critter.

Please tell me that there is a SIMPLE way to use a GUI in KDE to force Win XP to get recognized with a /mbr on bootup as a choice for loading. And then be so kind as to tell me the exact procedures and steps to ‘make it so’.

Obviously, the “Volumes” need to be identified by something other than ‘volume’, but I haven’t a clue as to how to do that.

Your help will be greatly appreciated.

Thank you.

oldsioux (my brain hurts, now) :wink:

Is grub currently booting your linux install or was fdisk -l from a live cd?

From the SuSE 11.2 KDE Live CD.

Please try this:
You can actually do it using the live cd also,

Re-Install Grub Quickly with Parted Magic - openSUSE Forums

But I’m guessing you borked up the partition table and now the grub menu is incorrect.

Do you have access to an external HD that you could backup your important data to?

Yes, I have 2 external HDs I could hook up to the laptop, but at the moment there isn’t any important data on the laptop except the one thing I’m afraid I might screw up and wipe out: the Sony System Recovery partition, see? I don’t want to damage it because it obviously does restore the Win XP Professional… and if Linux can’t be saved, then I could at least get back to business using Win XP… See?

Personally I always delete all the partitions that come on a pre-install, but then I have access to a full range of windows install media. I take it you didn’t get a real install CD?

Device Boot Start End Blocks Id System
/dev/sda1 1 784 6297448+ 12 Compaq diagnostics
/dev/sda2 * 785 14401 109378552+ f W95 Ext’d (LBA)
/dev/sda3 14402 14593 1542240 82 Linux swap / Solaris
/dev/sda5 785 3395 20972826 7 HPFS/NTFS
/dev/sda6 3396 14401 88405663+ 83 Linux
linux:/home/linux #

You should be able to use parted magic to delete sda3 and sda6 and expand sda5 back to use all the space available in sda2
Then you need to repair the XP boot sector code. Check and see if NTLDR is in the root of C
And then do fixmbr
But I’m not sure if you have any discs that can enable you to do this, so you may have to google it. There is loads of info out there.

No hard copy ‘real’ install CDs… teh only copy of Win XP Professional that came with this laptop is the copy on the restore drive (a,k,a, D;\recovery) which, of course, is NOT what the drive names are, under grub.

You should be able to use parted magic to delete sda3 and sda6 and expand sda5 back to use all the space available in sda2
Then you need to repair the XP boot sector code. Check and see if NTLDR is in the root of C

At this point, the only way I can ‘see’ any of the files is by using KDE Live CD’s Dolphin to locate them as usual under Linux.
That is the part that makes me so afraid… grub isn’t showing any name for any of the ‘partions’ it thinks it found… because of this I can’t determine in grub which of them is the one that has the Win XP Recovery files, see?

I was SO glad when I realized I could use the KDE Live CD and its file manager to see if those files were still there and intact. But, now they are being identified by the Live CD as simply "Volume"xxx…
Is there a way in grub to ‘peek’ at the contents of those partitions and find any files names to help me determine the partion # to change to a boot record?

And then do fixmbr
But I’m not sure if you have any discs that can enable you to do this, so you may have to google it. There is loads of info out there.

Hmm… no. I don’t have any discs/CDs of the Win XP Professional. So, I don’t have an ‘external’ copy of the files to try a ‘fresh’ install of Win XP Pro, see?

It’s getting late here… way past my bedtime… I think I will wait until tomorrow and google to try and dig up a means of MAKING a copy of the “System Recovery” to CDs… then I maybe I could just totally do a fresh install of the Win XP Professional and track down my network problem… if all is well in connecting to the Internet from WinXP, then I will try to find out why SuSE’s NetworkManager refuses to configure and find the web sites on the INternet.

I will keep this thread bookmarked so I can ask an occassional question if I need to, before I risk killing the entire laptop. :slight_smile:

Thank you for your kind attention… this is already very helpful.

Thanks again,
oldsioux

I am not sure why you think grub does not find your partitions. Grub counts its partitions from zero whilst fdisk counts from 1. Hence:

grub partition 0 = /dev/sda1 Compaq Diagnostics
grub partition 2 = /dev/sda3 Linux swap
grub partition 4 = /dev/sda5 Windows C
grub partition 5 = /dev/sda6 Linux

When you get to the grub prompt (grub>) why not try booting your Windows XP directly with the following commands

rootnoverify (hd0,4)
chainloader +1
boot

If that works the solution is fairly simple. We can just change the boot flag to /dev/sda5 using something called cfdisk.

Unless I have not understood what the problem is.

rootnoverify (hd0,4)
chainloader +1
boot

This caused the laptop to boot into the VAIO Recovery. Does this mean I should change your suggestion to something like:

rootnoverify (hd1,4)
chainloader +1
boot

…?..

It will be 0 something

try hd0,3

I did this:

rootnoverify (hd0,3)
chainloader +1

at this point it gives this error:

Error 13: Invalid or unsupported executalble format.

grub>

Oooooo!

I just tried:

rootnoverify (hd0,0)
chainloader +1
boot

…and it came right back up to the grub> prompt!

this eliminates the (hd0,0) as a possiblity for the WinXP partition, yes?

Try all options, **2 **next
keep trying until you have exhausted the options

Am doing now…

brb

Very sorry. I appear to have fouled up the thread a little. I rather hoped everybody else had gone to bed (I am in Oz).

I had deleted my last post because I was a little concerned about the boot.ini file which is why I deleted the following post (whilst you were reading and replying to it):

++++++++++++++++++++++++++++++++++++++++++++++++++++++
I am not sure why you think grub does not find your partitions. Grub counts its partitions from zero whilst fdisk counts from 1. Hence:

grub partition 0 = /dev/sda1 Compaq Diagnostics
grub partition 2 = /dev/sda3 Linux swap
grub partition 4 = /dev/sda5 Windows C
grub partition 5 = /dev/sda6 Linux

When you get to the grub prompt (grub>) why not try booting your Windows XP directly with the following commands

rootnoverify (hd0,4)
chainloader +1
boot

If that works the solution is fairly simple. We can just change the boot flag to /dev/sda5 using something called cfdisk.

Unless I have not understood what the problem is. However maybe boot.ini needs to be modified as well.

++++++++++++++++++++++++++++++++++++++++++++++++++++++

I am not sure if the windows boot.ini file lists the partitions in definition order or cylinder order. If it is cylinder order then partition(2) is correct. If it is definition order then partition(3) is correct.

Hence if it is booting into the wrong partition, then I would suggest editing the boot.ini file and changing boot.ini to read partition(3) at the end of the line.

The fact that it is booting into something from (hd0,4) means it is finding an ntldr etc there so we must be close (I hope).

So keep using rootnoverify (hd0,4) and change boot.ini.