Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Linux

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 09-19-2009, 02:40 PM
Eric
Newsgroup Contributor
 
Posts: n/a
grub refresh problem

I was trying to install a 2nd kernel to play with and ran out of space
during the make install operation, thats ok (i removed what got installed
and will add another disk later to play on), but it left my grub boot
loader corrupted. I have 3 items in menu.lst but only 2 ever show up on
my boot menu. I thought to just refresh my grub install, but this turns
out to be a very confusing process. Can anyone give me a simple command
line that will refresh my grub boot loader etc
all my kernels are in /boot, grub is in /boot/grub and i have just the one
disk /dev/sda with /boot on /dev/sda1
(/ home var usr are on separate partitions)

I tried grub-install --root-directory=/boot /dev/sda but it sat there
forever doing nothing - this process cant take more than a few seconds,
tops, can it? Makes me wish for the good old days of lilo again.
I also tried the rescue CD but it cant determine my root - even though the
disk still boots ok.
Thanks
Eric
grub (GNU GRUB 0.97)
mandriva 2009.1 x86_64 system, sata boot drive on /dev/sda

--
Msg to ET:
If you get here and there's no planet -
dont ever build a Large Hadron Collider

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 09-19-2009, 02:40 PM
  #2 (permalink)  
Old 09-19-2009, 03:00 PM
David W. Hodgins
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

On Sat, 19 Sep 2009 17:36:10 -0400, Eric <apophis@ruler.of.the.night.org> wrote:

> I tried grub-install --root-directory=/boot /dev/sda but it sat there


The grub install script should be in /boot/grub/install.sh in the
sata drive.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 09-19-2009, 05:30 PM
Jim Beard
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

Eric wrote:
> I was trying to install a 2nd kernel to play with and ran out of space
> during the make install operation, thats ok (i removed what got installed
> and will add another disk later to play on), but it left my grub boot
> loader corrupted. I have 3 items in menu.lst but only 2 ever show up on
> my boot menu. I thought to just refresh my grub install, but this turns
> out to be a very confusing process. Can anyone give me a simple command
> line that will refresh my grub boot loader etc
> all my kernels are in /boot, grub is in /boot/grub and i have just the one
> disk /dev/sda with /boot on /dev/sda1
> (/ home var usr are on separate partitions)
>
> I tried grub-install --root-directory=/boot /dev/sda but it sat there
> forever doing nothing - this process cant take more than a few seconds,
> tops, can it? Makes me wish for the good old days of lilo again.
> I also tried the rescue CD but it cant determine my root - even though the
> disk still boots ok.
> Thanks
> Eric
> grub (GNU GRUB 0.97)
> mandriva 2009.1 x86_64 system, sata boot drive on /dev/sda
>


Use mcc to go to boot and then to set up boot system. Select
your preferred method. If needed, go to advanced and change
something inconsequential just to get the grub software re-installed.

Alternatively, you can edit /boot/grub/menu.lst by hand. Use an
ASCII editor, not a word processor, note that hd0 is the first
partition of your first disk. An entry should look something
like this:

title desktop 2.6.31-1mnb
kernel (hd0,10)/boot/vmlinuz-2.6.31-desktop-1mnb
BOOT_IMAGE=desktop_2.6.31-1mnb root=LABEL=2010.0 vga=788
initrd (hd0,10)/boot/initrd-2.6.31-desktop-1mnb.img

The first line title can be anything.

The next two lines above are one line. The hd0,10 tells grub to
look on your first disk in the 11th partition. BOOT_IMAGE should
match the filename for the kernel found in /etc/boot. The root=
entry can be a label as here, /dev/sda1 or a UUID identification
for the partition.

Cheers!

jim b.


--
UNIX is not user unfriendly; it merely
expects users to be computer-friendly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 09-19-2009, 05:40 PM
despen@verizon.net
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

Eric <apophis@ruler.of.the.night.org> writes:

> I was trying to install a 2nd kernel to play with and ran out of space
> during the make install operation, thats ok (i removed what got installed
> and will add another disk later to play on), but it left my grub boot
> loader corrupted. I have 3 items in menu.lst but only 2 ever show up on
> my boot menu. I thought to just refresh my grub install, but this turns
> out to be a very confusing process. Can anyone give me a simple command
> line that will refresh my grub boot loader etc
> all my kernels are in /boot, grub is in /boot/grub and i have just the one
> disk /dev/sda with /boot on /dev/sda1
> (/ home var usr are on separate partitions)
>
> I tried grub-install --root-directory=/boot /dev/sda but it sat there
> forever doing nothing - this process cant take more than a few seconds,
> tops, can it? Makes me wish for the good old days of lilo again.


