LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Big deal with GRUB please help! (https://www.linuxquestions.org/questions/linux-newbie-8/big-deal-with-grub-please-help-225286/)

drcyber 09-01-2004 10:55 AM

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.

Enrico81 09-01-2004 11:30 AM

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

drcyber 09-01-2004 11:32 AM

Ok, what do you mean with edit the file you want?... what file should I edit?
Thanks!

Enrico81 09-01-2004 11:39 AM

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

Enrico81 09-01-2004 11:42 AM

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.

drcyber 09-01-2004 11:42 AM

Will GRUB work again if I recreate the swap partition?

drcyber 09-01-2004 11:43 AM

I have unallocated space in my disk, cuz I deleted the swap.

Enrico81 09-01-2004 11:48 AM

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

drcyber 09-01-2004 11:48 AM

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'

:confused:

Enrico81 09-01-2004 11:54 AM

Quote:

Originally posted by drcyber
When I type that, prompt says:

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

:confused:

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?

drcyber 09-01-2004 11:56 AM

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?

Enrico81 09-01-2004 11:59 AM

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".

drcyber 09-01-2004 12:02 PM

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...

drcyber 09-01-2004 12:04 PM

What about if I delete GRUB using... fdisk /mbr
Maybe I can reinstall it.

egag 09-01-2004 12:05 PM

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


All times are GMT -5. The time now is 08:30 AM.