PDA

View Full Version : [ubuntu] Can't boot into ubuntu



DLH112
March 21st, 2011, 07:35 AM
Hello. I had an installation of ubuntu that was used in the fall semester for a class, and until recently worked fine. I noticed recently though that attemptiing to choose ubuntu in the OS selection screen just made my laptop restart. So I used the ubuntu cd in windows to uninstall it. Then I reinstalled it.
I chose to install alongside windows, and made the size around 50GB. After a long wait, it said the installation was successful, and I just had to restart. I clicked restart, and the usual lines came up but then it said a bunch of lines like (error in sector 52xxxx) or something like that, and the disc tray opened. I took out the cd and closed the tray and pressed enter. The computer restarted, but just goes into windows xp now automatically.
So basically, 50GB of my hard drive just got taken up by empty space.
I saw someone had a somewhat similar sounding problem and was told to use boot info script from bootinfoscrip.sourceforge.net. I downloaded it and used it, so I'll paste my results.txt here:

Boot Info Script 0.55 dated February 15th, 2010

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

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

sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM

sda2: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

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

sda6: __________________________________________________ _______________________

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

=========================== 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 End Size Id System

/dev/sda1 * 63 526,850,888 526,850,826 7 HPFS/NTFS
/dev/sda2 526,852,094 625,141,759 98,289,666 5 Extended
/dev/sda5 526,852,096 621,029,375 94,177,280 83 Linux
/dev/sda6 621,031,424 625,141,759 4,110,336 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 B2B43CCBB43C9437 ntfs SQ004563P04
/dev/sda2: PTTYPE="dos"
/dev/sda5 15cb0332-9d8d-4464-9511-2b54c52d714a ext4
/dev/sda6 670dfcb6-c463-4bf7-b3cc-b3ecf0db54bb swap
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

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


================================ sda1/boot.ini: ================================

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

=========================== 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 vbe
insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 15cb0332-9d8d-4464-9511-2b54c52d714a
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 15cb0332-9d8d-4464-9511-2b54c52d714a
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 15cb0332-9d8d-4464-9511-2b54c52d714a
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=15cb0332-9d8d-4464-9511-2b54c52d714a ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 15cb0332-9d8d-4464-9511-2b54c52d714a
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=15cb0332-9d8d-4464-9511-2b54c52d714a ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-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='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 15cb0332-9d8d-4464-9511-2b54c52d714a
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 15cb0332-9d8d-4464-9511-2b54c52d714a
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set b2b43ccbb43c9437
drivemap -s (hd0) ${root}
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 -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
# / was on /dev/sda5 during installation
UUID=15cb0332-9d8d-4464-9511-2b54c52d714a / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=670dfcb6-c463-4bf7-b3cc-b3ecf0db54bb none swap sw 0 0

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


291.3GB: boot/grub/core.img
315.1GB: boot/grub/grub.cfg
280.7GB: boot/initrd.img-2.6.35-22-generic
270.1GB: boot/vmlinuz-2.6.35-22-generic
280.7GB: initrd.img
270.1GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda2

00000000 4e 31 34 8d f4 2e e8 ce e1 02 47 3a 32 23 4d 32 |N14.......G:2#M2|
00000010 0a 95 e4 04 34 24 de d3 9c d2 f8 d4 87 1a 6e 0c |....4$........n.|
00000020 95 83 1e 53 71 ed bf e0 13 d6 d5 86 4b e1 9b da |...Sq.......K...|
00000030 d5 86 43 7d e0 c7 43 21 c3 bd c9 b8 8d 98 ab 64 |..C}..C!.......d|
00000040 5a 8e d0 83 e1 c0 0f e5 00 51 00 9a 4b b0 96 01 |Z........Q..K...|
00000050 d6 f9 98 8a 91 a7 88 e0 f8 bf fd 96 a1 39 94 19 |.............9..|
00000060 20 d1 5f bd 3e 22 d6 82 61 9b cd c4 03 d0 c7 91 | ._.>"..a.......|
00000070 44 56 ba d8 5a 01 1f b6 63 34 8e 49 23 58 e7 aa |DV..Z...c4.I#X..|
00000080 a0 c6 cf a5 7d 97 77 46 9b 6d a3 be ac a6 e8 c5 |....}.wF.m......|
00000090 45 d2 74 7b 8d 9c 49 b5 bc 19 85 95 b6 98 20 42 |E.t{..I....... B|
000000a0 c8 02 a6 57 b0 8d b3 09 93 e2 63 ba 33 18 10 26 |...W......c.3..&|
000000b0 4c 61 d2 18 46 e6 f3 6b 1a 7a 27 78 d0 2c 63 7b |La..F..k.z'x.,c{|
000000c0 7b d8 c8 c5 b9 35 a8 e1 ef 5b 3b da c3 25 70 cc |{....5...[;..%p.|
000000d0 32 10 ed f4 02 43 37 df 30 31 77 62 d1 00 00 00 |2....C7.01wb....|
000000e0 ff fb 52 64 e0 89 f1 f7 2f 51 38 c6 1a 64 14 46 |..Rd..../Q8..d.F|
000000f0 ca 23 00 02 5d 87 f4 af 40 27 98 a9 90 47 00 27 |.#..]...@'...G.'|
00000100 c0 00 89 76 20 c1 17 1b ab 12 34 7c c9 c9 f2 5d |...v .....4|...]|
00000110 ae 67 95 e8 ce c7 a9 cc 70 8b d4 48 e3 bf fe 9d |.g......p..H....|
00000120 15 3c 55 42 86 85 02 06 03 ff f8 5f ff ff e2 f7 |.<UB......._....|
00000130 ff ff f4 85 0f d2 55 4f 94 70 0d 80 00 12 48 e0 |......UO.p....H.|
00000140 0c 8e 8e 58 24 9a 23 b2 c5 81 51 15 46 06 d4 40 |...X$.#...Q.F..@|
00000150 98 72 b6 7b 76 2d 13 38 ea 7d ea 97 4e 23 83 08 |.r.{v-.8.}..N#..|
00000160 b1 43 17 fe f6 9c ef e4 82 4e f4 60 bd fe 4c 85 |.C.......N.`..L.|
00000170 94 10 ff ff c3 63 00 01 04 2d a5 03 13 e9 00 00 |.....c...-......|
00000180 05 03 f5 1c ff ff ff fa 0f 79 47 ff fe 54 f0 0c |.........yG..T..|
00000190 28 35 45 52 68 50 c1 04 c2 22 51 28 70 00 23 1d |(5ERhP..."Q(p.#.|
000001a0 26 6b 29 c5 00 27 a5 91 d1 b7 5e d8 45 ac ef 9f |&k)..'....^.E...|
000001b0 68 00 30 30 64 63 71 10 00 00 00 00 01 b6 00 fe |h.00dcq.........|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 08 9d 05 00 fe |................|
000001d0 ff ff 05 fe ff ff 02 08 9d 05 00 c0 3e 00 00 00 |............>...|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200

garvinrick4
March 21st, 2011, 07:51 AM
I would put grub2 into the mbr, right now windows grub is there.
In live Cd.
Open terminal; copy and paste these one at a time.



sudo mount /dev/sda5 /mnt && sudo mount -o bind /dev /mnt/dev && sudo mount -o bind /dev/pts /mnt/dev/pts && sudo mount -o bind /proc /mnt/proc && sudo mount -o bind /sys /mnt/sys && sudo cp /etc/resolv.conf /mnt/etc/resolv.conf && sudo chroot /mnt
grub-install /dev/sda
update-grub
exit
sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt
sudo shutdown -r nowYou are getting into root of sda5 (linux install) and installing grub2 to the mbr in sda
Many ways to do it this is just one. I like so to be in root of / when installing grub.

There is one simpler:

sudo mount /dev/sda5 /mnt
sudo grub-install --recheck --root-directory=/mnt /dev/sda
sudo umount /mntBut cannot update-grub until after booting into Ubuntu install. (your choice)

garvinrick4
March 21st, 2011, 08:14 AM
Going to hit the Hay right now so if OP has any problems someone jump in and give him a
helping hand please.
Should not was pretty cut and dry, but never say never, right.