• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Linux newbie, having trouble with grub

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

lemings

Member
Joined
Oct 10, 2005
Location
Texas
I bought a Lenovo x120e the other day and figured I'd give linux a try on it. I've never really used linux before but wanted to start learning.

I chose Ubuntu 11.10 as the distro, as others have stated that they had success running it on the x120e. However, since the install I can't get it to boot and instead it comes up with Grub Recovery.

I'm not really sure where the proceed from here but here is what I got from a boot script that I ran.

Code:
               Boot Info Script 0.60    from 17 May 2011


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

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for  on this drive.

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 /boot/grub/core.img

sda2: __________________________________________________________________________

    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:        /bootmgr /Boot/BCD /Windows/System32/winload.exe

sda3: __________________________________________________________________________

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

sda4: __________________________________________________________________________

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

sda5: __________________________________________________________________________

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

sda6: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sdb: ___________________________________________________________________________

    File system:       vfat
    Boot sector type:  SYSLINUX 4.04 2011-04-18
    Boot sector info:   Syslinux looks at sector 305162 of /dev/sdb for its 
                       second stage. SYSLINUX is installed in the  directory. 
                       The integrity check of the ADV area failed. No errors 
                       found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /syslinux/syslinux.cfg /ldlinux.sys

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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     2,459,647     2,457,600   7 NTFS / exFAT / HPFS
/dev/sda2           2,459,648   395,680,936   393,221,289   7 NTFS / exFAT / HPFS
/dev/sda3         604,659,712   625,139,711    20,480,000   7 NTFS / exFAT / HPFS
/dev/sda4         395,681,790   604,659,711   208,977,922   5 Extended
/dev/sda5         395,681,792   597,106,687   201,424,896  83 Linux
/dev/sda6         597,108,736   604,659,711     7,550,976  82 Linux swap / Solaris


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/loop0                                              squashfs   
/dev/sda1        C25E03A35E038EFB                       ntfs       SYSTEM_DRV
/dev/sda2        86D80614D8060363                       ntfs       Windows7_OS
/dev/sda3        26D8099ED8096CFD                       ntfs       Lenovo_Recovery
/dev/sda5        1483cb05-d371-46ef-a669-5cc55a9c26e1   ext4       
/dev/sda6        37ad8692-8e0c-4175-8a37-80f9dd58306e   swap       
/dev/sdb         12E5-1D2E                              vfat       PENDRIVE

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

Device           Mount_Point              Type       Options

/dev/loop0       /rofs                    squashfs   (ro,noatime)
/dev/sdb         /cdrom                   vfat       (ro,noatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)


=================== sda1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

            ?? = ??             boot/grub/core.img                             1

=========================== sda5/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 {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 1483cb05-d371-46ef-a669-5cc55a9c26e1
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos5)'
  search --no-floppy --fs-uuid --set=root 1483cb05-d371-46ef-a669-5cc55a9c26e1
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
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 ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 1483cb05-d371-46ef-a669-5cc55a9c26e1
    linux    /boot/vmlinuz-3.0.0-12-generic root=UUID=1483cb05-d371-46ef-a669-5cc55a9c26e1 ro   quiet splash vt.handoff=7
    initrd    /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 1483cb05-d371-46ef-a669-5cc55a9c26e1
    echo    'Loading Linux 3.0.0-12-generic ...'
    linux    /boot/vmlinuz-3.0.0-12-generic root=UUID=1483cb05-d371-46ef-a669-5cc55a9c26e1 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 1483cb05-d371-46ef-a669-5cc55a9c26e1
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 1483cb05-d371-46ef-a669-5cc55a9c26e1
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root C25E03A35E038EFB
    chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos2)'
    search --no-floppy --fs-uuid --set=root 86D80614D8060363
    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/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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
# / was on /dev/sda5 during installation
UUID=1483cb05-d371-46ef-a669-5cc55a9c26e1 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=37ad8692-8e0c-4175-8a37-80f9dd58306e none            swap    sw              0       0
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)

               =                boot/grub/grub.cfg                             1
               =                boot/initrd.img-3.0.0-12-generic               2
               =                boot/vmlinuz-3.0.0-12-generic                  1
               =                initrd.img                                     2
               =                vmlinuz                                        1

