PDA

View Full Version : [ubuntu] after installation: no grub on /dev/sda and no /bin/bash accesible from live version



vanessa_brasil
January 5th, 2014, 12:01 AM
I have installed Ubuntu on a Lenovo S205 (12.04 for amd64 since I wanted to use the alternate cd, the installation of newer version had already failed, but with the same problem).
the problem is that it doesn't boot.
Running bootinfoscript tells me that there is no bootloader installed on /dev/sda

Boot Info Script 0.61 [1 April 2012]


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

=> No boot loader is installed in the MBR of /dev/sda.

sda1: __________________________________________________ ________________________

File system: vfat
Boot sector type: FAT32
Boot sector info: According to the info in the boot sector, sda1 starts
at sector 0. But according to the info from fdisk,
sda1 starts at sector 2048.
Operating System:
Boot files: /efi/ubuntu/grubx64.efi /efi/ubuntu/shimx64.efi

sda2: __________________________________________________ ________________________

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

sda3: __________________________________________________ ________________________

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

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 1 976,773,167 976,773,167 ee GPT


GUID Partition Table detected.

Partition Start Sector End Sector # of Sectors System
/dev/sda1 2,048 194,559 192,512 EFI System partition
/dev/sda2 194,560 969,218,047 969,023,488 Data partition (Windows/Linux)
/dev/sda3 969,218,048 976,771,071 7,553,024 Swap partition (Linux)

"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 54E8-81D3 vfat
/dev/sda2 da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de ext4
/dev/sda3 6494ed91-f515-4051-bdf1-fdb962bb856c swap
/dev/sr0 iso9660 Ubuntu 12.04.3 LTS amd64

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

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sr0 /cdrom iso9660 (ro,noatime)


=========================== sda2/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_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de
set locale_dir=($root)/boot/grub/locale
set lang=de_DE
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 0 ; then
set timeout=0
fi
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 ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
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, mit Linux 3.8.0-35-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de
linux /boot/vmlinuz-3.8.0-35-generic.efi.signed root=UUID=da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.8.0-35-generic
}
menuentry 'Ubuntu, with Linux 3.8.0-35-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de
echo 'Linux 3.8.0-35-generic wird geladen …'
linux /boot/vmlinuz-3.8.0-35-generic.efi.signed root=UUID=da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.8.0-35-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, mit Linux 3.8.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de
linux /boot/vmlinuz-3.8.0-29-generic root=UUID=da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.8.0-29-generic
}
menuentry 'Ubuntu, with Linux 3.8.0-29-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de
echo 'Linux 3.8.0-29-generic wird geladen …'
linux /boot/vmlinuz-3.8.0-29-generic root=UUID=da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.8.0-29-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_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###
--------------------------------------------------------------------------------

=============================== sda2/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/sda2 during installation
UUID=da75bfe1-b390-4a8c-8ca7-b9ba6b9b88de / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=54E8-81D3 /boot/efi vfat defaults 0 1
# swap was on /dev/sda3 during installation
UUID=6494ed91-f515-4051-bdf1-fdb962bb856c none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

= boot/grub/grub.cfg 1
= boot/initrd.img-3.8.0-29-generic 1
= boot/initrd.img-3.8.0-35-generic 1
= boot/vmlinuz-3.8.0-29-generic 1
= boot/vmlinuz-3.8.0-35-generic 1
= boot/vmlinuz-3.8.0-35-generic.efi.signed 2
= initrd.img 1
= vmlinuz 1

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

sdb

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

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
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



From other forum posts I learned that grub can be installed via mounting the ubuntu partition and changing to the installed system.

sudo mount /dev/sda1 /mnt works but every further command fails. It says
mount point /mnt/sys does not exist and mount point /mnt/dev does not exist
but most importantly I get

chroot: failed to run command `/bin/bash': No such file or directory
when doing
sudo chroot /mnt /bin/bash

I had a look at /bin and there exists sth called bash but it says it is no directory.

This is where I'm stuck and don't know how to continue.

Some more info that might be useful is the result of the fdisk command

sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 1 976773167 488386583+ ee GPT
Partition 1 does not start on physical sector boundary.

Bashing-om
January 5th, 2014, 08:21 PM
vanessa_brasil; Hi !

Regret there was a delay in responding>

GPT partitioning requires a separate BIOS-Boot partition (>1MB,unformatted filesystem, bios_grub flag). This can be performed via tools such g-parted.
See:
http://ubuntuforums.org/showthread.php?t=2080356
http://ubuntuforums.org/showthread.php?t=1952953



hope this helps

vanessa_brasil
January 6th, 2014, 11:04 AM
Hi Bashing-om,

thanks for your reply! Following the links I created a new partition table while installing the latest ubuntu version and chossing the other installation option.
I know have
sda1: fat32, 285 MB, 3.88 used, boot
sda2: unformatted, 1 MB, bios_grub (but apparently unused)
sda3+4, ext4, 24GB for / and the rest for /home
and sda5: 2.79 GB as swap

but it still doesnt boot. Bootinfoscript still tells me that no boot loader is installed on the MBR of /dev/sda so I guess I have to install grub manually on the bios_grub partition?
Could you give me another hint there?

Thanks!
Nessa

fantab
January 6th, 2014, 01:45 PM
Your Lenovo is booting in EFI and Grub is installed to FAT32 EFI System Partition [ESP].
You don't need 'sda2'/'bios_grub' partition.

Boot with Ubuntu DVD/USB, 'Try Ubuntu' without installing, let the desktop load.
Download and Install 'Boot-Repair (https://help.ubuntu.com/community/Boot-Repair)', run the option 'create Bootinfo Summary'. Make note of the LINK created.
Post the LINK here.

Is there a Windows in the picture?
What graphic card/cards do you have?

vanessa_brasil
January 8th, 2014, 09:59 AM
Hi!
The boot info summary can be fund here
http://paste.ubuntu.com/6713733/
The graphic card is a AMD Radeon HD 6310 (http://www.notebookcheck.com/AMD-Radeon-HD-6310.40948.0.html)

I used to have Windows and CentOS installed, but confused the partitions when I tried to replace CentOS by Ubuntu. I have given up on Windows and just want one working OS back :-/

oldfred
January 8th, 2014, 05:49 PM
This is now old info. Many updates have been done to UEFI, so some issues may now be fixed automatically with newer versions of Ubuntu.

How to install Ubuntu 11.10 on a Lenovo (U)EFI system (tested on S205, B570)
https://help.ubuntu.com/community/InstallUbuntu11.10OnLenovoEFI/GPT/WLAN/Power/BIOS
http://ubuntuforums.org/showthread.php?t=1867367


Another lenovo solution copy grubx64.efi to bootx64.efi & boot hard drive not anyother entry
http://ubuntuforums.org/showthread.php?t=2185869&p=12884470#post12884470