PDA

View Full Version : [SOLVED] Migrated Ubuntuj



ben44b
September 26th, 2011, 03:40 AM
Hello,

I've migrated Ubuntu from Wubi like a grown-up. I used the script to migrate from the forums. I partitioned the disks and migrated with the -no bootloader option. Everything went smoothly.

Now, my computer automatically goes to Windows 7 without me making a choice for which OS (which is what I expected).

My question is how do I go about installing the bootloader?

Thank you.

Hakunka-Matata
September 26th, 2011, 04:07 AM
Please download boot_info_script.sh (http://sourceforge.net/projects/bootinfoscript/) , run and post the RESULTS.txt file in new reply.
This will tell us what has to be done to make your machine boot properly into grub menu.

ottosykora
September 26th, 2011, 05:42 AM
on my recent installtion, I took easybcd
( http://neosmart.net/wiki/display/EBCD/EasyBCD+Documentation+Home )

and it works very nice

ben44b
September 26th, 2011, 05:45 AM
I added EasyBCD but it didn't work for me. It stopped at a grub prompt.

ben44b
September 26th, 2011, 05:54 AM
Here is my RESULTS.txt file:


Boot Info Script 0.60 from 17 May 2011


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

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

sda3: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sda6: __________________________________________________ ________________________

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

============================ 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 28,674,047 28,672,000 27 Hidden NTFS (Recovery Environment)
/dev/sda2 * 28,674,048 294,979,583 266,305,536 7 NTFS / exFAT / HPFS
/dev/sda3 294,979,584 1,250,263,039 955,283,456 5 Extended
/dev/sda5 294,981,632 1,242,621,951 947,640,320 83 Linux
/dev/sda6 1,242,624,000 1,250,263,039 7,639,040 82 Linux swap / Solaris


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 7048946748942E3A ntfs PQSERVICE
/dev/sda2 EE78FD9278FD5A33 ntfs Acer
/dev/sda5 74ab1eae-7d5b-473f-99ba-679d392ca6c0 ext4
/dev/sda6 33a090c9-cb09-418d-b101-9ef611b4696d swap

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

Device Mount_Point Type Options

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


=========================== 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 video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
set locale_dir=($root)/boot/grub/locale
set lang=en_US
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
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 2.6.38-11-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
linux /boot/vmlinuz-2.6.38-11-generic root=UUID=74ab1eae-7d5b-473f-99ba-679d392ca6c0 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-11-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-11-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
echo 'Loading Linux 2.6.38-11-generic ...'
linux /boot/vmlinuz-2.6.38-11-generic root=UUID=74ab1eae-7d5b-473f-99ba-679d392ca6c0 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-11-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.38-10-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
linux /boot/vmlinuz-2.6.38-10-generic root=UUID=74ab1eae-7d5b-473f-99ba-679d392ca6c0 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-10-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-10-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
echo 'Loading Linux 2.6.38-10-generic ...'
linux /boot/vmlinuz-2.6.38-10-generic root=UUID=74ab1eae-7d5b-473f-99ba-679d392ca6c0 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-10-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=74ab1eae-7d5b-473f-99ba-679d392ca6c0 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=74ab1eae-7d5b-473f-99ba-679d392ca6c0 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-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='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 74ab1eae-7d5b-473f-99ba-679d392ca6c0
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### 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 7048946748942E3A
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 EE78FD9278FD5A33
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


# root was on /dev/sda5 when migrated
UUID=74ab1eae-7d5b-473f-99ba-679d392ca6c0 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 when migrated
UUID=33a090c9-cb09-418d-b101-9ef611b4696d none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

456.806175232 = 490.491895808 boot/burg/core.img 1
461.029335022 = 495.026479104 boot/grub/grub.cfg 1
140.803287506 = 151.186378752 boot/initrd.img-2.6.38-10-generic 1
152.111328125 = 163.328294912 boot/initrd.img-2.6.38-11-generic 2
140.834533691 = 151.219929088 boot/initrd.img-2.6.38-8-generic 1
456.797615051 = 490.482704384 boot/vmlinuz-2.6.38-10-generic 1
456.801834106 = 490.487234560 boot/vmlinuz-2.6.38-11-generic 1
456.806049347 = 490.491760640 boot/vmlinuz-2.6.38-8-generic 1
152.111328125 = 163.328294912 initrd.img 2
140.803287506 = 151.186378752 initrd.img.old 1
456.801834106 = 490.487234560 vmlinuz 1
456.797615051 = 490.482704384 vmlinuz.old 1

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

sdb sdc


ubuntu@ubuntu:~/Desktop$

Hakunka-Matata
September 26th, 2011, 04:19 PM
=> Lilo is installed in the MBR of /dev/sda.
Your question "My question is how do I go about installing the bootloader?"

You install Grub bootloader to the MBR of sda, as follows:

Boot using the Ubuntu liveCD/USB.

In a Shell/Terminal window, do:


sudo mount /dev/sda5 /mnt && sudo grub-install --boot-directory=/mnt/boot /dev/sda

Reboot
Refresh the GRUB 2 menu with sudo update-grub
If the user wishes to explore why the system failed, refer to Post-Restoration Commands (https://help.ubuntu.com/community/Grub2#Post-Restoration%20Commands) section below.

as shown here (https://help.ubuntu.com/community/Grub2#Copy_LiveCD_Files)

Good luck

ottosykora
September 26th, 2011, 04:22 PM
OK , you just do not have the grub inside the root partition configured apparently, but it exists, the easybcd did find it correctly.

Go and fetch the repair disk:

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

then boot from it and you can fix the grub in the partition sda5.

You could repair the grub from the grub prompt, but with the boot disk it might be easier.

ben44b
September 27th, 2011, 02:15 AM
Thank you Hakunka.

It worked like a charm.

Many thanks.

Hakunka-Matata
September 27th, 2011, 06:17 PM
You're welcome.

PayPaul
September 29th, 2011, 03:50 PM
I have a related question...I hope. I'd like to migrate as well from my Wubi install to a full install. Yet I'd like to retain my installed programs and settings from this installation. How do I do that?


OKAY... I found something. Maybe this will also help anyone else looking at this thread. Copied from the Ubuntu Wiki.




Reinstalling applications after a fresh installation

If you upgrade your Ubuntu system with a fresh installation, it is possible to mark the packages and services installed on your old system (prior to the upgrade) and save the settings ("markings") into a file. Then install the new version of Ubuntu and allow the system to reinstall packages and services using the settings saved in the "markings" file. For instructions, see this Ubuntu forum thread (http://ubuntuforums.org/showthread.php?t=1057608). In brief:


On the old system:

Synaptic Package Manager -> File -> Save Markings

Save the markings file to an external medium, such as a USB drive.
Complete the backup of your system's other important files (e.g. the /home directory) before the installation of the new system.
In the freshly-installed new system:

Synaptic Package Manager -> File -> Read markings and load the file on your USB drive (or other external storage) previously saved. Note: Many packages, dependencies, and compatibilities change between version of Ubuntu, so this method does not always work. Automated updates (http://ubuntuguide.org/wiki/Ubuntu:Natty#Upgrading_to_Natty) remains the recommended method.


Alternatively you can use this command-line method.



Prior to the clean installation. run:

dpkg --get-selections > ~/my-packages This creates a my-packages file in the ~ (home) directory which will contain a list of the packages installed on the old system. Copy this file to a safe place (as you will need it after the new installation).

Proceed with the clean installation. Enable the same repositories that were enabled in the old system.



Now copy the my-packages file to the ~ (/home) folder. Run:

sudo dpkg --set-selections < my-packages && sudo apt-get dselect-upgrade Any packages that you had installed (that are in the new repositories) will now be installed. Excluded will be any manually-installed packages (that are not in the new repositories) and any packages that were compiled from source.

Here (http://ubuntuguide.org/wiki/Upgrades) are some of the steps I have sometimes needed to take when performing upgrades.

bcbc
September 29th, 2011, 07:34 PM
I have a related question...I hope. I'd like to migrate as well from my Wubi install to a full install. Yet I'd like to retain my installed programs and settings from this installation. How do I do that?


OKAY... I found something. Maybe this will also help anyone else looking at this thread. Copied from the Ubuntu Wiki.



You can use that technique. Or this: http://ubuntuforums.org/showthread.php?t=1519354