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 11-24-2005, 05:04 PM   #1
zahadumy
Member
 
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226

Rep: Reputation: 31
Grub problem


I deleted one of my Windows partitions, so my linux partitions changed their names, and grub won't work any more because of this.
I did this before and everytime it worked fine, I don't understand why it doesn't work this time. That's how I did it before and how I try to do it now:
I boot with my 1st bootable cd and type "linux rescue". After that, you know that at some point you choose an option to mount your linux partitions. There I get this message:
Code:
An error occured trying to mount some or all of your system. Some of it may be mounted under
/mnt/sysimage
After I've got that shell, I tried this:
Code:
chroot /mnt/sysimage
and I've got this message:
Code:
chroot: cannon execute /bin/sh: No such file or directory
Since I couldn't chroot to my Fedora partition, I tried this:
Code:
mkdir a
mount /dev/sda11 a
chroot a
grub-install /dev/sda
and I've got this message:
Code:
The file /boot/grub/stage1 not read correctly
After I mounted my Fedora partition everything looked fine there... What should I do to reinstall GRUB? Thank you.

Last edited by zahadumy; 11-24-2005 at 05:09 PM.
 
Old 11-24-2005, 05:27 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
If you can mount Fedora, you might be able to repair grub without re-installing. I assume grub is still installed to the MBR; it just can't find the rest of itself because partition numbers have changed.

Edit /etc/grub.conf and /etc/fstab to show the new partition numbers for Linux.

In grub.conf, the location of the root of Fedora probably changed, as well as the location of vmlinuz.

In /etc/fstab, the /dev/sdx numbers may now have to be changed to correctly reflect the mount points.
 
Old 11-24-2005, 05:32 PM   #3
zahadumy
Member
 
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by bigrigdriver
If you can mount Fedora, you might be able to repair grub without re-installing. I assume grub is still installed to the MBR; it just can't find the rest of itself because partition numbers have changed.
After I deleted that partition I told you that I couldn't make grub work, and I had to rewrite MBR with my Windows XP bootable cd, because I had no operating system and I had to search the net to solve this. Since I couldn't find anything useful, I wrote this post here. So now GRUB is not any more installed on MBR. Thank you.

*** EDIT ***
I solved my problem. The problem was I had in /etc/fstab one entry for each Windows partition, and after I deleted one of them the last entry pointed to a partition which didn't exist any more, and that's why it failed to mount my system under /mnt/sysimage. I didn't think about this... Thank you.

Last edited by zahadumy; 11-24-2005 at 05:47 PM.
 
  


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
HDD problem, scancode problem and grub EJ_INSIDE Debian 2 07-15-2004 09:36 AM
problem with grub deNiro Debian 4 06-05-2004 10:54 AM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM
grub problem ianunderwood Linux - General 4 05-31-2003 05:45 AM
GRUB problem hfawzy Linux - Newbie 4 04-11-2003 12:17 PM

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

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