If you don't want grub to take forever, use the --no-floppy argument.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 09-19-2009, 08:50 PM
Eric
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

David W. Hodgins wrote:
> On Sat, 19 Sep 2009 17:36:10 -0400, Eric
> <apophis@ruler.of.the.night.org> wrote:
>
>> I tried grub-install --root-directory=/boot /dev/sda but it sat there

>
> The grub install script should be in /boot/grub/install.sh in the
> sata drive.
>
> Regards, Dave Hodgins
>

I ran that script... it looked like it ran ok, didnt report any errors
but now when i reboot i end up in grub itself.
What do i do now?
I also tried booting from the 2009.1 dvd and what i discovered was that
ext4 isnt recognized, not by "reinstall boot loader" or " mount your
disk partitions under /mnt"
Did i make a mistake in choosing ext4 during my original install?
Seems funny that the 2009.1 CD cant recognize ext4
I'm on my laptop now because i cant boot my linux box
HELP!
Thanks
Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #6 (permalink)  
Old 09-19-2009, 08:50 PM
Eric
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

David W. Hodgins wrote:
> On Sat, 19 Sep 2009 17:36:10 -0400, Eric
> <apophis@ruler.of.the.night.org> wrote:
>
>> I tried grub-install --root-directory=/boot /dev/sda but it sat there

>
> The grub install script should be in /boot/grub/install.sh in the
> sata drive.
>
> Regards, Dave Hodgins
>

I ran that script... it looked like it ran ok, didnt report any errors
but now when i reboot i end up in grub itself.
What do i do now?
I also tried booting from the 2009.1 dvd and what i discovered was that
ext4 isnt recognized, not by "reinstall boot loader" or " mount your
disk partitions under /mnt"
Did i make a mistake in choosing ext4 during my original install?
Seems funny that the 2009.1 CD cant recognize ext4
I'm on my laptop now because i cant boot my linux box
HELP!
Thanks
Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 09-19-2009, 09:00 PM
Eric
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

Eric wrote:
> David W. Hodgins wrote:
>> On Sat, 19 Sep 2009 17:36:10 -0400, Eric
>> <apophis@ruler.of.the.night.org> wrote:
>>
>>> I tried grub-install --root-directory=/boot /dev/sda but it sat there

>>
>> The grub install script should be in /boot/grub/install.sh in the
>> sata drive.
>>
>> Regards, Dave Hodgins
>>

> I ran that script... it looked like it ran ok, didnt report any errors
> but now when i reboot i end up in grub itself.
> What do i do now?
> I also tried booting from the 2009.1 dvd and what i discovered was that
> ext4 isnt recognized, not by "reinstall boot loader" or " mount your
> disk partitions under /mnt"
> Did i make a mistake in choosing ext4 during my original install?
> Seems funny that the 2009.1 CD cant recognize ext4
> I'm on my laptop now because i cant boot my linux box
> HELP!
> Thanks
> Eric

sorry for the double post, thunderbird under windows wants to send
any reply to a post to both the newsgroup and the author, which errors
out making you think it didnt go
Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #8 (permalink)  
Old 09-19-2009, 09:00 PM
Eric
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

Jim Beard wrote:
> Eric wrote:
>> I was trying to install a 2nd kernel to play with and ran out of space
>> during the make install operation, thats ok (i removed what got
>> installed and will add another disk later to play on), but it left my
>> grub boot loader corrupted. I have 3 items in menu.lst but only 2 ever
>> show up on
>> my boot menu. I thought to just refresh my grub install, but this
>> turns out to be a very confusing process. Can anyone give me a simple
>> command line that will refresh my grub boot loader etc all my kernels
>> are in /boot, grub is in /boot/grub and i have just the one disk
>> /dev/sda with /boot on /dev/sda1 (/ home var usr are on separate
>> partitions)
>>
>> I tried grub-install --root-directory=/boot /dev/sda but it sat there
>> forever doing nothing - this process cant take more than a few seconds,
>> tops, can it? Makes me wish for the good old days of lilo again. I
>> also tried the rescue CD but it cant determine my root - even though
>> the disk still boots ok.
>> Thanks
>> Eric
>> grub (GNU GRUB 0.97)
>> mandriva 2009.1 x86_64 system, sata boot drive on /dev/sda
>>

