LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-27-2006, 03:00 PM   #1
PerfectReign
Member
 
Registered: Apr 2005
Location: Los Angeles
Distribution: openSUSE / Ubuntu
Posts: 294

Rep: Reputation: 33
Windows ate my GRUB!


Help, I've got a very bizarre error going on.

I installed SUSE 10.1 on a new laptop some time ago. It is a Gateway 280m TabletPC which came installed with Windows NT Tablet Edition. All has been running for the most part since install. I’ve got SMART running the show and it has been fine.

I wanted to install the touch screen part of the system (stupid me) and had to reboot to Windows (first time) in order to determine what the screen was. (Gateway informed me that they design the hardware for Windows XP so don’t support Linux. Yes, I wrote them.) I exited windows, and then on reboot, I cannot load anything. I get the message, "GRUB loading stage 1.5" then the machine goes into an endless cycle of rebooting.

I did some searching and found some Ubuntu solutions. I loaded both SUSE and Ubuntu live DVD’s and tried fiddling around with things. I cannot seem to get the grub.conf file to load. I did load SUSE’s rescue system on the DVD. I tried to “fix” the boot loader, but go the following error:

GNU GRUB version 0.97 (640K lower / 3072K upper memory) [Minimal BASH-like editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ]
grub>setup-stage2=/boot/grub/stage2(hd0,5) (hd0,5)

Error21:Selected disk does not exist
grub>setup-stage2=/boot/grub/stage2(hd0)(hd0,5)

error 21: Selected disk does not exist
grub>quit

press OK


I thought, okay, I’ll load LILO. Nope:

Error Occurred while installing LILO.

LiLO version 22.7, Copyright (C) 1992-1998 Werner…
Fatal: raid_setup: stat(“/dev/sda”)


For reference, my partition table looks like:

/dev/sda HTS541080G9SA00
/dev/sda1 HPFS/NTFS
/dev/sda2 Win95 FAT32
/dev/sda3 Extended
/dev/sda5 Linux swap
/dev/sda6 Linux native
/dev/sda7 Linux native


On the suggestion of one Ubuntu forum, I did the following. I went into root, typed grub, then find /boot/grub/stage1

It spit back

grub> root (hd0,5)

Isn’t that sda5? If so, that’s my swap partition.

Okay, I went ahead and did the following:

grub> find /boot/grub/stage1
(hd0,5)

grub> root (hd0,5)
Filesystem type is reiserfs, partition type 0x83

grub> setup (hd0,6)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
Running "embed /boot/grub/reiserfs_stage1_5 (hd0,6)"... 18 sectors are embedd
ed.
succeeded
Running "install /boot/grub/stage1 (hd0,6) (hd0,6)1+18 p (hd0,5)/boot/grub/sta
ge2 /boot/grub/menu.lst"... succeeded


Nada. I still get GRUB loading stage 1.5

Ideas?
 
Old 09-28-2006, 06:00 AM   #2
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
Just a remark:
PerfectReign wrote
Quote:
grub> root (hd0,5)
Isn’t that sda5? If so, that’s my swap partition.
As far as i remember, (hd0,0) in grub is something like hda1 / sda1. So (hd0,5) is your sda6, not 5. Your sda6 is Linux native partition (ext2 probably), which is a good place to set as root.

Can't imagine what can be the reason. I would probably rename/move/delete the stage* files in /boot/grub and go through the whole process once again. This would replace the existing stages, which may be corrupted (don't know how/why).
 
Old 09-28-2006, 09:50 AM   #3
PerfectReign
Member
 
Registered: Apr 2005
Location: Los Angeles
Distribution: openSUSE / Ubuntu
Posts: 294

Original Poster
Rep: Reputation: 33
Thanks for your answer. I booted from the DVD to the hard drive and went ahead and deleted stage1 and stage2. Next, tried to install grub. It seemed to be happier, however, it wouldn't install. I got the following message.

GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> setup --stage2=/boot/grub/stage2 (hd0,5) (hd0,5)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 15: File not found
grub> setup --stage2=/boot/grub/stage2 (hd0) (hd0,5)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 15: File not found
grub> quit


Now, I am curious how to go about creating a stage1 file.

Leave it to a like me to try this!


[update]

I tried to run the grub install from the boot DVD. It told me the hard drive didn't exist. ??

I went and asked for "automatic repair" and it told me, "Activate Swap partition /dev/sda5"

Quote:
The partition /dev/sda5 has the file system ID 130 and contains a valid swap area. Activating this swap partition insreases the performance of the repair tool. Activate?
Huh?

I thought /dev/sda5 was my main / partition.

<steve martin mode>
I'm soo confused!
</steve martin mode>

Last edited by PerfectReign; 09-28-2006 at 10:07 AM.
 
Old 10-02-2006, 11:11 AM   #4
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
1. Quite stupid to quote myself, but
Quote:
I would probably rename/move/delete the stage* files
delete was the last choice.
2. PerfectReign wrote
Quote:
I thought /dev/sda5 was my main / partition
Once again, GRUB's (hd0,5) is Linux's /dev/hda5 not sda5!
But let us take it step by step.
- "All has been running for the most part" - means that it found GRUB, got GRUB find your disks and load your Linux kernel. That's good.
- It stopped working after you installed Windows, didn't it? - means that Windowa overwrote the Master Boot Record. btw, what does your BIOS say about its boot sequence?
- Next
Quote:
I booted from the DVD to the hard drive
means that you can see your drives and can run GRUB command line.
- If you have the GRUB executable (probably in /usr/sbin - not sure), you must have your GRUB stage files somewhere in /usr/local/share/grub (not sure about the exact location).
- What about copying these stage files into /boot/grub (/dev/sda7 must be mounted as /boot) and run the setup process (calling grub, root, setup and quit)
P.S.: and yes, I AM a newbie!

Last edited by Vitalie Ciubotaru; 10-02-2006 at 11:31 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My Computer ate Ubuntu (or at least pushed GRUB aside) aclemfaal Linux - General 2 08-30-2006 12:27 AM
Fedora ate my Dapper- GRUB Issues aquaboot Ubuntu 3 06-20-2006 10:32 PM
How can I restore a lost GRUB when Primary (XP) drive ate itself MultiBooter Linux - General 6 04-06-2006 06:05 AM
Vista ate my GRUB! springsteenfan Linux - Software 2 09-19-2005 05:16 PM
A little GRUB ate my hard disk - comments? eco2geek Linux - Software 1 10-25-2003 02:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration