LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2011, 09:32 PM   #16
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247

The first link you posted in post #4 was for Ubuntu 8.04 and Grub Legacy. Since you are using Ubuntu 11.04 and Grub2 it is not applicable. The info posted by saikee should work and the entry should be set default="5" if your windows menuentry in grub.cfg is actually the sixth entry.

I edit the grub.cfg file frequently and do not run update-grub as I prefer to have control.

It might be a good idea to post your actual partition information and the grub.cfg file. You can get the partition info by entering the following in a terminal: sudo fdisk -l (lower case Letter L in the command).
 
Old 09-06-2011, 09:49 PM   #17
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
The first link you posted in post #4 was for Ubuntu 8.04 and Grub Legacy. Since you are using Ubuntu 11.04 and Grub2 it is not applicable. The info posted by saikee should work and the entry should be set default="5" if your windows menuentry in grub.cfg is actually the sixth entry.

I edit the grub.cfg file frequently and do not run update-grub as I prefer to have control.

It might be a good idea to post your actual partition information and the grub.cfg file. You can get the partition info by entering the following in a terminal: sudo fdisk -l (lower case Letter L in the command).
Here is what the partition info says...

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf1494ba6

Device Boot Start End Blocks Id System
/dev/sda1 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 13 106446 854921074 7 HPFS/NTFS
/dev/sda3 106446 121602 121737217 5 Extended
/dev/sda5 106446 120981 116748288 83 Linux
/dev/sda6 120981 121602 4987904 82 Linux swap / Solaris

and here is what the /boot/grub/grub.cfg file says...

#
# 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="6"
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 75b38db8-26a2-45e3-bf8b-eb7a0f962f7e
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 75b38db8-26a2-45e3-bf8b-eb7a0f962f7e
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 75b38db8-26a2-45e3-bf8b-eb7a0f962f7e
linux /boot/vmlinuz-2.6.38-11-generic root=UUID=75b38db8-26a2-45e3-bf8b-eb7a0f962f7e ro vga=771 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 75b38db8-26a2-45e3-bf8b-eb7a0f962f7e
echo 'Loading Linux 2.6.38-11-generic ...'
linux /boot/vmlinuz-2.6.38-11-generic root=UUID=75b38db8-26a2-45e3-bf8b-eb7a0f962f7e ro single vga=771
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-11-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.35-22-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 75b38db8-26a2-45e3-bf8b-eb7a0f962f7e
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=75b38db8-26a2-45e3-bf8b-eb7a0f962f7e ro vga=771 quiet splash vt.handoff=7
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
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 75b38db8-26a2-45e3-bf8b-eb7a0f962f7e
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=75b38db8-26a2-45e3-bf8b-eb7a0f962f7e ro single vga=771
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='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 75b38db8-26a2-45e3-bf8b-eb7a0f962f7e
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 75b38db8-26a2-45e3-bf8b-eb7a0f962f7e
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/sda2)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set=root 9C4C33D84C33ABC0
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 ###

Thanks
 
Old 09-06-2011, 10:15 PM   #18
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Here's what my grub splash screen looks like

http://i115.photobucket.com/albums/n...ojunk/grub.jpg
 
Old 09-07-2011, 02:09 AM   #19
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
OK there may be part of grub.cfg further down doing something.

I suggest you save the current grub.cfg using another name as a backup.

You then put the "#" in front of every line until you hit the first "menuentry" statement. You therefore effectively disable both default and timeout statements two leaving you indefinite time to boot any system. If this works as expected you then enable only the default statement with or without the timeout statement.

I dislike Ubuntu's messing around excessively Grub as it prolong the booting significantly and had the section above the first menuentry removed like below:
Code:
menuentry 'Ubuntu in sda4' {
	set root='(hd0,4)'

	linux	/boot/vmlinuz-2.6.32-33-generic-pae root=/dev/sda4 ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-33-generic-pae
}

menuentry 'Ubuntu, with Linux 2.6.32-33-generic-pae in sda16' {
	recordfail
	insmod ext2
	set root='(hd0,16)'
	search --no-floppy --fs-uuid --set 74ff1211-7eba-44c4-a5ed-b13e7ca4ed47
	linux	/boot/vmlinuz-2.6.32-33-generic-pae root=UUID=74ff1211-7eba-44c4-a5ed-b13e7ca4ed47 ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-33-generic-pae
}

menuentry "Windows 7 (loader) (on /dev/sda1)" {
	insmod fat
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 4485-0d05
	chainloader +1
}

menuentry "Fedora (2.6.27.15-170.2.24.fc10.x86_64) (on /dev/sda11)" {
	insmod ext2
	set root='(hd0,11)'
	chainloader +1
}
.
etc
etc
I ran several version of Ubuntu and can confirm altering the default work well in my case.

Last edited by saikee; 09-07-2011 at 02:10 AM.
 
Old 09-07-2011, 05:27 AM   #20
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
I ran several version of Ubuntu and can confirm altering the default work well in my case.
I agree and made mine boot from its own partition with a custom made grub.cfg. I also disabled os-prober and the update which it being in its own partition I should not have to worry about.

I am confused, did you alter or disable anything in grub before trying saikee's suggestions. It sounds like you have a "crippled grub" and may be easier to reinstall from live cd.

Last edited by Larry Webb; 09-07-2011 at 05:33 AM.
 
Old 09-07-2011, 08:39 AM   #21
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Larry Webb View Post
I agree and made mine boot from its own partition with a custom made grub.cfg. I also disabled os-prober and the update which it being in its own partition I should not have to worry about.

I am confused, did you alter or disable anything in grub before trying saikee's suggestions. It sounds like you have a "crippled grub" and may be easier to reinstall from live cd.
Hmmm, fresh install will reformat the partition and remove any offending script, right? I do have 10.10 on a live CD already. That's what I originally loaded and then it updated to 11.04. Would I be better off with 10.10 or should I create a new 11.04 live CD? And Larry, as far as I know, I did run the startupmanager app which I later found out must be outdated for the distro that I have. Maybe that junked something up? Maybe fresh install will give me a clean slate.
 
Old 09-07-2011, 10:46 AM   #22
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Quote:
Hmmm, fresh install will reformat the partition and remove any offending script, right?
You should have the option during the install to format the current Ubuntu partition and install to the same partition. Make note of which partition it is, currently sda5.

Ubuntu 11.04 uses the Unity Desktop interface which is new with this distribution. If you haven't used Ubuntu before, you won't need to relearn so it's just a matter of choice as to 10.10 or 11.04. I've never used the startup manager in Ubuntu so that may well have been the source of your problems. Good Luck with it.
 
Old 09-07-2011, 11:08 AM   #23
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
You should have the option during the install to format the current Ubuntu partition and install to the same partition. Make note of which partition it is, currently sda5.

Ubuntu 11.04 uses the Unity Desktop interface which is new with this distribution. If you haven't used Ubuntu before, you won't need to relearn so it's just a matter of choice as to 10.10 or 11.04. I've never used the startup manager in Ubuntu so that may well have been the source of your problems. Good Luck with it.
Thanks, I have 10.10 on a little netbook that I have used, but my depth of knowledge is not great in Ubuntu commands etc...Still trying to feel my way down the hall in the dark without tripping over the dog, etc 8-)
However I did like the system setting view feature better on 11.04. I will create a new live cd for that distro.
I'll try a re-install with formatting the partition and then maybe you guys could let me know what to do before I break it again :-D
Thanks for bearing with me...
 
Old 09-07-2011, 11:40 AM   #24
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
You will not need to install the whole os, I was referring to installing grub from your live cd.

Of course you could reinstall your ubuntu.
 
Old 09-07-2011, 12:27 PM   #25
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
If I were to do a new complete install, any recommendations of the 64bit over the 32bit? Thanks
 
Old 09-07-2011, 01:28 PM   #26
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
I use all 32 bit but that is my preference, I do not do a lot of video auditing or large file transfers so the 32 bit is just as fast for me as the 64 bit would be on most apps.
 
Old 09-10-2011, 01:23 PM   #27
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Well, I found a solution to my problem, but sadly it was not linux based. I simply installed a Windows program called EasyBCD and it was much easier to work with. That boot loader starts first and let me easily select my default os... Windows 1, Ubuntu Nill
:-(
 
Old 09-10-2011, 01:58 PM   #28
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Good, please mark as solved if you now have no more boot issues.
 
Old 09-10-2011, 02:06 PM   #29
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
Quote:
Originally Posted by yancek View Post
The first link you posted in post #4 was for Ubuntu 8.04 and Grub Legacy. Since you are using Ubuntu 11.04 and Grub2 it is not applicable. The info posted by saikee should work and the entry should be set default="5" if your windows menuentry in grub.cfg is actually the sixth entry.

I edit the grub.cfg file frequently and do not run update-grub as I prefer to have control.

It might be a good idea to post your actual partition information and the grub.cfg file. You can get the partition info by entering the following in a terminal: sudo fdisk -l (lower case Letter L in the command).
Absolutely. There is rarely a reason to run update-grub. If we were talking about LILO than we would be running the lilo command after every modification.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Messed UP Boot Order on dual-boot, don't know GRUB2, need help -- another's PC hilyard Linux - Newbie 4 06-25-2011 01:57 AM
[SOLVED] Don't know what to do!! Help with dual boot problems please. HazMat117 Linux - Desktop 5 04-26-2008 10:42 PM
don't want to dual boot any long... how do I get back to just windows ? brjoon1021 Linux - Newbie 6 02-26-2008 06:40 AM
Dual boot with Linux, need help! so i don't loose orginal windoz mr_coffee Linux - Newbie 13 01-05-2006 05:09 PM
Why don't more people use IDE swap kits instead of dual boot? shivandeveloper Linux - Newbie 16 12-04-2003 05:19 PM


All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration