When booting Ubuntu 11.0.4, error: you need to load the kernel first

Asked by Hari Rawulwar

I have Ubuntu 11.0.4 installed on Windows 7 Sony laptop.

When booting Ubuntu 11.0.4, GNU Grub loader 1.99 displays the following options.
Ubuntu, Linux 2.6.38-11-generic
Ubuntu, Linux 2.6.38-11-generic (Recovery mode)
Windows 7 (Recovery mode) on /dev/sda1
Windows 7 on /dev/sda2

When I select the first option, the following messages are displayed.
error: file not found
error: you need to load the kernel first

Press any key to continue ...

When I press any key, again the above Grub loader options are displayed.
Now, when I select the first option, I'm succesfully logged in.

I fail to understand why I get this error, and when I try again, it logs me in.

To give more background, I installed Ubuntu 10.0.4 LTS before and later uninstalled it.
So, the Grub loader also had options for Linux 2.6.38-8 also.
I used to get the same error. I thought, this is due to old kernel entries for the old version.
I had to go through Synaptic Package manager and remove the entries for 2.6.38-8
Now, the Grub loader is clean showing only the required options, but I get this error.

Please help.

Question information

Language:
English Edit question
Status:
Solved
For:
Wubi Edit question
Assignee:
No assignee Edit question
Solved by:
Hari Rawulwar
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Boot to the liveCD and reinstate Grub2, may help

Revision history for this message
Hari Rawulwar (hari-rawulwar) said :
#2

I do not have a LiveCD. I installed Ubunti using Wubi installer.
Before installation, I created a separate partition (D) in Windows and used this partition for Ubuntu.
Is there another way to reinstall Grub2?

Revision history for this message
bcbc (bcbc) said :
#3

Ctrl+Alt+T to get to a terminal
sudo update-grub

If that doesn't resolve it, please http://pastebin.ubuntu.com the results of http://bootinfoscript.sourceforge.net/

Revision history for this message
Hari Rawulwar (hari-rawulwar) said :
#4

I updated the sudu using
sudo update-grub

I restarted without any errors.
However, I remember I did this in the past and after few restarts, got the same error.
Let me boot Windows and Ubuntu alternatively and see if the error still persists.
I will keep this question open for couple of days, just to make sure the error does not come.

Revision history for this message
bcbc (bcbc) said :
#5

There are some strange cases where the computer bios sees it's partitions differently. e.g. /dev/sda (first hard drive) becomes /dev/sdb

If you have the problem again, please pastebin the file /boot/grub/grub.cfg as well as the file /etc/default/grub

Thanks

Revision history for this message
Hari Rawulwar (hari-rawulwar) said :
#6

I got the same error again today.
I have pastebin the results at
http://pastebin.ubuntu.com/677656/

I'm also pasting here.

                  Boot Info Script 0.60 from 17 May 2011

============================= Boot Info Summary: ===============================

 => Windows is installed in the MBR of /dev/sda.

sda1: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Windows Vista/7
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files: /bootmgr /boot/bcd

sda2: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Windows Vista/7
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System:
    Boot files: /bootmgr /Boot/BCD

sda3: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Windows Vista/7
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System: Windows 7
    Boot files: /Windows/System32/winload.exe /wubildr /wubildr.mbr

sda4: __________________________________________________________________________

    File system: Extended Partition
    Boot sector type: -
    Boot sector info:

sda5: __________________________________________________________________________

    File system: vfat
    Boot sector type: Unknown
    Boot sector info: According to the info in the boot sector, sda5 starts
                       at sector 2048. But according to the info from fdisk,
                       sda5 starts at sector 1185251328. "63" and "2048" are
                       quite common values for the starting sector of a
                       logical partition and they only need to be fixed when
                       you want to boot Windows from a logical partition.
    Operating System:
    Boot files: /ubuntu/winboot/wubildr /ubuntu/winboot/wubildr.mbr
                       /ubuntu/disks/root.disk /ubuntu/disks/home.disk
                       /ubuntu/disks/swap.disk

sda5/Wubi: _____________________________________________________________________

    File system: ext4
    Boot sector type: -
    Boot sector info:
    Operating System: Ubuntu 11.04
    Boot files: /boot/grub/grub.cfg /etc/fstab

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 2,048 22,386,687 22,384,640 27 Hidden NTFS (Recovery Environment)
/dev/sda2 * 22,386,688 22,591,487 204,800 7 NTFS / exFAT / HPFS
/dev/sda3 22,591,488 1,185,247,919 1,162,656,432 7 NTFS / exFAT / HPFS
/dev/sda4 1,185,249,280 1,250,260,991 65,011,712 f W95 Extended (LBA)
/dev/sda5 1,185,251,328 1,250,260,991 65,009,664 b W95 FAT32