=========================== sdb/boot/grub/grub.cfg: ============================

--------------------------------------------------------------------------------

if loadfont /boot/grub/font.pf2 ; then
    set gfxmode=auto
    insmod efi_gop
    insmod efi_uga
    insmod gfxterm
    terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "Try Ubuntu without installing" {
    set gfxpayload=keep
    linux    /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
    initrd    /casper/initrd.lz
}
menuentry "Install Ubuntu" {
    set gfxpayload=keep
    linux    /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash --
    initrd    /casper/initrd.lz
}
menuentry "Check disc for defects" {
    set gfxpayload=keep
    linux    /casper/vmlinuz  boot=casper integrity-check quiet splash --
    initrd    /casper/initrd.lz
}
--------------------------------------------------------------------------------

========================== sdb/syslinux/syslinux.cfg: ==========================

--------------------------------------------------------------------------------
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50

# If you would like to use the new menu and be presented with the option to install or run from USB at startup, remove # from the following line. This line was commented out (by request of many) to allow the old menu to be presented and to enable booting straight into the Live Environment! 
# ui gfxboot bootlogo
--------------------------------------------------------------------------------

==================== sdb: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

            ?? = ??             boot/grub/grub.cfg                             1

================== sdb: Location of files loaded by Syslinux: ==================

           GiB - GB             File                                 Fragment(s)

            ?? = ??             ldlinux.sys                                    1
            ?? = ??             syslinux/chain.c32                             1
            ?? = ??             syslinux/gfxboot.c32                           1
            ?? = ??             syslinux/syslinux.cfg                          1
            ?? = ??             syslinux/vesamenu.c32                          1

=============== sdb: Version of COM32(R) files used by Syslinux: ===============

 syslinux/chain.c32                 :  COM32R module (v4.xx)
 syslinux/gfxboot.c32               :  COM32R module (v4.xx)
 syslinux/vesamenu.c32              :  COM32R module (v4.xx)

=============================== StdErr Messages: ===============================

