Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 !
# 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
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?
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 ......
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?
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 ?
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
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 ?
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 ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.