LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2004, 05:04 PM   #1
lawrencegoodman
Member
 
Registered: Aug 2003
Posts: 47

Rep: Reputation: 15
Major Meltdown to Grub


Like an idiot, I left Linux and repartitioned my hard drive using Partition Magic. Now when I boot up, it takes me directly to the grub prompt. I really have no idea how to remedy this situation. Please help.

Some notes:
1) I type "find /boot/grub/stage1" and get the response "file nto found"
2) I tried using the Suse 8.2 CD's to boot up and chose the option "use an already installed system" then get while it's loading the following error msgs, "cannot open filesystem on /dev/hda7" and then it says "fsck failed. Please repair manually and reboot."

Can anyone help me out. I believe all data is still on the partition. It's just getting grub to find it.

Thanks.
 
Old 01-13-2004, 06:01 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
If your on the promt it usually means its found its own files. But the menu maybe in the wrong place.
Type
find /boot/grub/menu.list
It will tell you where it is. then you can try
root(hdx,x)
kernel /vmlinuz-2.x.xx root=/dev/hdx
boot

Of couse you'll have to enter the results from find where I put the x's as well as your version of the kernel.
 
Old 01-13-2004, 08:03 PM   #3
lawrencegoodman
Member
 
Registered: Aug 2003
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks. I think I am getting closer to solution but still no luck.

I type in find /boot/grub/menu.lst and it says "hdo,7"
I then type in root (hd0,7)
Then I type kernel /vmlinuz root=/dev/hd0 and it says "Error 15: File not found"

Not sure what's happening or why.

Thanks
 
Old 01-13-2004, 08:06 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
hd0,7 is /dev/hda8

Linux names drives hda, hdb, hdc, hdd

Grub names them hd0 hd1 hd2 hd3

The second parameter you have to add 1 too as Grub counts from 0 and linux counts from 1.

Also you may have to add your kernel version to the /vmlinuz say like /vmlinuz-2.4.23

Last edited by leonscape; 01-13-2004 at 08:08 PM.
 
Old 01-13-2004, 08:18 PM   #5
lawrencegoodman
Member
 
Registered: Aug 2003
Posts: 47

Original Poster
Rep: Reputation: 15
thanks for your help. still no luck.

i type in:
kernel /vmlinuz root=/dev/hda8 and still get a file not found error.

at the same time i am typing in root (hd0,7) and that seems to be working fine.

one other thing, not sure if it means anything:
i type in find /boot/grub/grub.conf and get told it can't find that file.

thanks again.
 
Old 01-13-2004, 08:26 PM   #6
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
grub.conf is Fedora/Redhat link for menu.list. It exists in the /etc so you should type: find /etc/grub.conf ( or find /etc/grub/grub.conf )

You are adding the kernel version? as its part of the filename. you coud also try root=LABEL=/ instead of /dev/hda8.

This is all assuming that everthings on one partition. and that everthing isn't screwed. otherwise the best thing might simply be to reinstall.

Last edited by leonscape; 01-13-2004 at 08:27 PM.
 
Old 01-13-2004, 08:52 PM   #7
lawrencegoodman
Member
 
Registered: Aug 2003
Posts: 47

Original Poster
Rep: Reputation: 15
i appreciate your patience.
i am sure the system is not screwed.
i can still get a command prompt and login as root and everything is there.

i wish i could even get to windows but when i type the following:
rootverify (hd0,0)
makeactive
chainloader +1
boot

this takes me to the root command prompt (init level 3).

i think the source of the problem may be that i created a new partition hda7 through partition magic and linux doesn't quite know how to handle it.

i also know that when i boot off the cd-room i get the following error:
Cannot open filesystem on "dev/hda7"
fsck failed. Please repair manually and reboot.

There must be at least some way even to get back into windows right?

Thanks.
 
Old 01-13-2004, 08:59 PM   #8
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
So your into your system? Ahhhh

Login as root and give me what these say
less /boot/grub/menu.list

less /etc/fstab

uname -r

df -h

That'd be handy
 
Old 01-13-2004, 09:24 PM   #9
lawrencegoodman
Member
 
Registered: Aug 2003
Posts: 47

Original Poster
Rep: Reputation: 15
Okay, I'll give you highlights because I am running back and forth between computers:
1) /boot/grub/menu.lst:
title linux
kernel (hd0,6)/boot/vmlinuz root=/dev/hda7
initrd (hd0,6)/boot/initrd

title windows
root (hd0,1)
chainloader +1

2) fstab:
dev/hda2 main windows drive--C
hda6=linux swap
hda7=main linux drive, reiserfs

3) its kernel: 2.4.20-4GB
4) df -h:
/dev/hda7 is mounted on /
/dev/hda2 is mounted on windows/C


