LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 04-26-2007, 12:28 PM   #1
cber
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Rep: Reputation: 0
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

Last edited by cber; 04-26-2007 at 12:29 PM.
 
Old 04-26-2007, 12:34 PM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
Have you tried just 'grub-install /dev/hdx' (substituting "x" for the letter of your booting hard drive)?
 
Old 04-26-2007, 12:40 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,240

Rep: Reputation: 121Reputation: 121
Get Super Grub Disk and run it.
 
Old 04-27-2007, 08:28 AM   #4
cber
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
I have tried the Grub-intall,it doesn't work too.
 
Old 04-27-2007, 08:05 PM   #5
VoidRoamer
LQ Newbie
 
Registered: Mar 2004
Distribution: Mandrake
Posts: 9

Rep: Reputation: 0
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.
 
Old 04-27-2007, 08:16 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,240

Rep: Reputation: 121Reputation: 121
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.
 
Old 05-04-2007, 05:16 AM   #7
cber
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 05-04-2007, 05:21 AM   #8
cber
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
  


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
If you could change Ubuntu's system defaults Cyran Ubuntu 11 09-28-2006 03:01 PM
Ubuntu's partitioning tool linda Ubuntu 7 08-01-2006 05:00 PM
ubuntu's media player... kriogenic Linux - Newbie 9 02-14-2006 10:33 PM
Ubuntu's rc.local equivalent? Zaulden Ubuntu 3 08-03-2005 04:54 PM
Ubuntu's Not Too Shabby masonm Ubuntu 11 04-14-2005 12:38 AM


All times are GMT -5. The time now is 12:59 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration