LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-05-2011, 02:06 AM   #1
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Rep: Reputation: 0
grub error : no loaded kernel


hello there . I am trying to install Debian lenny and ext2 filesystem with GRUB as bootloader in my USB memory stick to boot linux . However , when i try it out on my PC , a grub error : No loaded kernel is shown .

I have checked that the kernel image is located in /boot . Could somebody suggest how I can solve this problem ? Thanks !
 
Old 04-05-2011, 03:00 AM   #2
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
as a start, can you post the content of your grub.conf file
 
Old 04-05-2011, 03:24 AM   #3
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Hi . Here is my menu.lst :

Code:
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-legacy-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/ram rw ip=frommedia quickreboot livemount=/ showmounts

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(single-user) single
# altoptions=(single-user mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Debian GNU/Linux, kernel 2.6.26-2-486
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.26-2-486 root=/dev/ram rw ip=frommedia quickreboot livemount=/ showmounts 
initrd		/boot/initrd.img-2.6.26-2-486

title		Debian GNU/Linux, kernel 2.6.26-2-486 (single-user mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.26-2-486 root=/dev/ram rw ip=frommedia quickreboot livemount=/ showmounts single
initrd		/boot/initrd.img-2.6.26-2-486

### END DEBIAN AUTOMAGIC KERNELS LIST
 
Old 04-05-2011, 03:53 AM   #4
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240

Rep: Reputation: 14
post the output of
kernel /boot/(name of kernel image or vmlinuz whatever you have in your /boot file.
 
Old 04-05-2011, 10:43 AM   #5
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by NM04 View Post
post the output of
kernel /boot/(name of kernel image or vmlinuz whatever you have in your /boot file.
In the grub prompt , it shows unknown command 'kernel' . Any ideas ?
 
Old 04-05-2011, 02:45 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,533

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Quote:
In the grub prompt , it shows unknown command 'kernel'
I believe what NM04 meant was for you to navigate to your /boot directory to check that you actually have a file named vmlinuz-2.6.26-2-486.

I'm not really clear on what the problem is. Have you installed Debian to your USB and are not able to boot it? What method did you use to install to the USB? Or are you trying to use your USB to boot an installed system on your main drive?
 
Old 04-05-2011, 08:46 PM   #7
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
I believe what NM04 meant was for you to navigate to your /boot directory to check that you actually have a file named vmlinuz-2.6.26-2-486.

I'm not really clear on what the problem is. Have you installed Debian to your USB and are not able to boot it? What method did you use to install to the USB? Or are you trying to use your USB to boot an installed system on your main drive?
Hi . I have checked that the file "vmlinuz-2.6.26-2-486" is actually in the /boot directory . To clearify the problem , I referred to the page http://wiki.flimzy.com/index.php/Ins...B#Install_GRUB and try to install Debian lenny in the USB memory stick (Not debian installer but an entire linux system) . However , I got stuck in the grub prompt and not able to do further booting ......
 
Old 04-05-2011, 09:34 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,533

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
I have no experience with Debian but you might try from the grub prompt: geometry (hd0) hit the enter key for output and repeating the command by an increment of 1 for all the hard drives you have. Post the output here. You are able to boot the computer? Is it a Desktop? laptop? What other operating system(s) do you have? You have the USB set to first boot priority in the BIOS?
 
Old 04-05-2011, 11:54 PM   #9
linux_biao
LQ Newbie
 
Registered: Apr 2011
Posts: 22

Rep: Reputation: 0
o I 'm reading !
 
Old 04-06-2011, 12:04 AM   #10
eyeoncompuers
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
You may need to load a recovery CD and write the grub onto the master boot record so it is found at boot time.
 
Old 04-06-2011, 01:37 AM   #11
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240

Rep: Reputation: 14
blink,
you will help us to help you, if you reply to post #8 by yancek.
 
Old 04-06-2011, 06:43 AM   #12
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
I have no experience with Debian but you might try from the grub prompt: geometry (hd0) hit the enter key for output and repeating the command by an increment of 1 for all the hard drives you have. Post the output here. You are able to boot the computer? Is it a Desktop? laptop? What other operating system(s) do you have? You have the USB set to first boot priority in the BIOS?
In grub prompt , I can't use "geometry" coz it shows unknown command . However , I can use "ls -al" to show all devices and partition tables :
Code:
grub> ls -al
Device hd0: Partition table
        Partition hd0,msdos1: Filesystem type ext2 - Last modification time
2011-04-06 02:00:00 Wednesday, UUID 6ea82cd2-f86a-4a86-8321-b8ea189cc005
Device hd1: Partition table
        Partition hd1,msdos2: Filesystem type ntfs - Label "?????", UUID 4a08dffa08dfe34d
        Partition hd1,msdos1: Filesystem type ntfs, UUID ba8cd6b38cd66a01
and I can use "ls /" to show content in my root directory and i can find vmlinuz-2.6.26-2-486 located in /boot by the command "ls /boot" . Any ideas ?
 
Old 04-06-2011, 07:04 AM   #13
ifranklin
Member
 
Registered: May 2010
Location: New Jersey, USA
Distribution: Ubuntu
Posts: 66

Rep: Reputation: 4
if you want to boot from the grub boot loader, you'll have to use a recovery cd in order to recover grub because it looks like it was overwritten during the installation, i suggest you try out the following, it applies in Debian, so you shouldn't have a problem with it:

boot the pc using the debian recovery cd, choose to try the type of debian software, not to install, after that it will boot and take you to the debian platform you installed, then you can type the follwing commands in the terminal;

3. Open the GRUB Command-line utility by typing

sudo grub

4. Find where Grub is. If this gives a few different answers then you will need to find the correct one, perhaps by trial-and-error.

find /boot/grub/stage1

5. Tell GRUB which partition to tell the MBR your Grub is on by entering

root (hdA,B)

The coordinates A,B are where 'A' is the hard-drive number, starting at 0, and 'B' is the partition number, starting at 0. For example, if Ubuntu was installed on the second partition of the first hard-drive, the command should be

root (hd0,1)

6. Tell GRUB which drive's MBR to fix

setup (hd0)

Replace 0 only in the extremely unlikely event that your bios does not use the first hard-drive as the boot device. Typically Ubuntu might be on any drive but the bios will almost always go to the first drive's MBR to find out where to find the boot-loader.

7. Leave the GRUB Command line

quit

and reboot.

i hope this helps, av used ubuntu as the basis of explanation because ubuntu is based on debian

Last edited by ifranklin; 04-06-2011 at 07:05 AM.
 
Old 04-06-2011, 07:25 AM   #14
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240

Rep: Reputation: 14
blink,

1) have you installed the grub on your USB? if yes, the o/p you pasted in post #3 is it of your system's grub file or the one on the USB.

2)Do you know how your system is recognizing the USB ? In my system it is something like this /dev/sda2. In your post #3 grub is searching root in /dev/ram, make sure that it is the correct place.

3) Making a USB bootable requires not only grub but also the filesystem and the kernel. Have you followed the same procedure for making a USB bootable which you have linked in post #7 ?

4) configure your BIOS to boot from USB.

Regards,
NM04
 
Old 04-06-2011, 08:57 AM   #15
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by NM04 View Post
blink,

1) have you installed the grub on your USB? if yes, the o/p you pasted in post #3 is it of your system's grub file or the one on the USB.

Yes . I have installed the grub on my USB and the output in post #3 is the menu.lst file on the USB .

2)Do you know how your system is recognizing the USB ? In my system it is something like this /dev/sda2. In your post #3 grub is searching root in /dev/ram, make sure that it is the correct place.

In my system , my USB device is recognized as /dev/sdb and I have format it with one partition so I guess the root is in /dev/sdb1 but it still doesn't work =[

3) Making a USB bootable requires not only grub but also the filesystem and the kernel. Have you followed the same procedure for making a USB bootable which you have linked in post #7 ?

I am sure I have installed the kernel and filesystem on my USB's partition .

4) configure your BIOS to boot from USB.
Yes . I am booting from USB . Otherwise , I won't get into grub prompt .

Regards,
NM04
To add a few , the following is what I have got so far :

Code:
root@debian:/# mount /dev/sdb1 /mnt/chroot
root@debian:/# mount --bind /dev /mnt/chroot/dev
root@debian:/# chroot /mnt/chroot
debian:/# update-grub
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.26-2-486
Updating /boot/grub/menu.lst ... done

debian:/# grub
Probing devices to guess BIOS drives. This may take a long time.
in grub prompt :
Code:
[1;25r[0;10m[4l[?7h[H[J[2;5HGNU GRUB  version 0.97  (640K lower / 3072K upper memory)[4;8H[ Minimal BASH-like line editing is supported.   For[5;10Hthe   first   word,  TAB  lists  possible  command[6;10Hcompletions.  Anywhere else TAB lists the possible[7;10Hcompletions of a device/filename. ]

grub> geometry (hd1,0)
drive 0x81: C/H/S = 0/248/62, The number of sectors = 15687680, /dev/sdb 
Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd1,0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 15: File not found
grub> quit
It seems like I've missed the files "/boot/grub/stage1" and "/grub/stage1" . How can I include those files ?

Last edited by blink182; 04-06-2011 at 08:59 AM.
 
  


Reply



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
Error 19 linux kernel must be loaded before initrd Cant get it to work Linux - Newbie 1 04-01-2011 11:48 AM
Getting error 19: linux kernel must be loaded before initrd mdnchauhan Linux - Newbie 1 05-07-2010 07:33 AM
Error 19 linux kernel must be loaded before initrd mdnchauhan Linux - General 4 05-06-2010 07:23 AM
GRUB Error 15, Linux already loaded rick_amd Linux - Newbie 7 03-02-2008 02:06 AM
Booting Grub once kernel is loaded. American Psycho Linux - Newbie 2 04-02-2004 11:56 PM

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

All times are GMT -5. The time now is 02:53 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
Open Source Consulting | Domain Registration