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?
Boot-Repair
The majority of grub boot issues can be resolved through using boot-repair - as this community wiki explains, you can install this on a liveCD/USB or directly in a working ubuntu install and it will attempt to find all O/S installs and repair the overall Grub MBR.
Manual Grub2 Installation
If boot-repair fails to work its magic then the traditional manual grub2 installation method described in this community wiki should be investigated.
Search on that web-page for the section Copy LiveCD Files. Replace the example
/dev/sdxy
statements with the partition that you have installed lubuntu in - for example/dev/sda3
If you are unsure which partition you have installed then you can run the Boot-info-script found on SourceForge.
In the results look for partitions types of
ext4
orext3
- these are the common Ubuntu filesystems unless you previously elected to use something likebtrfs
orreiserfs
etc.Kernel reinstallation
If the issue is a corrupt kernel installation then you can investigate reinstalling the kernel from a live CD. This is described in this excellent AskUbuntu Q&A
By installing the kernel correctly, Grub should be able to see the Lubuntu installation correctly.
Remove the second line (the one starting with
echo
). You might also have to add a root-parameter to the kernel, like this:After that run
update-grub
again.You can try using a live cd to boot into the system and then chrooting to the lubuntu system using these commands.
I think this would fix your problem, if you don't want to have lubuntu loader in the MBR you can install grub in /dev/sda3 and then use
update-grub
using xubuntu. That would work.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, clickFile
,Select Partition
, clickNext
, select Lubuntu's partition, and then clickMount the selected filesystem
. I had the option to select submountpoints, but that wasn't necessary. I clickedApply
.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 clickedFile
,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.