PDA

View Full Version : [ubuntu] Messed up my boot, now i am on LIVECD!



dumble
November 7th, 2010, 09:07 PM
Hello

I messed up my MBR.

Its a long time ago I tried ubuntu, then I put it aside, and now I wanted to try it again with a DUALBOOT with windows 7.

OK, so I made some space free on my HD, 20 GB. Installed Ubuntu, first creating a 2GB SWAP, and a ext4 on the free SPACE. AFther that installed it. Everything worked fine.

So then I read somewhere that EASYBCD bootmanager is recommended by many users. So I followed this guide>
http://neosmart.net/wiki/display/EBCD/Ubuntu

So installed the latest version of Easybcd in win7, followed the steps, rebooted.. but yep > not working. It says I need to insert my win7 DVD and then click repair. But I think if I do this, it will remove the GRUB2 loader and I wont be able to boot in UBUNTU. I am not sure..

What should I do.

PS. one of the reasons I wanted to install EASYBCD is because there are other people that use this computer and want to have WIN7 as a default OS and not UBUNTU...

jroa
November 7th, 2010, 09:12 PM
With Grub, you can make either windows or Linux the default. You just have to change the order. I have found that the Windows users on my computer do not care that it boots to Grub first.

I would reinstall Grub first, then play with the configuration until you get it the way you want it.

dumble
November 7th, 2010, 09:15 PM
Thats easily said, I have no IDEA how to do this though.. can I do this from the liveCD?

dumble
November 7th, 2010, 09:25 PM
Here I added a screenshot from gparted partition editor in the LiveCD.
http://i275.photobucket.com/albums/jj290/dumbl3/FORUM/Screenshot.png

This is the output of sudo fdisk -lu

ubuntu@ubuntu:~$ sudo fdisk -lu

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6c086c08

Device Boot Start End Blocks Id System
/dev/sda1 2048 206847 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 206848 43243199 21518176 7 HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3 47151102 312578047 132713473 f W95 Ext'd (LBA)
Partition 3 does not end on cylinder boundary.
/dev/sda4 43243520 47149055 1952768 82 Linux swap / Solaris
Partition 4 does not end on cylinder boundary.
/dev/sda5 84203280 312578047 114187384 7 HPFS/NTFS
/dev/sda6 47151104 84201471 18525184 83 Linux

Partition table entries are not in disk order
ubuntu@ubuntu:~$ ^C
ubuntu@ubuntu:~$

Quackers
November 7th, 2010, 09:54 PM
Install Startup Manager in Ubuntu via Synaptic Package Manager. You can make what you want default with it.

dumble
November 7th, 2010, 09:54 PM
I fixxed it using this guide:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Edit,
thanks Quackers, I will give it a try

dumble
November 8th, 2010, 06:02 AM
OK, the MBR is still a littlebit messed up.

When booting up, the default bootloader grub2 will load. With UBUNTU as default (10sec), then the other default stuff like memtest etc. And below that 'Windows 7 (loader)', which will bring back the EASYBCD install, where i could chose between win7 and ubuntu (like I configured it in EASYBCD. And below the windows 7 loader in grub2 there is 'Windows Vista (loader)' (which does not work at all).


Anyway, I red that the grub2 has been rewriten and now it is possible to do all kinds of changes like installing themes and stuff.. So this is what would like to have:

-Start up computer.
-Grub2 with a nice theme.
-I have a DUALBOOT
..-Windows7 as default (10 seconds) >other people use this computer
..-UBUNTU 10.10

How can I do this? Here I put the output of my grub.cfg file. I looked at it, but i could not see the forest for the trees. Can anyone please help me with this?

Here is the output of my grub.cfg file:

#
# 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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=208060f9-0bc4-464c-ab53-da3e834ddd15 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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=208060f9-0bc4-464c-ab53-da3e834ddd15 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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
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)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 246ad31e6ad2eb94
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda2)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 40c2eb18c2eb1148
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 ###

dumble
November 8th, 2010, 07:52 PM
So I installed 'startup manager'
Version 1.9.13-5

.. but it only comes with very limited options.

Look at this screenshot!:

http://i275.photobucket.com/albums/jj290/dumbl3/FORUM/Screenshot-1.png

dumble
November 12th, 2010, 11:04 PM
Nobody?

drs305
November 12th, 2010, 11:11 PM
There are several ways to do what you want.

In order to put Windows first on the menu, you can either create a custom menu (which never changes) and then turn off Ubuntu's ability to look for other operating systems. In the custom menu, you would put whatever Windows menu items you want and edit the titles however you wish.

Another option you can rename the script that searches for other OS's and that will put all your current Windows entries as they currently exist first.

In order to get rid of the memtest86+ entry, you can turn off the script that puts it into the menu:

sudo chmod -x /etc/grub.d/20_memtest86+

To turn it back on and get it back into the menu, change the minus sign to a plus sign.

After making any changes, run:

sudo update-grub

Tell us which path you want to take and we can help you achieve it.

wilee-nilee
November 12th, 2010, 11:16 PM
n