One more note: remember that I foolishly created a new partition in between the linux swap and the main linux partition. That I think is how I screwed this all up.

Again, thanks. I will have to check your response in the morning as it's late here.

Lawrence
 
Old 01-13-2004, 09:42 PM   #10
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
One more to do

fdisk /dev/hda

This will load fdisk now type p and enter and it will tell you whats on the disk. df is not giving us the answer we want if you created a new partition. After its printed out the results we'll know exactly what parition magic did and see if we can fix it.

to load windows you'll need to type rootnoverify(hd0,1) not (hd0,0). Hope that helps.

See you tomorrow.
 
Old 01-14-2004, 06:45 AM   #11
lawrencegoodman
Member
 
Registered: Aug 2003
Posts: 47

Original Poster
Rep: Reputation: 15
Good morning and thank you again.

1) I ran fdisk /dev/hda and right away get the following msg: "The number of cylinders for the disk is set to 3647. This is larger than 1024 and could cause problems with booting." I then hit p and got the following output:
/dev/hda1 Dell Utility
/dev/hda2 NTFS
hda4 Win 95 Ext'd (LBA)
hda5 Win 95 FAT 32
hda6 Linux Swap
hda7 Win 95 FAT 32
hda8 Linux


there is no hda3 is that's an issue.


2) when i try to boot with rootnoverify (hd0,1) it takes me back to the linux prompt. when i try to use rootnoverify (hdo,2), i get an error msg "syntax error near unexpected token (hd0,2).


thanks again.
 
Old 01-14-2004, 06:59 AM   #12
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Login in as root to do the following

Right first, I think you'll need too rewrite your menu.list

title linux
kernel (hd0,7)/boot/vmlinuz root=/dev/hda8
initrd (hd0,7)/boot/initrd

title windows
rootnoverify (hd0,1)
makeactive
chainloader +1

This is presuming that your NTFS partition is your C ( Which I believe it is ). Then you need to reinstall grub.

type grub and it will do some checking before it starts. Then type

root (hd0,7)
setup (hd0)
quit
This will install grub on the MBR.
Now try rebooting, grub should give you the menu.

To use the new partition under linux you need to change its type using either fdisk or parted. and then mount it somewhere.
hda3 is missing... Thats odd at first I though it was your extended partition, but thats what hda4 is doing. So it is missing.

Last edited by leonscape; 01-14-2004 at 07:03 AM.
 
Old 01-14-2004, 10:04 AM   #13
lawrencegoodman
Member
 
Registered: Aug 2003
Posts: 47

Original Poster
Rep: Reputation: 15
Okay, you are a genius. Grub now boots up and I can bootup into either windows or Linux. But there's still one problem:
When it starts booting Linux, the process falls apart and I get a "cannot open filesystem on /dev/hda7" error. It then says fsck failed.

I checked and my system has a /sbin/fsck and /sbin/fsck/reiserfs files. I tried to look at them with vi, but it comes up gobbledy-gook.

Because of this error, I cannot get into kde and deal with the hda7 problem.

I am scared of using Partition Magic to get rid of hda7 because that will only rename all the drives again, and GRUB will go down, I think.

This should be it, but would you mind helping me with this one again.

Thanks.
 
Old 01-14-2004, 10:11 AM   #14
lawrencegoodman
Member
 
Registered: Aug 2003
Posts: 47

Original Poster
Rep: Reputation: 15
Sorry, but I can give you more info:
I type the command fsck -A and get the following:

reiserfsck: Cannot open filesystem on "dev/hda7"
Warning . . . fsck.reiserfs for device /dev/hda7 exited with signal 6.
fsck.resiserfs /dev/hda7 failed (status 0x8). Run manually


I am thinking this might be a matter of editing fstab. Not sure.

Lawrence
 
Old 01-14-2004, 10:26 AM   #15
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
This is a problem because of /etc/fstab

You need to change all the settings that say /dev/hda7 too /dev/hda8.

Thats my bad. Use whatever you where using before to get into the system. and alter this file.

Again sorry forgot about that.

I was out so took a little longer to reply. Yep I know a geek in sunshine, but its pretty cloudy out.

Last edited by leonscape; 01-14-2004 at 10:28 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Brand new HDD and reiser meltdown generic_genus Linux - Hardware 2 10-05-2005 06:33 AM
Recovering Files after Meltdown jevchance Linux - Newbie 2 08-18-2005 05:05 PM
samba server meltdown mmf144 Linux - Networking 2 07-15-2005 11:00 AM
Installed nvidia drivers.. now screen looks like a meltdown on shutdown. guitarnix Linux - Hardware 0 11-19-2003 04:02 AM
Major MAJOR complaint... MasterC General 15 07-17-2003 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:09 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