LinuxQuestions.org
Help answer threads with 0 replies.
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 03-09-2005, 09:03 PM   #1
Frelov
Member
 
Registered: Sep 2003
Location: In a cave in the himalayas
Distribution: FC4 (currently)
Posts: 36

Rep: Reputation: 15
lost grub AND swap partition


Please forgive what is, by the looks of my search results, another spin on an already worn out question.

Problem:

multi boot, WinME/WinXP/RH9. XP became corrupted yet again. Trying to not have to reinstall redhat 9, I researched and jotted down the instructions for restoring grub and reloaded winxp

Complication: partition housing win xp had to be deleted and recreated. At this point I decided to resize partition to allow more space for other linux versions that I'd like to eventually try later

Evidently this changed the hard drive reporting for linux. the swap file (originally on hda3) is no longer recognized by red hat.

Attempted So far:
1) I booted using the restore floppy and typed "linux restore" at the "boot:" prompt.
2) RH9 automatically mounts system on /mnt/sysimage so I:
chroot /mnt/sysinfo
grub-install /dev/hda

Outcome:
"Kernel error . . . . . . ."
"invalid stack 0000 . . . . . . ."

I've researched and downloaded some instructions for entering grub commands manually but I am a newbie and don't know how to determine which partition is /boot for linux

I tried to "upgrade" only using rh9 anaconda installer but it fails due to the swap file no longer being /hda3.

I have 2 hd's with the meat of rh9 on the slave (swap was on master) and the meat of windows on master with swaps on slave.

most of the articles I can find on here appear to assume the readers have a greater experience/knowledge with linux than I do and give many general directions without specific commands, etc.

could someone please take the time to help an ignorant newbie such as myself? Many thanks for your kindness and patience.
 
Old 03-09-2005, 11:03 PM   #2
Frelov
Member
 
Registered: Sep 2003
Location: In a cave in the himalayas
Distribution: FC4 (currently)
Posts: 36

Original Poster
Rep: Reputation: 15
Forgot to specify.

my apologies. I forgot to specify specific questions after explaining my delima:

1) how do I find definitively which partition is boot and which is now swap while in rescue mode?
2) which file do I edit while in rescue mode to force the current linux/rh9 installation to recognize the change in the swap partition?
3) after fixing the now invalid pointer to the swap partition will grub-install work then and if not what commands do I run to manually force grub to reinstall?

I'm trying to avoid re-installing rh9 at all costs as I havent done my weekly backups and have data and email I'd like to save and cannot get to it from rescue mode due to my ignorance of the system. All help is appreciated. Thanks.
 
Old 03-10-2005, 12:05 AM   #3
Frelov
Member
 
Registered: Sep 2003
Location: In a cave in the himalayas
Distribution: FC4 (currently)
Posts: 36

Original Poster
Rep: Reputation: 15
found it by trial and error

well, I found everything by trial and error with only minor setbacks (I hope).

For any who's genuinely interested here is my solution:

1) boot using the emergency start disk (downloadable in the rh9 ftp site if you don't have one)
type linux rescue at the boot: prompt and after the linux command prompt comes up

chroot /mnt/sysimage (default system mounting for rh9 boot floppy)
sfstab
this shows SOME info on the partitions, including which is swap (mine was hda4)
I was able to correctly guess that my root partition was hda2 since it was the only partition in which the cylinders/sectors combo equated to roughly the size I had specified for root. (thank God I'm not totally ignorant)

cd etc
vi fstab (edit the fstab file to reflect the correct swap partition)
:wq (writes and quits in vi)

vi grub.conf (switch root from hd0,1 to hd0,2 since my root is now on hda3)
:wq

grub-install /dev/hda (JUST to be safe)
exit
exit (I don't know why but the floppy requires it twice to reboot)


had I not tried running grub-install /dev/hda1 prior to all this everything would be working perfectly. now I have to try to figure how to restore the ntloader without ruining my mbr again . I"ll post in this forum again to see if anyone can answer that question for me (will be interesting the curses I get for asking a windows question on a linux forum at least
 
Old 03-10-2005, 12:06 AM   #4
Frelov
Member
 
Registered: Sep 2003
Location: In a cave in the himalayas
Distribution: FC4 (currently)
Posts: 36

Original Poster
Rep: Reputation: 15
oops

in previous note sfstab SHOULD have been sfdisk. sorry
 
  


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
Lost my swap space Alf829 Linux - Hardware 6 09-08-2004 09:43 AM
I lost my NTFS partition by mistake using GRUB yoonsangkyun Linux - Newbie 6 06-03-2004 08:53 PM
I lost my NTFS partition by reinstalling GRUB yoonsangkyun Linux - General 4 01-22-2004 03:25 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 09:45 AM
Lost Swap Space rayflynn Linux - General 1 08-05-2001 04:44 PM

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

All times are GMT -5. The time now is 10:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration