PDA

View Full Version : [ubuntu] Dual Boot Windows7 / Ubuntu 10.10



phil3995
March 11th, 2011, 09:23 PM
Sorry if this has already been posted.

I'm trying to install unbuntu 10.10 onto a partition of my Acer netbook it already has windows7 installed. I used a liveUSB to install this went fine. Then when i restart to finish the install it boots straight into windows without giving me an option.

Can anyone help solve this issue

Thanks
Phil

Hippytaff
March 11th, 2011, 09:28 PM
Hi and Welcome to the forums...can you boot into the live usb choose try ubuntu and post the results.txt generated by this script (http://sourceforge.net/projects/bootinfoscript/)

This will show exactly how your Hard Drive (Partitions etc) is set up

ericrichards420
March 11th, 2011, 09:33 PM
what I would do is try reinstalling ubuntu, this time delete the ubuntu partition. for some reason it didnt install grub. it should do it this time.

coffeecat
March 11th, 2011, 10:47 PM
Hi and Welcome to the forums...can you boot into the live usb choose try ubuntu and post the results.txt generated by this script (http://sourceforge.net/projects/bootinfoscript/)

+1

@phil3995, that boot script is excellent for diagnosing problems like this and seeing what has happened and what needs to be done. You might need the instructions for running the script. Here they are:

http://bootinfoscript.sourceforge.net/

Please remember to post the output between
and tags for legibility.

phil3995
March 12th, 2011, 01:41 PM
Hey thanks for all the help,
Heres the results from the script:



Boot Info Script 0.55 dated February 15th, 2010

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

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

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

sda3: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

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

sda4: __________________________________________________ _______________________

File system: ext4
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda4 and
looks at sector 418514192 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System: Ubuntu 10.10
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb1: __________________________________________________ _______________________

File system: vfat
Boot sector type: Unknown
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sdc: __________________________________________________ _______________________

File system: vfat
Boot sector type: MSWIN4.1: Fat 32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 * 2,048 206,847 204,800 7 HPFS/NTFS
/dev/sda2 206,848 409,602,047 409,395,200 7 HPFS/NTFS
/dev/sda3 485,468,158 488,396,799 2,928,642 5 Extended
/dev/sda5 485,468,160 488,396,799 2,928,640 82 Linux swap / Solaris
/dev/sda4 409,602,048 485,466,111 75,864,064 83 Linux


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 3995 MB, 3995074560 bytes
255 heads, 63 sectors/track, 485 cylinders, total 7802880 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdb1 * 128 7,802,879 7,802,752 b W95 FAT32


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/loop1 9c07339a-21f7-1740-a1ca-ac778e97de8f ext2
/dev/sda1 8414154514153B9C ntfs System Reserved
/dev/sda2 90021DF5021DE150 ntfs
/dev/sda3: PTTYPE="dos"
/dev/sda4 2bf90269-e073-48b0-89dc-80f21ffc2310 ext4
/dev/sda5 09849dff-b906-42ce-a81f-f31c70fe3378 swap
/dev/sda: PTTYPE="dos"
/dev/sdb1 62DB-AA21 vfat PHIJILLIP
/dev/sdb: PTTYPE="dos"
/dev/sdc vfat

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

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sdb1 /cdrom vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437, iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdc /media/disk vfat (rw,nosuid,nodev,uhelper=udisks,uid=999,gid=999,sh ortname=mixed,dmask=0077,utf8=1,showexec,flush)


=========================== sda4/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,msdos4)'
search --no-floppy --fs-uuid --set 2bf90269-e073-48b0-89dc-80f21ffc2310
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,msdos4)'
search --no-floppy --fs-uuid --set 2bf90269-e073-48b0-89dc-80f21ffc2310
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,msdos4)'
search --no-floppy --fs-uuid --set 2bf90269-e073-48b0-89dc-80f21ffc2310
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=2bf90269-e073-48b0-89dc-80f21ffc2310 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,msdos4)'
search --no-floppy --fs-uuid --set 2bf90269-e073-48b0-89dc-80f21ffc2310
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=2bf90269-e073-48b0-89dc-80f21ffc2310 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,msdos4)'
search --no-floppy --fs-uuid --set 2bf90269-e073-48b0-89dc-80f21ffc2310
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos4)'
search --no-floppy --fs-uuid --set 2bf90269-e073-48b0-89dc-80f21ffc2310
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/sdb1)" {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set 8414154514153b9c
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 ###

=============================== sda4/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/sdb4 during installation
UUID=2bf90269-e073-48b0-89dc-80f21ffc2310 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdb5 during installation
UUID=09849dff-b906-42ce-a81f-f31c70fe3378 none swap sw 0 0

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


214.2GB: boot/grub/core.img
244.2GB: boot/grub/grub.cfg
210.5GB: boot/initrd.img-2.6.35-22-generic
214.2GB: boot/vmlinuz-2.6.35-22-generic
210.5GB: initrd.img
214.2GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sdb1

00000000 eb 58 90 53 59 53 4c 49 4e 55 58 00 02 08 98 04 |.X.SYSLINUX.....|
00000010 02 00 00 00 00 f8 00 00 3f 00 ff 00 80 00 00 00 |........?.......|
00000020 80 0f 77 00 b4 1d 00 00 00 00 00 00 02 00 00 00 |..w.............|
00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 80 00 29 21 aa db 62 4e 4f 20 4e 41 4d 45 20 20 |..)!..bNO NAME |
00000050 20 20 46 41 54 33 32 20 20 20 fa fc 31 c9 8e d1 | FAT32 ..1...|
00000060 bc 76 7b 52 06 57 1e 56 8e c1 b1 26 bf 78 7b f3 |.v{R.W.V...&.x{.|
00000070 a5 8e d9 bb 78 00 0f b4 37 0f a0 56 20 d2 78 1b |....x...7..V .x.|
00000080 31 c0 b1 06 89 3f 89 47 02 f3 64 a5 8a 0e 18 7c |1....?.G..d....||
00000090 88 4d bc 50 50 50 50 cd 13 eb 5c 8b 55 aa 8b 75 |.M.PPPP...\.U..u|
000000a0 a8 c1 ee 04 01 f2 81 fa b7 07 73 2b f6 45 b4 7f |..........s+.E..|
000000b0 75 25 38 4d b8 74 20 66 3d 21 47 50 54 75 10 80 |u%8M.t f=!GPTu..|
000000c0 7d b8 ed 75 0a 66 ff 75 ec 66 ff 75 e8 eb 0f 51 |}..u.f.u.f.u...Q|
000000d0 51 66 ff 75 bc eb 07 51 51 66 ff 36 1c 7c b4 08 |Qf.u...QQf.6.|..|
000000e0 cd 13 72 13 20 e4 75 0f c1 ea 08 42 89 16 1a 7c |..r. .u....B...||
000000f0 83 e1 3f 89 0e 18 7c fb bb aa 55 b4 41 8a 16 74 |..?...|...U.A..t|
00000100 7b cd 13 72 10 81 fb 55 aa 75 0a f6 c1 01 74 05 |{..r...U.u....t.|
00000110 c6 06 45 7d 00 66 b8 e8 dd 76 00 66 ba 00 00 00 |..E}.f...v.f....|
00000120 00 bb 00 7e e8 10 00 66 81 3e 24 7e d4 ff 73 72 |...~...f.>$~..sr|
00000130 75 76 ea 38 7e 00 00 66 03 06 60 7b 66 13 16 64 |uv.8~..f..`{f..d|
00000140 7b b9 10 00 eb 2b 66 52 66 50 06 53 6a 01 6a 10 |{....+fRfP.Sj.j.|
00000150 89 e6 66 60 b4 42 e8 7f 00 66 61 8d 64 10 72 01 |..f`.B...fa.d.r.|
00000160 c3 66 60 31 c0 e8 70 00 66 61 e2 da c6 06 45 7d |.f`1..p.fa....E}|
00000170 2b 66 60 66 0f b7 36 18 7c 66 0f b7 3e 1a 7c 66 |+f`f..6.|f..>.|f|
00000180 f7 f6 31 c9 87 ca 66 f7 f7 66 3d ff 03 00 00 77 |..1...f..f=....w|
00000190 17 c0 e4 06 41 08 e1 88 c5 88 d6 b8 01 02 e8 37 |....A..........7|
000001a0 00 66 61 72 01 c3 e2 c9 31 f6 8e d6 bc 68 7b 8e |.far....1....h{.|
000001b0 de 66 8f 06 78 00 be df 7d e8 09 00 31 c0 cd 16 |.f..x...}...1...|
000001c0 cd 19 f4 eb fd 66 60 ac 20 c0 74 09 b4 0e bb 07 |.....f`. .t.....|
000001d0 00 cd 10 eb f2 66 61 c3 8a 16 74 7b cd 13 c3 42 |.....fa...t{...B|
000001e0 6f 6f 74 20 65 72 72 6f 72 0d 0a 00 00 00 00 00 |oot error.......|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200


I forgot to mention I'm installing 'Ubuntu Netbook 10.10' just in case it helps

YesWeCan
March 12th, 2011, 02:28 PM
You don't need to reinstall anything. :)
You can simply add Ubuntu to your Windows boot menu.

You have installed the Grub2 to the Ubuntu partition (sda4) and this is why you cannot boot Ubuntu. But this is just fine because you can use Windows BCD bootloader to boot Grub.

In Windows, download EasyBCD (free) and run it. You specify adding a linux OS to the boot menu and when you specify Grub2 it will automatically find it and add it.


This is a better solution, IMO, than installing Grub2 to the MBR (and erasing the Windows MBR) because it avoids Windows update issues that can cause the Grub2 MBR to be wiped out.

If you really want to use Grub2 as your booter then you will need to boot from liveCD and resinstall Grub2 in the right place. From CD:
sudo mount /dev/sda4 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
then reboot into Ubuntu and run
sudo update-grub
to add Windows to the boot menu

kansasnoob
March 12th, 2011, 02:36 PM
I'm not quite sure why this would have happened, but during installation your 250GB drive was recognized as /dev/sdb instead of /dev/sda. Did you perhaps have an additional device (memory card, etc) mounted during installation?

It probably doesn't matter much, just curious, and I have seen similar things happen before:

http://ubuntuforums.org/showthread.php?t=1659542

Regardless to fix that you must first be very certain how the 250GB drive is recognized ATM so, using your Live CD/USB, run the command:


sudo fdisk -l

BTW that's a lower case L at the end. You should see an output similar to:


Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 * 2,048 206,847 204,800 7 HPFS/NTFS
/dev/sda2 206,848 409,602,047 409,395,200 7 HPFS/NTFS
/dev/sda3 485,468,158 488,396,799 2,928,642 5 Extended
/dev/sda5 485,468,160 488,396,799 2,928,640 82 Linux swap / Solaris
/dev/sda4 409,602,048 485,466,111 75,864,064 83 Linux


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 3995 MB, 3995074560 bytes
255 heads, 63 sectors/track, 485 cylinders, total 7802880 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdb1 * 128 7,802,879 7,802,752 b W95 FAT32


NOTE: That's copied from the output of the Boot Info Script and it uses a different formula to calculate device sizes, the only part you're interested in now is device designations as highlighted there.

Only if the 250GB drive is still recognized as /dev/sda as in the output of the BIS then copy-n-paste the following commands to the terminal:


sudo mount /dev/sda4 /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys && sudo chroot /mnt


grub-install /dev/sda


update-grub

Note: wait for that to say done, then:


exit


sudo umount /mnt/dev && sudo umount /mnt/sys && sudo umount /mnt/proc && sudo umount /mnt

Then you'll hopefully be able to boot your new Ubuntu and Windows normally.

kansasnoob
March 12th, 2011, 02:40 PM
You don't need to reinstall anything. :)
You can simply add Ubuntu to your Windows boot menu.

You have installed the Grub2 to the Ubuntu partition (sda4) and this is why you cannot boot Ubuntu. But this is just fine because you can use Windows BCD bootloader to boot Grub.

In Windows, download EasyBCD (free) and run it. You specify adding a linux OS to the boot menu and when you specify Grub2 it will automatically find it and add it.


This is a better solution, IMO, than installing Grub2 to the MBR (and erasing the Windows MBR) because it avoids Windows update issues that can cause the Grub2 MBR to be wiped out.

If you really want to use Grub2 as your booter then you will need to boot from liveCD and resinstall Grub2 in the right place. From CD:
sudo mount /dev/sda4 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
then reboot into Ubuntu and run
sudo update-grub
to add Windows to the boot menu

That may or may not work because of this bit in grub.cfg:


insmod part_msdos
insmod ext2
set root='(hd1,msdos4)'
search --no-floppy --fs-uuid --set 2bf90269-e073-48b0-89dc-80f21ffc2310

I just prefer using a chroot whenever I'm in doubt since it allows the ability to "update-grub" prior to rebooting ;)

YesWeCan
March 12th, 2011, 02:50 PM
That may or may not work because of this bit in grub.cfg:


insmod part_msdos
insmod ext2
set root='(hd1,msdos4)'
search --no-floppy --fs-uuid --set 2bf90269-e073-48b0-89dc-80f21ffc2310

I just prefer using a chroot whenever I'm in doubt since it allows the ability to "update-grub" prior to rebooting ;)
Well spotted.
For my method to work, that line in grub.cfg would have to be edited to
set root='(hd0,msdos4)'

The chroot is good. Sometimes scares people a little. One could do the chroot and update-grub but skip the grub-install and then do what I suggested.

Or do all you suggest and end up with Grub2 as the boot loader.

phil3995
March 12th, 2011, 02:55 PM
You don't need to reinstall anything. :)
You can simply add Ubuntu to your Windows boot menu.

You have installed the Grub2 to the Ubuntu partition (sda4) and this is why you cannot boot Ubuntu. But this is just fine because you can use Windows BCD bootloader to boot Grub.

In Windows, download EasyBCD (free) and run it. You specify adding a linux OS to the boot menu and when you specify Grub2 it will automatically find it and add it.


Thanks a lot this work =)

YesWeCan
March 12th, 2011, 02:58 PM
Good. :)
Did you have to change grub.cfg or not? If not, then perhaps EasyBCD is smart enough to set up a boot directive that boots Ubuntu directly without using Grub. Not sure.

[edit] Or it may be that when booting off CD the bios names the drive sda but when booting directly it names the drive sdb. I think this is more likely because it would explain why the grub.cfg references hd1,4 even though there is no partititon 4 on sdb.

@Phil, would you mind running bootinfoscript again from hard drive Ubuntu and post the results to confirm this? Thx