"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/loop0 1978bc1a-1f7d-4a33-8807-1911405aefaa ext4
/dev/loop1 967db097-d4f7-4d69-a96a-648be77a53ae ext4
/dev/loop2 da97348d-dc2b-4edc-b333-b825052b2f2c ext4
/dev/sda1 42A21AB9A21AB201 ntfs Recovery
/dev/sda2 DEC4167AC41654DD ntfs System Reserved
/dev/sda3 D4C217CFC217B528 ntfs
/dev/sda5 40CA-EABB vfat UBUNTU

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/loop0 / ext4 (rw,errors=remount-ro,commit=600)
/dev/loop1 /home ext4 (rw,commit=600)
/dev/loop2 /usr ext4 (rw,commit=600)
/dev/sda5 /host vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

======================== sda5/Wubi/boot/grub/grub.cfg: =========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
true
}

insmod part_msdos
insmod fat
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 40ca-eabb
loopback loop0 /ubuntu/disks/usr.disk
set root=(loop0)
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.38-11-generic" {
 insmod part_msdos
 insmod fat
 set root='(/dev/sda,msdos5)'
 search --no-floppy --fs-uuid --set=root 40ca-eabb
 loopback loop0 /ubuntu/disks/root.disk
 set root=(loop0)
 linux /boot/vmlinuz-2.6.38-11-generic root=/dev/sda5 loop=/ubuntu/disks/root.disk ro quiet splash
 initrd /boot/initrd.img-2.6.38-11-generic
}
menuentry "Ubuntu, Linux 2.6.38-11-generic (recovery mode)" {
 insmod part_msdos
 insmod fat
 set root='(/dev/sda,msdos5)'
 search --no-floppy --fs-uuid --set=root 40ca-eabb
 loopback loop0 /ubuntu/disks/root.disk
 set root=(loop0)
 linux /boot/vmlinuz-2.6.38-11-generic root=/dev/sda5 loop=/ubuntu/disks/root.disk ro single
 initrd /boot/initrd.img-2.6.38-11-generic
}
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda1)" --class windows --class os {
 insmod part_msdos
 insmod ntfs
 set root='(/dev/sda,msdos1)'
 search --no-floppy --fs-uuid --set=root 42A21AB9A21AB201
 drivemap -s (hd0) ${root}
 chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" --class windows --class os {
 insmod part_msdos
 insmod ntfs
 set root='(/dev/sda,msdos2)'
 search --no-floppy --fs-uuid --set=root DEC4167AC41654DD
 chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

============================= sda5/Wubi/etc/fstab: =============================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/host/ubuntu/disks/root.disk / ext4 loop,errors=remount-ro 0 1
/host/ubuntu/disks/home.disk /home ext4 loop 0 2
/host/ubuntu/disks/usr.disk /usr ext4 loop 0 2
/host/ubuntu/disks/swap.disk none swap loop,sw 0 0
--------------------------------------------------------------------------------

================= sda5/Wubi: Location of files loaded by Grub: =================

           GiB - GB File Fragment(s)

   0.166339874 = 0.178606080 boot/grub/grub.cfg 1
   1.023380280 = 1.098846208 boot/initrd.img-2.6.38-11-generic 2
   0.922187805 = 0.990191616 boot/vmlinuz-2.6.38-11-generic 1
   1.023380280 = 1.098846208 initrd.img 2
   0.922187805 = 0.990191616 vmlinuz 1

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda5