>
> Use mcc to go to boot and then to set up boot system. Select your
> preferred method. If needed, go to advanced and change something
> inconsequential just to get the grub software re-installed.
>
> Alternatively, you can edit /boot/grub/menu.lst by hand. Use an ASCII
> editor, not a word processor, note that hd0 is the first partition of
> your first disk. An entry should look something like this:
>
> title desktop 2.6.31-1mnb
> kernel (hd0,10)/boot/vmlinuz-2.6.31-desktop-1mnb
> BOOT_IMAGE=desktop_2.6.31-1mnb root=LABEL=2010.0 vga=788
> initrd (hd0,10)/boot/initrd-2.6.31-desktop-1mnb.img
>
> The first line title can be anything.
>
> The next two lines above are one line. The hd0,10 tells grub to look on
> your first disk in the 11th partition. BOOT_IMAGE should match the
> filename for the kernel found in /etc/boot. The root= entry can be a
> label as here, /dev/sda1 or a UUID identification for the partition.
>
> Cheers!
>
> jim b.
>
>

I understand how the grub menu list works, but the thing is it had 3
entries and was only showing entry 0 and 2 - so i thought the whole
thing must be buggered - but now i am in a mess as after running
/boot/grub/install.sh i dont get a main menu on bot and end up in grub
shell directly
Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 09-19-2009, 11:50 PM
J.O. Aho
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

Eric wrote:
> I was trying to install a 2nd kernel to play with and ran out of space
> during the make install operation, thats ok (i removed what got installed
> and will add another disk later to play on), but it left my grub boot
> loader corrupted. I have 3 items in menu.lst but only 2 ever show up on
> my boot menu.


Edit your /boot/grub/grub.conf or the symlink /boot/grub/menu.lst and correct
the configuration.

Grub reads the configuration file each time you boot and run the grub, so no
stupid reinstall every time you change configuration.


I thought to just refresh my grub install, but this turns
> out to be a very confusing process. Can anyone give me a simple command
> line that will refresh my grub boot loader etc
> all my kernels are in /boot, grub is in /boot/grub and i have just the one
> disk /dev/sda with /boot on /dev/sda1
> (/ home var usr are on separate partitions)


vi /boot/grub/grub.conf

and fix the syntax error you have.




--

//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 09-20-2009, 06:30 AM
jellybean stonerfish
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

On Sat, 19 Sep 2009 20:55:09 -0700, Eric wrote:


>>

> I understand how the grub menu list works, but the thing is it had 3
> entries and was only showing entry 0 and 2 - so i thought the whole
> thing must be buggered - but now i am in a mess as after running
> /boot/grub/install.sh i dont get a main menu on bot and end up in grub
> shell directly
> Eric


If the grub menu is showing less items than are on your menu.lst file,
then there is a good chance that your grub menu.lst file has errors in
it, or you have another menu.lst file somewhere. Maybe on a different
partition, and grub is reading that.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #11 (permalink)  
Old 09-20-2009, 11:50 AM
David W. Hodgins
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

On Sat, 19 Sep 2009 23:51:14 -0400, Eric <apophis@ruler.of.the.night.org> wrote:

> I also tried booting from the 2009.1 dvd and what i discovered was that
> ext4 isnt recognized, not by "reinstall boot loader" or " mount your
> disk partitions under /mnt"


Boot the dvd, select "Go to console", then run "modprobe ext4". Then
enter "rescue-gui", to go back to the menu. You should then be
able to reinstall the bootloader.

> Seems funny that the 2009.1 CD cant recognize ext4


They forgot to add ext4 to /etc/modprobe.preload on the install dvd.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #12 (permalink)  
Old 09-20-2009, 12:00 PM
Eric
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

David W. Hodgins wrote:

> On Sat, 19 Sep 2009 23:51:14 -0400, Eric <apophis@ruler.of.the.night.org>
> wrote:
>
>> I also tried booting from the 2009.1 dvd and what i discovered was that
>> ext4 isnt recognized, not by "reinstall boot loader" or " mount your
>> disk partitions under /mnt"

