LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-28-2010, 02:09 AM   #16
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649

Thank You Larry for all of your info, at the time I didn't know which grub was default, now I do.
I had lost my Grub in Ubuntu. Was trying to recover without reinstalling os. I ended-up reinstalling Ubuntu
upgrading kernel in Debian so as to be able to read Ubuntu's fs.

This is my grub conf:

PHP Code:
#
# 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 [ -
"${boot_once}]; then
    saved_entry
="${chosen}"
    
save_env saved_entry
  fi
}

function 
recordfail {
  
set recordfail=1
  
if [ -"${have_grubenv}]; then if [ -"${boot_once}]; then save_env recordfailfifi
}

function 
load_video {
  
insmod vbe
  insmod vga
}

insmod part_msdos
insmod ext2
set root
='(hd1,msdos1)'
search --no-floppy --fs-uuid --set 95e3847b-3b31-4577-9055-e04187ce5e51
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,msdos1)'
search --no-floppy --fs-uuid --set 95e3847b-3b31-4577-9055-e04187ce5e51
set locale_dir
=($root)/boot/grub/locale
set lang
=en
insmod gettext
if [ "${recordfail}]; 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,msdos1)'
    
search --no-floppy --fs-uuid --set 95e3847b-3b31-4577-9055-e04187ce5e51
    linux    
/boot/vmlinuz-2.6.35-22-generic root=UUID=95e3847b-3b31-4577-9055-e04187ce5e51 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,msdos1)'
    
search --no-floppy --fs-uuid --set 95e3847b-3b31-4577-9055-e04187ce5e51
    
echo    'Loading Linux 2.6.35-22-generic ...'
    
linux    /boot/vmlinuz-2.6.35-22-generic root=UUID=95e3847b-3b31-4577-9055-e04187ce5e51 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,msdos1)'
    
search --no-floppy --fs-uuid --set 95e3847b-3b31-4577-9055-e04187ce5e51
    linux16    
/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    
insmod part_msdos
    insmod ext2
    set root
='(hd1,msdos1)'
    
search --no-floppy --fs-uuid --set 95e3847b-3b31-4577-9055-e04187ce5e51
    linux16    
/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Debian GNU/Linux, linux 2.6.32-bpo.5-686 (on /dev/sda1)" {
    
insmod part_msdos
    insmod ext2
    set root
='(hd0,msdos1)'
    
search --no-floppy --fs-uuid --set 5c1d78f5-f165-441f-ba75-94b30cdd4a38
    linux 
/boot/vmlinuz-2.6.32-bpo.5-686 root=UUID=5c1d78f5-f165-441f-ba75-94b30cdd4a38 ro
    initrd 
/boot/initrd.img-2.6.32-bpo.5-686
}
menuentry "Debian GNU/Linux, linux 2.6.32-bpo.5-686 (single-user mode) (on /dev/sda1)" {
    
insmod part_msdos
    insmod ext2
    set root
='(hd0,msdos1)'
    
search --no-floppy --fs-uuid --set 5c1d78f5-f165-441f-ba75-94b30cdd4a38
    linux 
/boot/vmlinuz-2.6.32-bpo.5-686 root=UUID=5c1d78f5-f165-441f-ba75-94b30cdd4a38 ro single
    initrd 
/boot/initrd.img-2.6.32-bpo.5-686
}
menuentry "Debian GNU/Linux, linux 2.6.26-2-686 (on /dev/sda1)" {
    
insmod part_msdos
    insmod ext2
    set root
='(hd0,msdos1)'
    
search --no-floppy --fs-uuid --set 5c1d78f5-f165-441f-ba75-94b30cdd4a38
    linux 
/boot/vmlinuz-2.6.26-2-686 root=UUID=5c1d78f5-f165-441f-ba75-94b30cdd4a38 ro
    initrd 
/boot/initrd.img-2.6.26-2-686
}
menuentry "Debian GNU/Linux, linux 2.6.26-2-686 (single-user mode) (on /dev/sda1)" {
    
insmod part_msdos
    insmod ext2
    set root
='(hd0,msdos1)'
    
search --no-floppy --fs-uuid --set 5c1d78f5-f165-441f-ba75-94b30cdd4a38
    linux 
/boot/vmlinuz-2.6.26-2-686 root=UUID=5c1d78f5-f165-441f-ba75-94b30cdd4a38 ro single
    initrd 
/boot/initrd.img-2.6.26-2-686
}
menuentry "Microsoft Windows XP Professional (on /dev/sda3)" {
    
insmod part_msdos
    insmod fat
    set root
='(hd0,msdos3)'
    
search --no-floppy --fs-uuid --set 588c-308a
    drivemap 
-(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 ### 
What I really want to learn is to be able to control or restore grub without reinstalling the os.
I guess that will be right after I get the ins and outs of the existing grub.

Last edited by EDDY1; 10-28-2010 at 02:22 AM.
 
Old 10-28-2010, 06:07 AM   #17
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 am still working on mine when I have time.
 
Old 10-28-2010, 08:14 PM   #18
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
This is an after-thought, could I have used os-prober and update-grub from the cd and not have had to reinstall os?
 
Old 10-31-2010, 06:25 AM   #19
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

lets re-visit original requests

Quote:
1. There's grub legacy in debian, ? in winsxp, grub2 in Ubuntu. where did grub2 go? It's menu is not in debian.
2. How do I find it or should I just change the grub that is within Debian to Grub2 & make it the system default and it's at the beginning of the system.

At the time of Ubuntu installation I didn't have access to Debian, due to wins install. So wins partition had boot flag.

3. Is there a way to enable grub legacy and add Ubuntu entries to it?
4. Is it as easy as changing the boot flags to Grub in Debian partition at beginning of hda?
5. Why can't I see default grub file on this installation of Ubuntu?
On this 1 as well as the other I have root login and can't see it.
ok so you now know if grub2 is installed and controlling your MBR its config file is called grub.cfg....good solved

2 You can convert back to grub-legacy if you wish....optional stil open

3) So in your preferred linux partition...download grub and install it to MBR and create entries for menu.lst

I assume you are familar with grub-legacy?

4) bootable flag is something windows needs and should be set only once per drive IMHO and you appear to have 2 drives?

so now my questions

A) have you done a speed test on drive 1 versus 2?

If drive 2 is fastest make that the first bootable drive and re-do grub legacy or grub2 to its MBR

B) you can have grub-legacy in MBR with its booting files controlling your menu and chainload to grub2 on some other partition....or have grub2 in MBR with its booting files chainloading to grub-legacy or
one grub or one grub2.....controlling the lot

Do you understand?

good luck
 
Old 10-31-2010, 06:54 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
I have noticed grub2 takes at least two times as long to load as grub legacy so if speed is a priority use legacy on your fastest drive with Debain and chainload ubuntu.
 
Old 10-31-2010, 01:21 PM   #21
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
Quote:
Grub legacy can not read ext4 file system of ubuntu. I gave up and went to grub2. The thing I dis like is grub2 is more complicated than legacy
Older versions of grub legacy can not read ext4. However the one in Ubuntu since about Jaunty can. The one in Fedora 13 can too, and can also boot btrfs, though to do this it has to be in a separate /boot partition.
As aus9 has pointed out, legacy and grub2 can chainload each other. For this to be possible, the boot loader - either one - has to be installed in the superblock of the root partition. I have found it easier to get grub 1 "legacy" into the superblock. With grub2 you have to use the --force option, and even then it hasn't always worked for me. So IMHO it's easiest to put grub 2 into the MBR, pointing to your "main" distribution (ie, let that distro install Grub2 to the MBR when you install), and for the others, don't let them overwrite the MBR; if they won't put grub x into the root partition, install without a boot loader, and manually install grub1 later. For chainloading you will need a file/etc/grub.d/xx_custom where xx is a two digit number, if it is below 30 then it will load before /etc/grub.d/30_os-prober, which is convenient.
The file should start like:
Quote:
#!/bin/sh
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 "Ubuntu 10.04 Lucid in sda1" {
set root=(hd0,1)
chainloader +1
}
menuentry "Xubuntu 9.10 in sda5" {
set root=(hd0,5)
chainloader +1
}
and continue for as many entries as you need.

Saikee's Just booting tips Never leave home without it!
There is also a thread on the Ubuntu forum for tweaking grub2, which is useful for getting rid of the verbiage.
 
Old 10-31-2010, 03:10 PM   #22
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Older versions of grub legacy can not read ext4. However the one in Ubuntu since about Jaunty can. The one in Fedora 13 can too, and can also boot btrfs, though to do this it has to be in a separate /boot partition.
I changed my 2.6.26 Debian kernel to a 2.6.32 kernel it can read ext4.

Quote:
A) have you done a speed test on drive 1 versus 2?

If drive 2 is fastest make that the first bootable drive and re-do grub legacy or grub2 to its MBR
I have not tested the speed of the drives, never even thought about it & I wasn't aware of speed test.


Quote:
Triple-boot system can't find grub/defaults/grub file. debian lenny on hda2, winsxp hda3, ubuntu10.10 hdb2
Since that day I've since found out that Debian sda1(hd0,1), winsxp sda2(hd0,2) Ubuntu desktop sdb1 (hd1,1) and added
Ubuntu server to sdb6(hd1,6). At the present time all of my os'es have their own grub with entries in the 1 on sdb1. Right now I'm quite comfortable with working with the grub and if lost I can find and almost positive that with a quick os-probe and update I can get access to all the other os'es.

Right now I'm working on getting Ubuntu to shutdown without pressing the button.

Impert thanks for the chainloading information, I still have more to learn on it but it's all helpful.

Larry I'm going to mark this 1 as solved, and to be continued on next thread when I get ready to install with 1 grub with multiple os'es.

Last edited by EDDY1; 10-31-2010 at 03:16 PM.
 
  


Reply

Tags
tripleboot


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
Edit Grub when XP install won't boot jhinds Linux - Newbie 16 04-06-2009 04:44 PM
boot from winxp cd...edit grub? timberwolf90 Linux - Newbie 8 10-28-2007 04:09 AM
Edit Grub to boot Windows hiieu Debian 10 05-27-2007 04:41 AM
Kind souls: help getting Mandriva install 2 boot? edit boot.ini/grub /boot device or NoMoreReinstallMS Linux - Newbie 1 08-09-2006 04:34 AM
how to edit grub.conf from grub shell during booting pashaikh Linux - Security 1 06-27-2006 05:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:23 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
Open Source Consulting | Domain Registration