LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel must be loaded before booting (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-must-be-loaded-before-booting-4175427664/)

danndp 09-17-2012 12:09 PM

Kernel must be loaded before booting
 
Hi, i'm having problems with my server, after rebooting, it goes directly to the GRUB, if i type boot i get:

Error 8: Kernel must be loaded before booting

I also have tried:

grud> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83

grup> setup (hd0)
Checking if "/boot/grub/stage1" exists...no
Checking if "/grub/stage1" exists...no

Error 15: File not Found

What can i do? all the commands fail...

Thanks

nileshgr 09-17-2012 01:23 PM

If you have a separate boot partition, enter the following commands:

Code:

root (hd0, 0)
kernel /vmlinuz<tab> root=<root device> [<any other options>]
initrd /initrd<tab>
boot

If you don't have a separate boot partition, just prepend /boot to the above paths, i.e. /boot/vmlinuz and /boot/initrd.

Also, it seems your grub installation has gone kaput. Use the code I posted above to manually boot into your machine and then run grub-install to reinstall grub properly.

danndp 09-25-2012 04:06 AM

Quote:

Originally Posted by nileshgr (Post 4782526)
If you have a separate boot partition, enter the following commands:

Code:

root (hd0, 0)
kernel /vmlinuz<tab> root=<root device> [<any other options>]
initrd /initrd<tab>
boot

If you don't have a separate boot partition, just prepend /boot to the above paths, i.e. /boot/vmlinuz and /boot/initrd.

Also, it seems your grub installation has gone kaput. Use the code I posted above to manually boot into your machine and then run grub-install to reinstall grub properly.

No look :(

Trying to execute

Code:

kernel /vmlinuz<tab> root=<root device> [<any other options>]
Responds with Error 15, File not Found

Even prepending /boot, it's the same behavior...

pixellany 09-25-2012 04:28 AM

I'm assuming that everything was once working.

What happened (or what was changed) before this problem appeared?

Regardless, you can boot up from a Linux live CD, mount the server's hard drive, and look for the /boot directory---check there for the kernel and initrd files.

also tell us what the hardware is and what version of Linux.

nileshgr 09-26-2012 07:53 AM

Quote:

Originally Posted by pixellany (Post 4788694)
I'm assuming that everything was once working.

What happened (or what was changed) before this problem appeared?

Regardless, you can boot up from a Linux live CD, mount the server's hard drive, and look for the /boot directory---check there for the kernel and initrd files.

also tell us what the hardware is and what version of Linux.

@OP, follow this. It seems something misplaced your kernel and the only way to fix now is login using live cd/usb, chroot to your distro's partition:

Code:

# mount /dev/foo /mnt/yourdistro
# mount /dev/foo1 /mnt/yourdistro/boot <---- Note, this step is not required if you don't have a separate boot partition.
# mount --bind /dev /mnt/yourdistro/dev
# mount --bind /sys /mnt/yourdistro/sys
# mount --bind /proc /mnt/yourdistro/proc
# chroot /mnt/yourdistro

Once you do that, you will have access to your system.

Depending on your distro, use the relevant package manager command to reinstall kernel; may be using yum/apt/emerge/whatever.


All times are GMT -5. The time now is 09:21 PM.