>
> Boot the dvd, select "Go to console", then run "modprobe ext4". Then
> enter "rescue-gui", to go back to the menu. You should then be
> able to reinstall the bootloader.
>
>> Seems funny that the 2009.1 CD cant recognize ext4

>
> They forgot to add ext4 to /etc/modprobe.preload on the install dvd.
>
> Regards, Dave Hodgins
>


I have gotten to the point where reinstall boot loader is running by
following your instructions above.
After a minute or 2 it said:
running: sh /boot/grub/intall.sh with root /mnt
< .... some version text displayed here .... >

grub> root (hd0,)
Error 12: Invalid device requested
grub> setup --stage2=/mnt/boot/grub/stage2 --prefix=/grub (hd0,)
Error 12: Invalid device requested
grub> quit
<press enter to return to Resuce menu>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #13 (permalink)  
Old 09-20-2009, 01:10 PM
Bit Twister
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

On Sun, 20 Sep 2009 12:00:38 -0700, Eric wrote:
>
> grub> root (hd0,)
> Error 12: Invalid device requested


remove the comma and try again.

Method I have used have been
grub-install '(hd0)'
grub-install /dev/sda
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #14 (permalink)  
Old 09-20-2009, 01:10 PM
David W. Hodgins
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

On Sun, 20 Sep 2009 15:00:38 -0400, Eric <apophis@ruler.of.the.night.org> wrote:

> grub> root (hd0,)
> Error 12: Invalid device requested
> grub> setup --stage2=/mnt/boot/grub/stage2 --prefix=/grub (hd0,)
> Error 12: Invalid device requested


You're going to have to edit the /mnt/boot/grub/install.sh file.
The only editor available in the rescue system is vi. I always
keep a live cd such as knoppix available for situations like this.

The root paramater for installing grub on the mbr of sda would be
root (hd0)
Note: no comma.

For the setup line, it should have something like
setup --stage2=/boot/grub/stage2 (hd0,13)

hd0,13 corresponds to /dev/sda14.
Grub partition numbers start at zero, with 0 to 3 corresponding to
sda1 to sda4, and 4 to 14 corresponding to sda5 to sda15.

If you have a usb thumb drive, or similar, that you can mount in
the rescue system, copy and post the contents of
/mnt/boot/grub/install.sh
/mnt/boot/grub/menu.lst
/mnt/etc/fstab

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #15 (permalink)  
Old 09-20-2009, 02:20 PM
Eric
Newsgroup Contributor
 
Posts: n/a
Re: grub refresh problem

After much angst, with a rescue DVD, i copied the contents of /boot out to
a backup drive, reformatted the boot partition to ext3, and booted a
separate disk with 2009.1 on it, then i used copied the files back
from backup to /boot and using mcc i got the bootloader properly installed.
However - i still have only 2 items on my main boot menu
Here's /boot/grub/menu.lst whats wrong with it?
Thanks
Eric

timeout 15
color black/cyan yellow/cyan
gfxmenu (hd0,0)/gfxmenu
default 2

title linux-nonfb
kernel (hd0,0)/vmlinuz BOOT_IMAGE=linux-nonfb root=LABEL=/
initrd (hd0,0)/initrd.img

title failsafe
kernel (hd0,0)/vmlinuz BOOT_IMAGE=failsafe root=LABEL=/ failsafe
initrd (hd0,0)/initrd.img

title desktop-2.6.29.6-2mnb
kernel (hd0,0)/vmlinuz-2.6.29.6-desktop-2mnb
BOOT_IMAGE=desktop_2.6.29.6-2mnb root=LABEL=/ vga=788
initrd (hd0,0)/initrd-2.6.29.6-desktop-2mnb.img




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub-install problem KK Linux 5 03-27-2009 04:19 PM
grub-install problem KK Linux 6 03-27-2009 04:17 PM
grub-install problem KK Linux 4 03-27-2009 04:14 PM
Grub Problem GTS Linux 12 11-22-2007 01:40 AM
[Problem]: GRUB + openSUSE 10.2 + Windows XP + sil3112a Lx Linux 4 05-06-2007 12:34 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 11:59 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0