LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   ubuntu's Grub (https://www.linuxquestions.org/questions/linux-hardware-18/ubuntus-grub-549234/)

cber 04-26-2007 12:28 PM

ubuntu's Grub
 
Since I re-install Windows OP,I have to rewrite the Grub to the MBR.

i type the command:
%Grub
%root (hd0,6) ##my linux(ubuntu 6.10) sits in hdc6.
%setup (hd0)


And I could see the successful acknowledgy.But I still boot to ubuntu.

The error infomation is:
Error 15:File not found.

What i'm amazing is that the content in the menu.lst is:
***********************************************
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hdc8 ro quiet splash.
initrd /boot/initrding-2.6.17-10-generic
************************************************
I tried for a few times the results are the same.
But it't sure that i see the successful acknowledgment.





when i edit it to:
root (hd0,5)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hdc6 ro quiet splash.
initrd /boot/initrding-2.6.17-10-generic

it says can't mount partition.

when i edit it to:
root (hd0,6)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hdc7 ro quiet splash.
initrd /boot/initrding-2.6.17-10-generic

after boot,it says :
/bin/sh:can't access tty: job control turned off

Gethyn 04-26-2007 12:34 PM

Have you tried just 'grub-install /dev/hdx' (substituting "x" for the letter of your booting hard drive)?

Quakeboy02 04-26-2007 12:40 PM

Get Super Grub Disk and run it.

cber 04-27-2007 08:28 AM

I have tried the Grub-intall,it doesn't work too.

VoidRoamer 04-27-2007 08:05 PM

Hi cber,

A couple of thoughts for you...

If your root folder is located on partition 6 of hdc then root(hd0,x) should be 5. This parameter specifies the number of partitions BEFORE the one you want to use. The kernel line should specify the actual device which would be /dev/hdc6.

Also, what is the content of /boot/grub/device.map? This maps the GRUB hd0/hd1/hd2... etc to physical devices. I *think* it is supposed to follow the boot order of the drives as set in your BIOS.

Below are two example entries for you, whenever you modify the device.map file, re-run: #grub-install /dev/hdc

/boot/grub/menu.lst

Code:

title          Ubuntu, kernel 2.6.17-11-generic
root            (hd0,5)
kernel          /boot/vmlinuz-2.6.17-11-generic root=/dev/hdc6 ro quiet splash
initrd          /boot/initrd.img-2.6.17-11-generic
quiet
savedefault
boot

/boot/grub/device.map

Code:

(fd0)  /dev/fd0
(hd0)  /dev/hdc
(hd1)  /dev/hda

Hope it helps.

Quakeboy02 04-27-2007 08:16 PM

I had a case where I couldn't get grub to work in spite of doing everything right and I just ran Super Grub Disk and let it figure out what was wrong. After using it, I've just decided that I don't want to troubleshoot grub problems by hand anymore.

cber 05-04-2007 05:16 AM

I made a SGD with USBDisk,It doesn't work.Another time i run LiveCD and i use df command to examine the USBDisk.
It seems something wrong(my USBdisk is 128M,but it is only 10M)
and many functions of the fdisk command don't work well.


Quote:

Originally Posted by Quakeboy02
I had a case where I couldn't get grub to work in spite of doing everything right and I just ran Super Grub Disk and let it figure out what was wrong. After using it, I've just decided that I don't want to troubleshoot grub problems by hand anymore.


cber 05-04-2007 05:21 AM

I don't think the hd number is wrong after I have tried something.And the grub-install had said it is ok.
Now I find another amazing phenomenon:When i tried to re-install ubuntu.There is no partition at all.But I can mount some of the partitions and i can see them under windows.


Quote:

Originally Posted by VoidRoamer
Hi cber,

A couple of thoughts for you...

If your root folder is located on partition 6 of hdc then root(hd0,x) should be 5. This parameter specifies the number of partitions BEFORE the one you want to use. The kernel line should specify the actual device which would be /dev/hdc6.

Also, what is the content of /boot/grub/device.map? This maps the GRUB hd0/hd1/hd2... etc to physical devices. I *think* it is supposed to follow the boot order of the drives as set in your BIOS.

Below are two example entries for you, whenever you modify the device.map file, re-run: #grub-install /dev/hdc

/boot/grub/menu.lst

Code:

title          Ubuntu, kernel 2.6.17-11-generic
root            (hd0,5)
kernel          /boot/vmlinuz-2.6.17-11-generic root=/dev/hdc6 ro quiet splash
initrd          /boot/initrd.img-2.6.17-11-generic
quiet
savedefault
boot

/boot/grub/device.map

Code:

(fd0)  /dev/fd0
(hd0)  /dev/hdc
(hd1)  /dev/hda

Hope it helps.



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