Saturday, April 15, 2017

lubuntu - Error: You need to load the kernel first in Grub



I have Lubuntu 11.10 installed on /dev/sda3, and Xubuntu 11.10 on /dev/sda5. A while ago, while being on Lubuntu, I made a mistake somewhere in creating a Live USB: by mistake, I installed a Live USB bootloader into /dev/sda3. This didn't result in any problem at that time.



Today, I updated the kernel. I had to restart Lubuntu. In Grub, Lubuntu suddenly didn't appear anymore, and I booted automatically in Xubuntu. I tried to run update-grub and tried to use grub-customizer to get Lubuntu back in Grub, but this didn't work. I ran os-prober, but it doesn't show me Lubuntu.




Then, I tried to add a new entry to /etc/grub.d/ on /dev/sda5 called 12_lubuntu. It contained the following:



#!/bin/sh -e
echo "Lubuntu"
cat << EOF
menuentry "Lubuntu" {
set root=(hd0,3)
linux /boot/vmlinuz
initrd /boot/initrd.img
}

EOF


After doing that, I ran update-grub and with grub-customizer, I wrote the Grub-configuration to MBR, that is: /dev/sda.



Suddenly, Lubuntu appeared in Grub. I tried to launch it, but when doing this, the following messages appeared:



Error: File not found
Error: You need to load the kernel first



The output of ls -all in /dev/sda3 is as follows:



gijs@Gijs-PC:/media/9c715f68-f083-46ab-9d55-6139556f31d4$ ls -all
totaal 112
drwxr-xr-x 23 root root 4096 2011-11-25 23:35 .
drwxr-xr-x 5 root root 4096 2011-11-26 10:55 ..
drwxr-xr-x 2 root root 4096 2011-11-22 22:17 bin
drwxr-xr-x 4 root root 4096 2011-11-25 23:36 boot
drwxr-xr-x 2 root root 4096 2011-10-15 21:58 cdrom

drwxr-xr-x 5 root root 4096 2011-10-12 18:08 dev
drwxr-xr-x 146 root root 12288 2011-11-25 23:37 etc
drwxr-xr-x 3 root root 4096 2011-10-15 21:59 home
lrwxrwxrwx 1 root root 37 2011-11-25 23:35 initrd.img -> /boot/initrd.img-3.0.0-14-generic-pae
lrwxrwxrwx 1 root root 33 2011-11-25 23:35 initrd.img.old -> /boot/initrd.img-3.0.0-14-generic
drwxr-xr-x 19 root root 4096 2011-11-22 22:17 lib
drwx------ 2 root root 16384 2011-10-15 21:56 lost+found
drwxr-xr-x 5 root root 4096 2011-11-24 20:59 media
drwxr-xr-x 2 root root 4096 2011-10-09 09:29 mnt
drwxr-xr-x 4 root root 4096 2011-11-24 17:15 opt

drwxr-xr-x 2 root root 4096 2011-10-09 09:29 proc
drwx------ 13 root root 4096 2011-11-22 17:19 root
drwxr-xr-x 5 root root 4096 2011-10-15 22:01 run
drwxr-xr-x 2 root root 4096 2011-11-22 22:17 sbin
drwxr-xr-x 2 root root 4096 2011-06-21 20:43 selinux
drwxr-xr-x 2 root root 4096 2011-10-12 18:06 srv
drwxr-xr-x 2 root root 4096 2011-07-14 07:11 sys
drwxrwxrwt 8 root root 4096 2011-11-25 23:37 tmp
drwxr-xr-x 10 root root 4096 2011-10-12 18:06 usr
drwxr-xr-x 13 root root 4096 2011-11-25 23:37 var

lrwxrwxrwx 1 root root 33 2011-11-25 23:35 vmlinuz -> boot/vmlinuz-3.0.0-14-generic-pae
lrwxrwxrwx 1 root root 29 2011-11-25 23:35 vmlinuz.old -> boot/vmlinuz-3.0.0-14-generic


I've also found the old 30_os-prober_proxy in /dev/sda3/etc/grub.d, which should contain the old boot stuff. It is as follows:



#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/os-prober' | /etc/grub.d/bin/grubcfg_proxy "-*
-'Ubuntu, met Linux 3.0.0-12-generic-pae (on /dev/sda3)'

-'Ubuntu, met Linux 3.0.0-12-generic-pae (herstelmodus) (on /dev/sda3)'
+'Ubuntu, met Linux 3.0.0-12-generic (on /dev/sda3)' as 'Xubuntu'
-'Ubuntu, met Linux 3.0.0-12-generic (herstelmodus) (on /dev/sda3)'
+'Windows 7 (loader) (on /dev/sda2)' as 'Windows 7'
"


How can I make Grub start Lubuntu again?



A week ago, I've had the same problem another time, but now I fixed it myself. It turned out that the problem had nothing to do with the LiveUSB-install. What I had to do, was start grub-customizer from Xubuntu, click File, Select Partition, click Next, select Lubuntu's partition, and then click Mount the selected filesystem. I had the option to select submountpoints, but that wasn't necessary. I clicked Apply.




Right now, I had to check all the checkboxes that were available to be sure that I could start Lubuntu from Grub. Then I clicked File, Save, after that, I clicked File, Install to MBR.



I rebooted, and I could boot into Lubuntu again, the problem was solved.



If this doesn't solve your problem, I'd advice you to use the tools that fossfreedom mentions in another answer below.


No comments:

Post a Comment

11.10 - Can&#39;t boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...