LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Grub problems (https://www.linuxquestions.org/questions/linux-software-2/grub-problems-829644/)

ArtemZ 08-31-2010 09:49 PM

Grub problems
 
Hi,
I got problems with grub again...as by always I cannot deal with it (seriously I think its the worst program ever made after ms windows)
I trying to install grub on the remote server with linux (debian stable) image loaded into the ram.
Firstly grub said there is no stage1 file, but its there:
Quote:

[root@rescue /]# file /boot/grub/stage1
/boot/grub/stage1: x86 boot sector, code offset 0x48
then I cleaned boot sector by dd if=/dev/zero of=/dev/sda bs=466 count=1
Now it says there is no first partition:
Quote:

grub> root (hd0,0)

Error 22: No such partition
I tried to reread partition table by hdparm -z /dev/sda but nothing changed.
Anyone please help

ArtemZ 08-31-2010 10:12 PM

Okay, I recovered partition table, but grub still unable to find stage1 file:

Quote:

grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 2: Bad file or directory type

grub> find /boot/grub/stage1

Error 15: File not found
grub> quit
[root@rescue /]# file /boot/grub/stage1
/boot/grub/stage1: x86 boot sector, code offset 0x48

exvor 08-31-2010 10:19 PM

Are you %100 sure you have /boot mounted on the first drive first partition in the system?

ArtemZ 08-31-2010 10:24 PM

Oh it looks like I just used old grub which unable to load stage1 file generated by newer grub

exvor 08-31-2010 10:26 PM

Yeah old grub is better IMHO then the newer one. The newer one makes things more complicated then they need to be for a simple loader. But back to your thread here yeah they are not compatible you need to use the right grub for the right files.


All times are GMT -5. The time now is 06:44 AM.