LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   grub wont install (https://www.linuxquestions.org/questions/linux-software-2/grub-wont-install-224590/)

zajaco0 08-30-2004 10:08 PM

grub wont install
 
Hi, I recently reinstalled windows on my windows partition again. Before I reinstalled, I had grub booting windows and debian. I have made a rescue floppy and when I boot from floppy, it gives me the grub prompt:

grub>

i type:

Code:

root (hd0,2)
it replies:
filesystem type is ext2fs
partition type 0x83

then I type:

Code:

setup(hd0)
to reinstall grub,
it replies:
checking if "/boot/grub/stage1" exists...no
checking if "/grub/stage1" exists...no
Error 15: file not found

I also try to boot using the command lines straight from my menu.1st file...when I type in the line that starts with kernel, it comes up with a "cannot mount partition" error.

Anyone have any clues? or you need more info?

BigBug 08-31-2004 12:15 AM

Does /dev/hda3 partition contain grub stage files? it must. Or maybe forgot to mount it? (eg /boot)

dalek 08-31-2004 02:13 AM

Sounds like you are not pointing to the /boot partition with the root command. That is why it is not finding the files. Post how your partitions are laid out.

You can also type in root (hd0 then hit tab to get it to list what you have to pick from. I have done that before too. It helps anyway.

Later

:D :D :D :D

zajaco0 08-31-2004 06:44 PM

Ok, I actually tried a few things and none of them worked.

I pressed tab when i got to root (hd0, and got

Partiton num: 0: filesystem type unknown, partition type 0xa0
Partiton num: 1: filesystem type unknown, partition type 0x7
Partiton num: 2: filesystem type is ext2fs, partition type 0x83
Partiton num: 3: filesystem type unknown, partition type 0x82
Partiton num: 4: filesystem type 0x83, partition type 0x83

/ is hda3 and /home is hda5

I downloaded a rescue cd also. I booted using the rescue cd, and got into a bash prompt. i mounted my / partition using:
# mount -t ext3 /dev/hda3 /rootdirectory

I get a few errors that I think are causing my problem.

EXT_FS warning (device hda3): ext3.clear.journal.err:filesystem error recorede from previous mount: IO failure
EXT_FS warning (device hda3): ext3.clear.journal.err: marking fs in need of filesystem check
EXT_FS warning (device hda3): mounting fs with errors, running e2fstk is recommended

the drive mounted, and I could paruse around my directories all I wanted.
I typed:
# e2fstk -p /dev/hda3
and got:
the Filesystem size according to superblock is 2558351 blocks. The physical size is 2112547.
Either superblock or partition table is likely to be corrupt!
/dev/hda3: unexpected Inconsistency run fsck manually

so I ran fsck /dev/hda3 and got the same error

Am I receiving the errors because I am booting off of the recovery CD? or do i have some real problems?

BTW, I checked partititon table and it wasn't corrupt, i could still display it using fdisk -l

dalek 09-01-2004 02:18 AM

It sounds like the partition size was changed after it was formatted. There is a command to fix that, I used it once, but I can not remember what it is. :scratch: Got to love locate. :D

I think you have to do this from the CD. I also seem to recall the partitiion can not be mounted when you do this. The command is resize2fs for ext2 and ext3 file systems. It is resize_reiserfs for reiserfs file systems. You can type man for details regarding your specific issue. I think it is command /dev/hd<your drive and partition info here> though. Pretty straight forward.

It sounds like you don't have a seperate /boot partition, which is OK, nothing wrong with that, and that you are typing in the right commands to install grub. So I hope that works.

Post back if you need to. I'm hoping this works though.

Later

:D :D :D :D :D

zajaco0 09-03-2004 11:17 AM

resize2fs /dev/hda3 gives:

please run e2fstk -f /dev/hda3

which is run error checking again. It prompts again and says my partion or superblocked is messed up, then it asks if i want to abort...should I abort and try something else?? or just continue? I dont want to corrupt my data.


~zach

motub 09-03-2004 01:19 PM

There is, as far as I know, nothing else to try. If you have partition errors-- which you seem to-- and you try to resize a partition without correcting them, you are very likely to corrupt your data.

Run e2fstk -f /dev/hda3 as requested and see what happens. The command will hopefully be able to fix the partition without hurting your data.


All times are GMT -5. The time now is 02:25 PM.