LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2009, 08:10 AM   #1
mokku
Member
 
Registered: Feb 2007
Posts: 197

Rep: Reputation: 30
grub file question


HI,

My server is getting to grub prompt. IF i want to boot manually, how do I find what are the linux kernel on box? Is there any grub command?

Please help.
 
Old 02-02-2009, 08:21 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
you can use "find", but it wants the exact filename.

Also try "geometry"---It will at least tell you what the partitions and filesystems are.
 
Old 02-02-2009, 08:29 AM   #3
mokku
Member
 
Registered: Feb 2007
Posts: 197

Original Poster
Rep: Reputation: 30
thats is the problem, I don't knwo the file name. Is there anyway I can boot the system?
 
Old 02-02-2009, 09:26 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,377

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
Do you have any Linux Live CD available? If you do, you can just run the command: ls /boot/ to get the vmlinuz file number.
 
Old 02-02-2009, 09:34 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
If you enter the grub shell, you can use auto-completion to locate the kernel and initrd files.

E.G.
kernel (hd0,[TAB]

This will print out which partitions are present. If you have /boot on its own partition, then you will see the files right away after selecting the correct partition. Do the same thing with the initrd line. "initrd (hd0,[TAB]". When you have the two lines, kernel & initrd, enter "boot" to boot it up. You can instead locate and load your menu.lst file and then enter "boot".

The lines will probably look something like this.

kernel (hd0,0)/boot/vmlinuz-2.6.27.7-9-default
initrd (hd0,0)/initrd-2.6.27.7-9-default
boot
 
Old 02-03-2009, 10:24 PM   #6
mokku
Member
 
Registered: Feb 2007
Posts: 197

Original Poster
Rep: Reputation: 30
Thanks a lot. Yes, I finally manage to go the correct version, but I am getting the following error message. Please help.

grub> kernel (hd0,0)/vmlinuz-2.6.18-92.1.18.el5xen

Error 13: Invalid or unsupported executable format
 
Old 02-04-2009, 01:13 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
I haven't used xen. Do you need to run guest OSes?

If so, I think you want to locate the original menu.lst file and load it. Loading just the host xen kernel may not work. The Xen stanza may look like this, with the guest kernel loaded with the module keyword.

Code:
title Xen
   root (hd0,0)
   kernel /zen-<version>.gz
   module /vmlinuz-2.6.18-92.1.18-default
   module /initrd-2.6.18-92.1.18.img
Above is from a book on Xen. Below is a sample grub entry on my laptop.
Code:
###Don't change this comment - YaST2 identifier: Original name: xen###
title XEN
    root (hd0,5)
    kernel /boot/xen.gz
    module /boot/vmlinuz-2.6.27.7-9-xen root=/dev/disk/by-id/ata-TOSHIBA_MK2049GSY_48CYT01OT-part6    resume=/dev/disk/by-id/ata-TOSHIBA_MK2049GSY_48CYT01OT-part5 splash=silent showopts vga=0x31
If you have a xen.gz or xen-<version>.gz image, you can try entering something like
Code:
root (hd0,0)
kernel /boot/xen.gz
module /boot/vmlinux-2.6.27.7-9-xen root=/dev/hdX
module /boot/initrd-2.6.27.7-9-xen
But this will probably be easier if the partitions haven't changed.
Code:
root (hd0,0)
configfile /boot/grub/menu.lst
boot
If you have a non xen kernel and initrd image, it may be better to boot up to that, because you want to repair things on your normal root filesystem, not from a guest environment that might not have full access to the MBR.

Last edited by jschiwal; 02-05-2009 at 12:04 AM.
 
  


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
/boot/grub/grub.conf file has been deleted on rhel5 diwakars Linux - Newbie 5 12-03-2008 12:21 PM
grub using the wrong grub.conf file Erik99 Linux - Newbie 2 02-20-2008 10:34 PM
GRUB menu.lst/grub.conf file with multiple partitions dasy2k1 Linux - General 1 04-19-2007 09:42 AM
/grub/menu.lst file disappeared but computer still boots (grub) rrrssssss Linux - General 5 04-08-2007 10:02 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:14 AM.

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