6

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?

8
  • 1
    You should be aware that you can have LXDE and Xfce installed at the same time in the same Ubuntu installation, combining all the functionality of LXDE and Xfce for a lower total amount of used space (and far greater convenience in switching between them). To get fully-functional LXDE on an existing Ubuntu (or Xubuntu) system, install the lubuntu-desktop package. To get fully-functional Xfce on an existing Ubuntu (or Lubuntu) system, install the xubuntu-desktop package. Nov 26, 2011 at 0:26
  • Thank you, but that is not what I'm looking for. Nov 26, 2011 at 9:49
  • @Exeleration-G - maybe I'm asking the obvious and I'm sure you've already tried this - but have you run the boot-repair process as per this community wiki? help.ubuntu.com/community/Boot-Repair
    – fossfreedom
    Nov 28, 2011 at 14:33
  • Can you please post the output of the boot_info_script? bootinfoscript.sourceforge.net
    – arrange
    Nov 28, 2011 at 14:33
  • I've put the output of the boot_info_script here, because it would mess up the layout if I'd just paste it in the question. text-upload.com/read.php?id=205317&c=5351130 Nov 28, 2011 at 14:55

4 Answers 4

3
+100

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 or ext3 - these are the common Ubuntu filesystems unless you previously elected to use something like btrfs or reiserfs 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.

1
0

Remove the second line (the one starting with echo). You might also have to add a root-parameter to the kernel, like this:

linux /boot/vmlinuz root=/dev/sda3

After that run update-grub again.

1
  • Thanks for your help. However, this did not help. I still get the following messages: Error: File not found Error: You need to load the kernel first. I've updated the question to show the output of ls -all in /dev/sda3. Hope that this helps you to help me ;-) Nov 26, 2011 at 9:57
0

You can try using a live cd to boot into the system and then chrooting to the lubuntu system using these commands.

sudo mkdir /mnt/abc
sudo mount /dev/sda3 /mnt/abc
sudo mount ‐‐bind /dev /mnt/abc/dev
sudo mount ‐‐bind /proc /mnt/abc/proc
sudo mount ‐‐bind /sys /mnt/abc/sys
sudo chroot /mnt/abc
sudo grub-install /dev/sda

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.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .