LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-19-2007, 12:37 PM   #1
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Rep: Reputation: 16
somehow i destroyed grub -- please help!!


well honestly i have no idea what i did. i got up this morning, did a yum update, shutdown to swap dvd drives, changed my mind, rebooted, and now i'm looking at this...

(running fc6 with whatever the latest kernel is which was updated via yum a couple days ago)

Code:
GNU GRUB version 0.97 (639K lower / 523200K 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>
i REALLY don't want to lose the data i have on this drive (200GB worth of movies) but i honestly don't even know where to begin. i have a FC7 livecd and i booted with that but have no idea how to get to the actual HDD when i do. from what i understand, i need to change my grub.conf -- but how??

sorry if this post is rather vague, but i'm just a little pissed off and i may or may not have thrown my linux bible in the trash after it gave me absolutely nothing for the 100th time. luckily i have my XP machine next to my fedora box, but i feel so dirty posting on this windows trash.

errr...help?

Last edited by alabamaman; 09-19-2007 at 01:04 PM. Reason: close tags
 
Old 09-19-2007, 01:03 PM   #2
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Original Poster
Rep: Reputation: 16
also i don't know if this matters or not, but it was setup as a logical volume.

i've searched a little bit and found a couple things i thought would help, but all i get is this...

Code:
grub> geometry (hd0)
drive 0x80: C/H/S = 1024/255/63, The number of sectors = 390721968, LBA
  Partition num: 0, Filesystem type unknown, partition type 0x83
  Partition num: 1, Filesystem type unknown, partition type 0x8e
does this mean my drive is just dead? its a relatively new drive so i hope this isn't the case. i have a spare machine here too...is there any way i can load a distro on there and plug this troubled drive in to recover my data before i just reinstall? i'm sure there has to be a way to keep from reinstalling...that's like a staple of linux right?
 
Old 09-20-2007, 11:08 AM   #3
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Original Poster
Rep: Reputation: 16
also as i follow this grub helper, i run into this...

Code:
grub> root (hd0,0)
  Filesystem type unknown, partition type 0x83

grub> find /sbin/init

Error 15: File not found

grub> find /vmlinuz

Error 15: File not found
somebody? anybody?
 
Old 09-20-2007, 11:38 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
First, read this thread: http://www.linuxquestions.org/questi...d.php?t=538007.

Do you have /boot in a seperate partition?

Can you boot the liveCD and manually mount the Linux partition and gain access to your files?
 
Old 09-20-2007, 01:05 PM   #5
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by bigrigdriver View Post
that thread makes me really want to switch to opensuse 10.2, seems like i'm wasting too much brain power with fedora
Quote:
Originally Posted by bigrigdriver View Post
Do you have /boot in a seperate partition?
fedora set it up with a separate /boot automatically. i just have 2 partitions, the boot and the lvm (evidently very stupidly not a separate one for /home from what i keep hearing)
Code:
(recreated by hand, as seen via rescuecd -- since i can't copy/paste)
root@sysresccd /root % fdisk -l
Disk /dev/hda 200.0 GB blah blah blah

Device   Boot      Start      End         Blocks   Id    System
/dev/hda1  *           1       13         104391   83    Linux
/dev/hda2             14     24321     195254010   8e    Linux LVM
Quote:
Originally Posted by bigrigdriver View Post
Can you boot the liveCD and manually mount the Linux partition and gain access to your files?
no, i cannot. when i try to mount it i get this:
Code:
root@sysresccd /root % mount -t ext3 /dev/hda2 /mnt/test
VFS: Can't find ext3 filesystem on dev hda2.
mount: wrong fs type, bad option, bad superblock on /dev/hda2,
  missing codepage or other error
  In some cases useful info is found in syslog - try
  dmesg | tail or so

root@sysresccd /root % dmesg | tail
blah
blah
VFS: Can't find ext3 filesystem on dev hda1.
VFS: Can't find ext3 filesystem on dev hda2.
what i'm wondering: is the logical volume what's causing the problem with the mount? or am i just hosed and this drive is lost? i don't imagine the drive is lost, since i get a grub> prompt, but that's just my logic which is most certainly wishful thinking
 
Old 09-20-2007, 01:09 PM   #6
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Original Poster
Rep: Reputation: 16
also this is probably a really dumb question but is there a way to maybe copy the partition i'm trying to recover to another drive over the network without mounting it (since i can't)? i have a spare 500GB drive in a different machine that will hold it all, but i can't put it in this machine because it is SATA.
 
Old 09-20-2007, 01:51 PM   #7
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Hmm, there isn't much you can do as long as the disk can't be mounted.

Have you tried removing the new disk from your volume group?

Last edited by jay73; 09-20-2007 at 02:17 PM.
 
Old 09-20-2007, 02:16 PM   #8
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jay73 View Post
Hmm, there isn't much you can do as long as the disk can't be mounted.

Have you tried removing the new disk from your volume group?
well i'd love to remove it from the volume group, but uh...how? does it not have to be mounted in order to do that? i'm up for anything at this point before i give up and dive off the cliff of fdisk
 
Old 09-20-2007, 02:26 PM   #9
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Have you tried mounting one you partitions inside the LVM, for example /home, from your livecd?

mount /dev/LogVol00/home

If that doesn't work, then I'm afraid that it really doesn't look very good.
 
Old 09-20-2007, 02:31 PM   #10
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jay73 View Post
Have you tried mounting one you partitions inside the LVM, for example /home, from your livecd?

mount /dev/LogVol00/home

If that doesn't work, then I'm afraid that it really doesn't look very good.
well i kinda tried something like that but i was basically just guessing, i'll try that now. i did just make some progress though with e2fsck /dev/hda1 which fixed up my boot partition and i got it mounted okay. now i have to figure out what to do next.
 
Old 09-20-2007, 02:37 PM   #11
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Original Poster
Rep: Reputation: 16
also i booted up with the rescuecd and removed the lvm flag. let's hope that wasn't a bad idea. fdisk -l /dev/hda2 tells me "Disk /dev/hda2 doesn't contain a valid partition table" so i'm guessing i just need to format it, right?
 
Old 09-20-2007, 03:29 PM   #12
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
If you format hda2, you erase its contents . Is that what you want to do? I assume that hda2 corresponds to all of your OS except the boot partition.

As for the missing partition table, that is a consequence of removing the LVM flag. It means that your system hasn't got a clue anymore what is inside hda2.

Well, if you do format, you can simply reinstall and avoid LVM by doing manual partitioning. LVM is a pain anyway unless you really need it (and that's rare for a home system).
 
Old 09-20-2007, 03:58 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Caveats: I've never used Fedora, and I don't use LVM.

Seems somebody (that yum update presumably) mangled your disk geometry - there is no way known that is correct for a 200+ Gig drive. That buggers up everything.
Sorry, I can't even guess what the cylinder number should be.

Don't go flailing around changing things - put the partition back to LVM (x'8e'). Your data should still be intact, you just need to get at it. The redhat site used to have some good papers - I'd expect something on mounting an installed system from the CD/DVD.
Else try Knoppix and do a pvscan followed by "vgchange -a y" to see what it finds. Plenty of posts along those lines here at LQ. It (Knoppix) may also use the (incorrect) geometry it finds on the disk, so may not help.
The fdisk you tried failed because it is used on disk, not partitions.

Can't help directly as I've never been in this position.
 
Old 09-25-2007, 08:33 AM   #14
radu
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: 0
Put the LVM flag back as it use to be.

boot in rescue mode
vgchange -a y
mount -t ext3 -o rw /dev/mapper/VolGroup00-LogVol00 /mnt/sysimage
ls /mnt/sysimage
That is your volume - copy the data.

R
 
Old 09-25-2007, 02:07 PM   #15
alabamaman
Member
 
Registered: Jul 2007
Location: linux-noobville.d/dfw texas
Distribution: grub multi-booter
Posts: 102

Original Poster
Rep: Reputation: 16
yeah i couldn't ever get it mounted and i just formatted and repartitioned so i can try a multi-boot box. the data wasn't that big of a deal, i can get them back at the next lanparty anyway. thanks for the help, this whole process has turned me on to lots of new things i wish i'd known before ever installing in the first place (i.e. make a separate partition for /home!!). either way its all about learning stuff and i don't really mind starting over, as that's the best way i've found to learn so far.

now on to multi-boot headaches!
 
  


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
Have I just destroyed a partition?? Skyguy Linux - Newbie 2 11-26-2006 12:34 PM
destroyed system alaios Linux - General 1 03-25-2004 03:47 AM
kde destroyed alaios Linux - Software 3 03-19-2004 03:34 AM
i destroyed my lilo......um...help. roesingape Linux - Software 9 05-28-2003 10:47 PM
rpm DB destroyed Streams Linux - Software 3 05-22-2003 01:20 AM

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

All times are GMT -5. The time now is 11:46 AM.

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