unlzma: Decoder error
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
/home/ubuntu/Desktop/boot_info_script060/boot_info_script.sh: line 1579: [: 2.73495e+09: integer expression expected

Any ideas?
 
I'm not too worried about getting back to Windows, I still have my desktop to play around with. I'm determined to at least try to learn linux, although I didn't expect to have a setback this early in the game.
 
I felt the same way as you a few weeks ago with Ubuntu. I eventually gave up.

I can't offer any support but I can share my experience!

-Tried to start with 10.10

-Network was moving at 0.2Mbps down and 0.001Mbps up. Confirmed it wasn't my connection as my Win7 laptop was getting 22Mbps

-Found out that all Realtek cards load the wrong drivers upon install, I found a fix but had to bounce back and forth between my laptop and desktop with a USB drive to fix it as I couldn't get online to download anything.

-Upon fixing my Realtek drivers and rebooting, my Nvidia drivers crashed and I was stuck at GRUB much like you. I had to install my drivers through GRUB which was FUN!

-Once I got 10.10 running I tried to modify the theme a bit with Compiz Fusion and had one headache after another.

-Lastly, I decided to wipe the hard drive and try 11.04. After the install went smoothly it failed to load the O/S at all.


So there ya have it, I'm by no means a Linux expert but I'm not an idiot either...Linux doesn't work as intended unless you have a Masters in Computer Science. I'd also like to point out that the most recent Linux Kernel doesn't support the RTL8111E chips which is ridiculous because they've been out a few years now.
 
I had to install my drivers through GRUB which was FUN!

I think you're confused... GRUB is a bootloader. You can't install drivers from GRUB.

I'd also like to point out that the most recent Linux Kernel doesn't support the RTL8111E chips which is ridiculous because they've been out a few years now.

Try the r8169 module, if you haven't.

Delete the Linux partition and boot back into Windows.

This will only force OP to find a Windows install disc to be able to run fixmbr. Seeing that the machine is OEM, it probably didn't come with a straight Windows install disc, and would require a long and slow OEM "restore" to reinstall all the included bloatware.

@op:

What do you mean by "it only comes up with GRUB recovery"? It should either show the GRUB menu, print an error number (and maybe error message), or not boot at all.

If you do have an actual install disc (preferably retail to avoid stupid activation issues), I would recommend reformatting the drive. The 1.2GB system partition is crazy. That separate system partition is only necessary if Windows is installed on a second drive, anyway. If you've got an install disc, the recovery partition is silly, too. One partition is enough, and makes dealing with bootloader issues simpler.
 
Last edited:
When it boots, the message that I get is...

error:file not found
grub rescue>_
 
When it boots, the message that I get is...

error:file not found
grub rescue>_

Try to boot a livecd and chroot into the Ubuntu install, then run 'grub-install /dev/sda'

Code:
sudo -s
mkdir /mnt/chroot
mount /dev/sda5 /mnt/chroot
chroot /mnt/chroot /bin/bash
grub-install /dev/sda
exit
umount /mnt/chroot
 
This is probably something stupid I'm doing but everytime I try to enter the mount /dev/sda5 /mnt/chroot command it keeps giving me "special device /dev/sda5 does not exist.
 
Code:
/dev/sda1   *        2048     2459647     1228800    7  HPFS/NTFS/exFAT
/dev/sda2         2459648   395680936   196610644+   7  HPFS/NTFS/exFAT
/dev/sda3       604659712   625139711    10240000    7  HPFS/NTFS/exFAT
/dev/sda4       395681790   604659711   104488961    5  Extended
/dev/sda5       395681792   597106687   100712448   83  Linux
/dev/sda6       597108736   604659711     3775488   82  Linux swap / Solaris
 
That's odd. It probably wouldn't have worked, anyway, since I forgot a couple of lines.

Code:
sudo su -                      (sudo -s should work, but I'm used to using sudo su -)
mkdir /mnt/chroot
mount /dev/sda5 /mnt/chroot
mount -o bind /dev /mnt/chroot/dev              (grub might not be able to see /dev/sda, I don't know whether Ubuntu saves the dev filesystem to disk on shutdown or not)
mount -o bind /proc /mnt/chroot/proc            (don't know whether it is necessary at all, but it can't hurt)
chroot /mnt/chroot /bin/bash
grub-install /dev/sda

If it still doesn't work, and you trust me not to format your drive, start up SSHD (service ssh start or service sshd start from Ubuntu installer disc), set a password (passwd), and PM me your IP address and the username/password (assuming you've forwarded port 22 if it is behind a NAT router).
 
After fooling around with it all day, I've decided to just wait a little while and let a little more support develop for both the x120e and 11.10, they are both fairly new. Now to get windows back running again.... heh.
 
Honestly, my preference is Mint 11 with good old Gnome 2.x.

I wish I was there in person to be able to help out. I love a good mystery. I also never go with the latest and greatest for at least 2 months just given the bumps that have to be worked out.

I do run them in a VM but thats as far as I tend to go.
 
After fooling around with it all day, I've decided to just wait a little while and let a little more support develop for both the x120e and 11.10, they are both fairly new. Now to get windows back running again.... heh.

Not to say there are not experience people here to help you, but you could always throw a topic up at http://ubuntuforums.org/ (should link back here to this topic if you do) and ask those guys there.
 
Have you tried just reinstalling ubuntu? I would load up the live CD, wipe the partitions that are not windows, and try the installation over again. Like others on here I would recommend Mint if you don't like Ubuntu. I use both and haven't quite decided which is better yet. Unity got a lot better is 11.10.
 
I tried re-installing and it still did the same thing.

I did some more research on it today and it seems to be an issue with UFEI and not recognizing grub2. There is a work around apparently, but that is above my skill level.
 
Back