LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 09-01-2004, 11:55 AM   #1
drcyber
Member
 
Registered: Mar 2003
Distribution: Fedora Core 2
Posts: 31

Rep: Reputation: 15
Unhappy Big deal with GRUB please help!


Hi everyone!

Yesterday, I was playing with my partitions... and I erased the swap linux partition by mistake.

Now... when I start my computer... just appear this:

GNU GRUB version 0.94 (639K lower / 261056K 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 have installed SuSE 9.1 and Windows XP. SAMSUNG 40GB, P4 2.6GHZ, 256MB RAM.

What should I do???

When I type geometry (hd0,0) in the prompt it shows:

Partition num: 0, Filesystem is fat
Partition num: 1, Filesystem is reiserfs
Partition num: 4, Fylesystem is unknown

What should I to to make my GRUB work again? I can't access to my Windows and Linux.
Thanks in advance.
 
Old 09-01-2004, 12:30 PM   #2
Enrico81
Newbie
 
Registered: Aug 2004
Location: Italy
Posts: 16

Rep: Reputation: 0
Re: Big deal with GRUB please help!

Quote:
Originally posted by drcyber
Hi everyone!

Yesterday, I was playing with my partitions... and I erased the swap linux partition by mistake.

Now... when I start my computer... just appear this:

GNU GRUB version 0.94 (639K lower / 261056K 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 have installed SuSE 9.1 and Windows XP. SAMSUNG 40GB, P4 2.6GHZ, 256MB RAM.

What should I do???

When I type geometry (hd0,0) in the prompt it shows:

Partition num: 0, Filesystem is fat
Partition num: 1, Filesystem is reiserfs
Partition num: 4, Fylesystem is unknown

What should I to to make my GRUB work again? I can't access to my Windows and Linux.
Thanks in advance.


I use lilo and I don't know grub very well but you can try with a live-cd (knoppix for example) and:

# mkdir /mnt/suse
# mount /dev/hdX /mnt/suse

(hdX = where is suse partition)

# chroot /mnt/suse /bin/bash

and now you can edit file that you want

# exit
# reboot
 
Old 09-01-2004, 12:32 PM   #3
drcyber
Member
 
Registered: Mar 2003
Distribution: Fedora Core 2
Posts: 31

Original Poster
Rep: Reputation: 15
Ok, what do you mean with edit the file you want?... what file should I edit?
Thanks!
 
Old 09-01-2004, 12:39 PM   #4
Enrico81
Newbie
 
Registered: Aug 2004
Location: Italy
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by drcyber
Ok, what do you mean with edit the file you want?... what file should I edit?
Thanks!

If you only erased the swap partition you can recreate it with command "mkswap", example:


# mkswap /dev/hdX
# swapon /dev/hdX
(hdX = your swap space)

# vim /etc/fstab

and add this line:

/dev/hdX none swap sw 0 0

# reboot

Last edited by Enrico81; 09-01-2004 at 12:43 PM.
 
Old 09-01-2004, 12:42 PM   #5
Enrico81
Newbie
 
Registered: Aug 2004
Location: Italy
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by Enrico81
If you only erased the swap partition you can recreate it with command "mkswap", example:


# mkswap /dev/hdX
# swapon /dev/hdX
(hdX = your swap space)

# vim /etc/fstab

and add this line:

/dev/hdX none swap sw 0 0

# reboot
it's works if you have a free partition for swap, of course.
Otherwise you must create space for swap partition.
 
Old 09-01-2004, 12:42 PM   #6
drcyber
Member
 
Registered: Mar 2003
Distribution: Fedora Core 2
Posts: 31

Original Poster
Rep: Reputation: 15
Will GRUB work again if I recreate the swap partition?
 
Old 09-01-2004, 12:43 PM   #7
drcyber
Member
 
Registered: Mar 2003
Distribution: Fedora Core 2
Posts: 31

Original Poster
Rep: Reputation: 15
I have unallocated space in my disk, cuz I deleted the swap.
 
Old 09-01-2004, 12:48 PM   #8
Enrico81
Newbie
 
Registered: Aug 2004
Location: Italy
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by drcyber
Will GRUB work again if I recreate the swap partition?
If you only change swap partition before failed boot, yes.
I never erase my swap partition and I don't use grub.

If it don't works you re-boot with live-cd and reinstall grub, see the gentoo-doc for grub-installation:

http://www.gentoo.org/doc/en/handboo...part=1&chap=10

Last edited by Enrico81; 09-01-2004 at 12:49 PM.
 
Old 09-01-2004, 12:48 PM   #9
drcyber
Member
 
Registered: Mar 2003
Distribution: Fedora Core 2
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Enrico81
If you only erased the swap partition you can recreate it with command "mkswap", example:


# mkswap /dev/hdX
# swapon /dev/hdX
(hdX = your swap space)

# vim /etc/fstab

and add this line:

/dev/hdX none swap sw 0 0

# reboot
When I type that, prompt says:

mkswap: Will not try to make swapdevice on '%s'

 
Old 09-01-2004, 12:54 PM   #10
Enrico81
Newbie
 
Registered: Aug 2004
Location: Italy
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by drcyber
When I type that, prompt says:

mkswap: Will not try to make swapdevice on '%s'

When you erased the swap partition you don't altered your disk space, it is true?
You have already create a partition with the "unallocated space", it is true?
 
Old 09-01-2004, 12:56 PM   #11
drcyber
Member
 
Registered: Mar 2003
Distribution: Fedora Core 2
Posts: 31

Original Poster
Rep: Reputation: 15
No I didn't. I just deleted the partition and restart my system. Then... GRUB doesn't shows the normal menu to start the operative systems.

If there is no unallocated space... what should I do?... how can I see the status of my hard disk and see all the partitions?
 
Old 09-01-2004, 12:59 PM   #12
Enrico81
Newbie
 
Registered: Aug 2004
Location: Italy
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by drcyber
No I didn't. I just deleted the partition and restart my system. Then... GRUB doesn't shows the normal menu to start the operative systems.

If there is no unallocated space... what should I do?... how can I see the status of my hard disk and see all the partitions?
If you don't changed the disk space you must reboot with a live-cd and follow that I suggested.
You must use "chroot".
 
Old 09-01-2004, 01:02 PM   #13
drcyber
Member
 
Registered: Mar 2003
Distribution: Fedora Core 2
Posts: 31

Original Poster
Rep: Reputation: 15
Im using the RESCUE OPTION of SuSE 9.1 CD. I can't use other livecd cuz I don't have a CD burner in this computer.

Im on the command line. Any other option?... I just want to start Windows again. From there I'll be able to manage my partitions...
 
Old 09-01-2004, 01:04 PM   #14
drcyber
Member
 
Registered: Mar 2003
Distribution: Fedora Core 2
Posts: 31

Original Poster
Rep: Reputation: 15
What about if I delete GRUB using... fdisk /mbr
Maybe I can reinstall it.
 
Old 09-01-2004, 01:05 PM   #15
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
can you post the output of : fdisk -l /dev/hdX
on this place...?
 
  


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
accidently compiled qt without mt support- big deal? schatoor Linux - Software 1 01-24-2004 11:42 AM
what's the big deal with migrating to fedora from redhat 9.0? spyghost Fedora 2 01-01-2004 04:35 PM
Web Browsers, what's the big deal ? Robert0380 General 22 11-04-2003 09:38 AM
I was wondering why is letting ports open such a big deal? HGeneAnthony Linux - Security 4 06-27-2003 03:46 AM
Wheel Mice - What's the big deal? ryanstrayer Linux - Software 13 02-01-2002 05:15 AM


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