dumble
November 13th, 2010, 12:46 AM
Thanks guys!

I think I would like to go for the custom menu! I found this, how do you create this. Or is it not possible yet in grub2? Maybe I would have to revert back to grub legacy.
http://i275.photobucket.com/albums/jj290/dumbl3/FORUM/grub2themedinxter.png


If it is possible I would like to create something like this.

Schematic
----


WINDOWS 7 ULTIMATE (10 seconds boot, default)
UBUNTU 10.10 Maverick Meerkat
UBUNTU EXTRA --> If you click this it will go to another menu with the extra boot options of Ubuntu, like memtest and recovery mode.


----

I will post the boot info script result.txt as soon as I get home!

drs305
November 13th, 2010, 01:03 AM
The screen you posted is most likely BURG. It is based on Grub 2 but much more work has been done on it by its creator to improve displays and theming. I haven't used it but if you search these forums and Google you can find enough information to get it running.

dumble
November 13th, 2010, 03:13 AM
hmm it looks a little bit difficult to get those themes working. I have to say I am kind of new to ubuntu.

Anyways, without a theme is fine for now.. Just want to get rid of those strange boot-entries.

Here is de results.txt:

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

sda3: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System:
Boot files/dirs:

sda6: __________________________________________________ _______________________

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

sda4: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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 43,243,199 43,036,352 7 HPFS/NTFS
/dev/sda3 47,151,102 312,578,047 265,426,946 f W95 Ext d (LBA)
/dev/sda5 84,203,280 312,578,047 228,374,768 7 HPFS/NTFS
/dev/sda6 47,151,104 84,201,471 37,050,368 83 Linux
/dev/sda4 43,243,520 47,149,055 3,905,536 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 246AD31E6AD2EB94 ntfs System Reserved
/dev/sda2 40C2EB18C2EB1148 ntfs WIN7
/dev/sda3: PTTYPE="dos"
/dev/sda4 096cd11a-5e95-4fa4-9d42-c3d35cda14f4 swap
/dev/sda5 F2F67EF4F67EB905 ntfs DATA
/dev/sda6 208060f9-0bc4-464c-ab53-da3e834ddd15 ext4
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sda6 / ext4 (rw,errors=remount-ro,commit=0)


=========================== sda6/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="4"
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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1024x768
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
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 ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
insmod tga
if background_image /usr/share/images/grub/Lake_mapourika_NZ.tga ; then
set color_normal=black/black
set color_highlight=magenta/black
else
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
fi
### 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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=208060f9-0bc4-464c-ab53-da3e834ddd15 ro vga=773 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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=208060f9-0bc4-464c-ab53-da3e834ddd15 ro single vga=773
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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 208060f9-0bc4-464c-ab53-da3e834ddd15
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)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 246ad31e6ad2eb94
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda2)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 40c2eb18c2eb1148
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 ###

=============================== sda6/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/sda6 during installation
UUID=208060f9-0bc4-464c-ab53-da3e834ddd15 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda4 during installation
UUID=096cd11a-5e95-4fa4-9d42-c3d35cda14f4 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

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


30.7GB: boot/grub/core.img
35.6GB: boot/grub/grub.cfg
25.0GB: boot/initrd.img-2.6.35-22-generic
30.7GB: boot/vmlinuz-2.6.35-22-generic
25.0GB: initrd.img
30.7GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda3

00000000 cc 33 04 70 84 84 3e ea 91 c8 d2 51 6b ba 62 52 |.3.p..>....Qk.bR|
00000010 df 8a 72 32 a3 7a 1d 58 6a 0e 17 45 e5 3a c4 30 |..r2.z.Xj..E.:.0|
00000020 74 dd d4 63 e0 3b 10 c8 7c 10 bf e8 b6 02 7c 8f |t..c.;..|.....|.|
00000030 06 10 96 42 0c 1e 31 04 47 a9 8e 3f 09 b8 b6 52 |...B..1.G..?...R|
00000040 80 69 27 18 b3 49 d0 be 2c 8b 39 00 8d 6c 36 61 |.i'..I..,.9..l6a|
00000050 8d 16 29 b7 01 a8 0b a5 76 38 8f 1c c1 e7 ac 3e |..).....v8.....>|
00000060 73 e5 55 19 f9 f0 35 7f fc b6 fd 41 44 78 c5 1e |s.U...5....ADx..|
00000070 00 3d d6 a3 08 c7 80 ba ce aa 1c 7b 00 be fb 0e |.=.........{....|
00000080 16 b8 dc 6b d8 95 9b 4f 6a b0 66 04 42 c8 f1 ce |...k...Oj.f.B...|
00000090 70 bd 17 d0 9c ea e2 af b8 93 06 11 64 f9 aa 8f |p...........d...|
000000a0 81 e6 00 fe f0 1c 5c ec a5 6f c0 6a 02 db 31 6e |......\..o.j..1n|
000000b0 3e fb 1c 3a df 71 09 6d d8 d2 38 0b 64 99 89 d2 |>..:.q.m..8.d...|
000000c0 56 04 bd b0 7f 11 1d f5 50 13 cd 01 61 3a b8 b2 |V.......P...a:..|
000000d0 40 e6 23 c0 79 d8 d3 44 9f 07 07 8a 03 52 c0 ed |@.#.y..D.....R..|
000000e0 96 a1 27 ac c3 83 e7 71 ec 47 e2 c2 88 d0 4f 30 |..'....q.G....O0|
000000f0 70 73 19 0e 03 84 f9 3a a6 47 28 78 28 ff f4 69 |ps.....:.G(x(..i|
00000100 a2 08 d1 ac fd 13 f7 14 f2 79 da 32 a6 28 e1 ae |.........y.2.(..|
00000110 24 18 00 07 c1 40 2a 11 3f f8 43 c4 f3 a4 9b 56 |$....@*.?.C....V|
00000120 bb 06 24 fc 20 2c 7f 0b 86 e5 8e 34 03 d8 23 0b |..$. ,.....4..#.|
00000130 20 d9 c7 85 1f 38 b9 aa 63 7e 68 90 0f 24 89 70 | ....8..c~h..$.p|
00000140 a2 79 06 0e 72 05 80 46 24 67 11 31 a3 80 ed fb |.y..r..F$g.1....|
00000150 5d 84 25 9e 4c 9e e0 40 2b 81 db e1 f2 45 93 ad |].%.L..@+....E..|
00000160 d6 cc 15 96 78 11 11 7f 07 73 01 8b ff e4 b2 96 |....x....s......|
00000170 e6 9c 00 37 79 27 28 d6 01 fc 1a 35 47 4c 7d 50 |...7y'(....5GL}P|
00000180 b6 24 80 0d ec 69 db 0e 03 41 53 fc 62 c8 b1 ce |.$...i...AS.b...|
00000190 2b e2 3d 9d c9 e4 7a a1 3c 6a b8 32 7f fc dc 3a |+.=...z.<j.2...:|
000001a0 7e 35 99 d5 01 3c e9 3b 0e 83 ad b6 11 01 ae 47 |~5...<.;.......G|
000001b0 f8 3a 39 47 8b 1c 7d ec 28 00 5e 07 62 d6 00 ef |.:9G..}.(.^.b...|
000001c0 ff ff 07 ef ff ff 12 5f 35 02 f0 b8 9c 0d 00 ef |......._5.......|
000001d0 ff ff 05 ef ff ff 01 00 00 00 01 58 35 02 00 00 |...........X5...|
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

drs305
November 13th, 2010, 06:55 AM
Turn off memtest86+ if you haven't already to hide the memtest86+ entry.
Turn off 30_os-prober, which is the file that would normally find Windows and extra Ubuntu installations.
Make sure /etc/grub.d/40_custom is executable.


sudo chmod -x /etc/grub.d/20_memtest86+ /etc/grub.d/30_os-prober
sudo chmod +x /etc/grub.d/40_custom


Open /etc/grub.d/40_custom (and /etc/default/grub) for editing:

gksu gedit /etc/grub.d/40_custom /etc/default/grub

Replace the entire contents of 40_custom with this:


#!/bin/sh
echo "Adding 40_custom." >&2
exec tail -n +3 $0
# 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.

menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 246ad31e6ad2eb94
chainloader +1
}



Save the file. If you would like to have the Windows entry first, rename 40_custom to 06_custom. You can change the title (between the quotes on the first line) to anything you wish displayed.

If desired, you can remove the Recovery mode option from displaying in the menu as well. Although I would recommend new users keep the recovery option available, if you would rather not see it, edit /etc/default/grub (it should already be open from the previous command) and remove the comment (#) symbol from this line:

GRUB_DISABLE_LINUX_RECOVERY="true"

Update Grub to incorporate the changes:

sudo update-grub


Even though Grub 2 doesn't yet have advanced theming, you can add a background fairly simply. Here is a link describing the process (all you have to do is change one entry in one file to point to the image you wish to use):
https://help.ubuntu.com/community/Grub2#GRUB%202%20Splash%20Images

dumble
November 13th, 2010, 02:08 PM
Thanks drs305! It definitely looks better now. Now i have the folowing boot entries:

Ubuntu
Ubuntu recovery
Windows 7


Still I have one question, when I choose for Windows7 I first go to a different screen (windows boot loader). Is it possible to configure that Windows7 starts directly if I click Windows7 in the grub2 bootloader? I think I have to remove the windows boot loader or something?

drs305
November 13th, 2010, 03:35 PM
Still I have one question, when I choose for Windows7 I first go to a different screen (windows boot loader). Is it possible to configure that Windows7 starts directly if I click Windows7 in the grub2 bootloader? I think I have to remove the windows boot loader or something?

At that point Grub2 has passed control over to Windows. I believe it's a matter of editing the Windows boot.ini file but I've not used Vista/W7. You will have to search for the answer or wait for a Windows user who can give you more specific instructions to answer that question.