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 - 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 11-06-2009, 11:14 AM   #1
Jay88
Member
 
Registered: May 2009
Location: London
Distribution: Xubuntu 14.04
Posts: 49

Rep: Reputation: 15
Grub Problem - Cannot Load Linux


Hi

I have a dual boot system with XP and Fedora and I made some changes to my XP partition and now rather than receiving the usual grub menu list I am taken to a grub prompt -> grub>

I have searched high and low for a solution to this and was able to come across some commands which have enabled me to log into Windows using the 'chainloader+1' command but I can no longer locate my Linux partition.

I tried using the fedora cd to repair my system but it could not find Linux on my system. I tried using the 'find /boot/grub/stage1' command but it could not find anything. I also used a mepis Live cd and ran the command
Fdisk -l with the output below

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2294 18426519 7 HPFS/NTFS
/dev/sda2 2295 8031 46082448 7 HPFS/NTFS
/dev/sda3 8032 20779 102398309+ f W95 Ext'd (LBA)
/dev/sda5 8032 20779 102398278 7 HPFS/NTFS

My 3 windows partitions are fine on sda1,2 and 5 but there is no output for my Linux partition - Does this mean that my Linux install has gone forever or is there any way I can still rescue it?
 
Old 11-06-2009, 11:33 AM   #2
ammorais
Member
 
Registered: Nov 2009
Location: Lisbon, Portugal
Distribution: Gentoo, CentOs, Ubuntu, Debian
Posts: 182

Rep: Reputation: 49
Quote:
Does this mean that my Linux install has gone forever
By your fdisk output it looks that way.

Quote:
...XP and Fedora and I made some changes to my XP partition
Did you use windows to make those changes? If so, there is your problem.
 
Old 11-06-2009, 11:41 AM   #3
Jay88
Member
 
Registered: May 2009
Location: London
Distribution: Xubuntu 14.04
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ammorais View Post

Quote:
Does this mean that my Linux install has gone forever
By your fdisk output it looks that way.

Did you use windows to make those changes? If so, there is your problem.
Yes I did, but the change was only made to my primary partition.

So if I have now lost all of my Linux files, how do I get rid of grub - no point in prolonging the inevitable....
 
Old 11-06-2009, 11:48 AM   #4
ammorais
Member
 
Registered: Nov 2009
Location: Lisbon, Portugal
Distribution: Gentoo, CentOs, Ubuntu, Debian
Posts: 182

Rep: Reputation: 49
Code:
Yes I did, but the change was only made to my primary partition.
Windows as the bad habit of thinking is alone in the OS world. So the windows disk partitioner should only be used in 100% Windows machines.

If you had sensitive data on the linux partition it may still be possible to recover it, although you probably need some physical expert help.

To unninstall grub, here's a manual:
http://www.cyberciti.biz/faq/linux-h...ninstall-grub/
 
Old 11-06-2009, 12:02 PM   #5
Jay88
Member
 
Registered: May 2009
Location: London
Distribution: Xubuntu 14.04
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ammorais View Post

If you had sensitive data on the linux partition it may still be possible to recover it, although you probably need some physical expert help.

To unninstall grub, here's a manual:
http://www.cyberciti.biz/faq/linux-h...ninstall-grub/
I wouldn't say it was sensitive data but it will definitely be a major pain to lose all of my configuration files and all of the tools I had installed - It took me a long time to get things working exactly the way I liked. Thanks for the link.
 
Old 11-06-2009, 01:23 PM   #6
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by Jay88 View Post
I wouldn't say it was sensitive data but it will definitely be a major pain to lose all of my configuration files and all of the tools I had installed - It took me a long time to get things working exactly the way I liked. Thanks for the link.

I know this may not help but it is easier the next time around. If you get it back up check out the different ways to create backups.



Larry
 
Old 11-06-2009, 02:36 PM   #7
jamwaffles
Member
 
Registered: Mar 2008
Distribution: Ubuntu Lucid
Posts: 131

Rep: Reputation: 19
Hi

surely (can anyone please back me up on this) if you had the patience and the storage to do so, you could take an image of the entire disk. You'd need a live disc and another hard disk the same size or bigger than youre original. Doing this takes each byte and copies it to a new location.

it uses the "dd" command. another poster may be able to help you here

James
 
Old 11-06-2009, 02:37 PM   #8
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Partition table...

You can try to restore your partitions with TestDisk. You might be advised to make a clone copy of your HDD with the command "dd" or with Clonezilla. This lets you try a restoration and fail without loosing data and gives you a chance to try again.

Do not write anything to the HDD.

http://www.cgsecurity.org/wiki/TestDisk

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
 
Old 11-06-2009, 02:38 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,503

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
You might try SystemRescueCD which has TestDisk to recover data.

http://www.sysresccd.org/Main_Page
 
Old 11-06-2009, 02:45 PM   #10
Jay88
Member
 
Registered: May 2009
Location: London
Distribution: Xubuntu 14.04
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by thorkelljarl View Post
Partition table...

You can try to restore your partitions with TestDisk. You might be advised to make a clone copy of your HDD with the command "dd" or with Clonezilla. This lets you try a restoration and fail without loosing data and gives you a chance to try again.

Do not write anything to the HDD.

http://www.cgsecurity.org/wiki/TestDisk

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
Thanks I will have a look at TestDisk and SystemRescueCd.
 
Old 11-06-2009, 03:44 PM   #11
Jay88
Member
 
Registered: May 2009
Location: London
Distribution: Xubuntu 14.04
Posts: 49

Original Poster
Rep: Reputation: 15
OK I think I might be almost back in business but I am still having the grub problem - The TestDisk utility recovered my Linux partitions and I have written them to disk but grub is still not loading.

My output from Fdisk -l in the mepix live cd is now -

Code:
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x497f497e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2294    18426523+   7  HPFS/NTFS
/dev/sda2            2295        8031    46082452+   7  HPFS/NTFS
/dev/sda3            8032       38912   248051632+   f  W95 Ext'd (LBA)
/dev/sda5            8032       20779   102398278+   7  HPFS/NTFS
/dev/sda6           20780       20804      200781   83  Linux
/dev/sda7           20805       38912   145452478+  8e  Linux LVM

Disk /dev/sdf: 2056 MB, 2056257536 bytes
16 heads, 32 sectors/track, 7844 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Disk identifier: 0xc73d6767

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *           1        7845     2008304    e  W95 FAT16 (LBA)

Disk /dev/dm-0: 26.2 GB, 26239565824 bytes
255 heads, 63 sectors/track, 3190 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 62.9 GB, 62914560000 bytes
255 heads, 63 sectors/track, 7648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-2 doesn't contain a valid partition table
I can access the grub folder from a terminal in mepix but I am not sure what I should do next..
 
Old 11-07-2009, 04:08 AM   #12
jamwaffles
Member
 
Registered: Mar 2008
Distribution: Ubuntu Lucid
Posts: 131

Rep: Reputation: 19
You probably need to reinstall grub.

You can do this by (if i remember correctly)

sudo grub-install /dev/sda (or sdX where X is your drive letter)

If this is wrong, can someone please let me know. Im almost sure there are more commands but i cant remember them

James
 
Old 11-07-2009, 07:56 AM   #13
Jay88
Member
 
Registered: May 2009
Location: London
Distribution: Xubuntu 14.04
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jamwaffles View Post
You probably need to reinstall grub.

You can do this by (if i remember correctly)

sudo grub-install /dev/sda (or sdX where X is your drive letter)
I have already tried reinstalling using my Fedora cd but it did not work - not sure why..

I ran - chroot /mnt/sysimage to become root and then
grub-install /dev/sda6
 
Old 11-07-2009, 09:12 AM   #14
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Congratulations on the recovery...

This is a GRUB rescue utility that you can use.

http://www.supergrubdisk.org/

You can also use almost any linux live-cd, except fedora, to repair GRUB, including many rescue CDs.

http://www.sysresccd.org/System-tools

http://partedmagic.com/

Last edited by thorkelljarl; 11-07-2009 at 09:20 AM.
 
Old 11-08-2009, 04:44 AM   #15
jamwaffles
Member
 
Registered: Mar 2008
Distribution: Ubuntu Lucid
Posts: 131

Rep: Reputation: 19
Quote:
Originally Posted by thorkelljarl View Post
Congratulations on the recovery...

This is a GRUB rescue utility that you can use.

http://www.supergrubdisk.org/

You can also use almost any linux live-cd, except fedora, to repair GRUB, including many rescue CDs.

http://www.sysresccd.org/System-tools

http://partedmagic.com/
I use the ubuntu CD when i break my system.

James
 
  


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
Cannot load Mandriva, grub problem DjPan Mandriva 5 06-16-2008 11:05 PM
grub failed to load linux (grub think ext3 partition as fat) khairilthegreat Linux - Newbie 7 08-09-2007 12:12 PM
Problem with GNU Grub, trying to load windows ProxyKing Linux - Games 4 06-10-2005 03:14 PM
GRUB can't load Linux at all... help! Napalm Llama Linux - Software 1 02-09-2005 05:31 PM
Linux Won't load under Grub mikeyt_333 Linux - General 9 02-08-2002 08:24 AM

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

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