00000000 eb 58 90 4d 53 44 4f 53 35 2e 30 00 02 20 10 04 |.X.MSDOS5.0.. ..|
00000010 02 00 00 00 00 f8 00 00 3f 00 ff 00 00 08 00 00 |........?.......|
00000020 00 f8 df 03 f8 3d 00 00 00 00 00 00 02 00 00 00 |.....=..........|
00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 80 00 29 bb ea ca 40 4e 4f 20 4e 41 4d 45 20 20 |..)...@NO NAME |
00000050 20 20 46 41 54 33 32 20 20 20 33 c9 8e d1 bc f4 | FAT32 3.....|
00000060 7b 8e c1 8e d9 bd 00 7c 88 4e 02 8a 56 40 b4 41 |{......|.N..V@.A|
00000070 bb aa 55 cd 13 72 10 81 fb 55 aa 75 0a f6 c1 01 |..U..r...U.u....|
00000080 74 05 fe 46 02 eb 2d 8a 56 40 b4 08 cd 13 73 05 |t..F..-.V@....s.|
00000090 b9 ff ff 8a f1 66 0f b6 c6 40 66 0f b6 d1 80 e2 |.....f...@f.....|
000000a0 3f f7 e2 86 cd c0 ed 06 41 66 0f b7 c9 66 f7 e1 |?.......Af...f..|
000000b0 66 89 46 f8 83 7e 16 00 75 38 83 7e 2a 00 77 32 |f.F..~..u8.~*.w2|
000000c0 66 8b 46 1c 66 83 c0 0c bb 00 80 b9 01 00 e8 2b |f.F.f..........+|
000000d0 00 e9 2c 03 a0 fa 7d b4 7d 8b f0 ac 84 c0 74 17 |..,...}.}.....t.|
000000e0 3c ff 74 09 b4 0e bb 07 00 cd 10 eb ee a0 fb 7d |<.t............}|
000000f0 eb e5 a0 f9 7d eb e0 98 cd 16 cd 19 66 60 80 7e |....}.......f`.~|
00000100 02 00 0f 84 20 00 66 6a 00 66 50 06 53 66 68 10 |.... .fj.fP.Sfh.|
00000110 00 01 00 b4 42 8a 56 40 8b f4 cd 13 66 58 66 58 |....B.V@....fXfX|
00000120 66 58 66 58 eb 33 66 3b 46 f8 72 03 f9 eb 2a 66 |fXfX.3f;F.r...*f|
00000130 33 d2 66 0f b7 4e 18 66 f7 f1 fe c2 8a ca 66 8b |3.f..N.f......f.|
00000140 d0 66 c1 ea 10 f7 76 1a 86 d6 8a 56 40 8a e8 c0 |.f....v....V@...|
00000150 e4 06 0a cc b8 01 02 cd 13 66 61 0f 82 75 ff 81 |.........fa..u..|
00000160 c3 00 02 66 40 49 75 94 c3 42 4f 4f 54 4d 47 52 |...<email address hidden>|
00000170 20 20 20 20 00 00 00 00 00 00 00 00 00 00 00 00 | ............|
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 0d 0a 52 65 |..............Re|
000001b0 6d 6f 76 65 20 64 69 73 6b 73 20 6f 72 20 6f 74 |move disks or ot|
000001c0 68 65 72 20 6d 65 64 69 61 2e ff 0d 0a 44 69 73 |her media....Dis|
000001d0 6b 20 65 72 72 6f 72 ff 0d 0a 50 72 65 73 73 20 |k error...Press |
000001e0 61 6e 79 20 6b 65 79 20 74 6f 20 72 65 73 74 61 |any key to resta|
000001f0 72 74 0d 0a 00 00 00 00 00 ac cb d8 00 00 55 aa |rt............U.|
00000200

========= Devices which don't seem to have a corresponding hard drive: =========

sdb sdc

Revision history for this message
bcbc (bcbc) said :
#7

I can't see anything wrong in the bootinfoscript, but suspect that it's due to the fact that you have 3 virtual disks (because you installed on a VFAT partition that limits the file size to 4GB max - and Wubi therefore splits the install into 3 separate virtual disks if you ask for more than 8GB).

So... as I was saying I suspect that it's the fact that it has to set root to the usr.disk and then when it tries to load modules (from /boot which is in the root.disk) it has an issue - but this is me making it up as I go along.
I can tell you for sure it has nothing to do with your previous 10.04 install - there is nothing leftover from that - when you uninstall Wubi it deletes the virtual disk and nothing remains to be carried over to a new install.

So my advice is... if it bothers you (as it seems to boot okay) - you can reformat the VFAT partition to NTFS - and then you can install Wubi as a single virtual disk for up to 30GB. OR, if you are only using that partition for Ubuntu, just install directly to it (not with Wubi (in which case /dev/sda5 will be converted to an ext4 partition).

That's basically all I can suggest. I will try to duplicate the problem and file a bug if it turns out to be a problem with the separate virtual disks (or you can go ahead and file a bug yourself) - but there is nothing I can see to explain the problem just by reviewing the bootinfoscript - and probably a grub developer could confirm or refute my theory.

Revision history for this message
Hari Rawulwar (hari-rawulwar) said :
#8

I uninstalled Ubuntu, deleted the FAT partition and recreated as NTFS.
This seems to have solved the problem.
Not sure what it has to do with the partition type created in Windows.
Thanks for the advice.