LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   no grub/defaults/grub to edit on triole-boot system (http://www.linuxquestions.org/questions/linux-software-2/no-grub-defaults-grub-to-edit-on-triole-boot-system-839708/)

EDDY1 10-22-2010 03:03 AM

no grub/defaults/grub to edit on triole-boot system
 
Triple-boot system can't find grub/defaults/grub file. debian lenny on hda2, winsxp hda3, ubuntu10.10 hdb2. All 3 accessible(working). I had to reinstall all Oses, winsxp 2nd after installing Ubuntu this time Grub2 detected and has each os running. I've so far looked at the Debian grubmenu.lst which shows that winsxp is listed but not Ubuntu even though I can boot Ubuntu. I'm sure that grub2 is in control because at boot it shows grub 1.98 also the os selection looks like the 1 in grub2

I examined my partitions using gparted it shows that winsxp is labeled as boot lba. That was sda3.

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.

yancek 10-22-2010 11:10 AM

According to this site, Grub Legacy is the default bootloader for Debian Lenny:

http://grub.enbug.org/Debian

Quote:

I'm sure that grub2 is in control because at boot it shows grub 1.98 also the os selection looks like the 1 in grub2
That should be the Ubuntu Grub2.

Quote:

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.
If it is working with Ubuntu Grub2, there is no reason to change?

[QUOTE]3. Is there a way to enable grub legacy and add Ubuntu entries to it?[QUOTE]

Yes. See this site, Section 5.B. Again, if it is working with Grub2 in Ubuntu, no reason to change:
http://www.dedoimedo.com/computers/g...mozTocId982259

I don't believe changing the boot flag on the Debian parition will do much.

Quote:

Why can't I see default grub file on this installation of Ubuntu?
Which file? Post the ouput of ls /boot/grub

EDDY1 10-22-2010 11:39 AM

I don't know if this 1 is the 1 you want but this is what I get. This 1 is from the Ubuntu term.

PHP Code:

root@jchrisen2-xxxxxxxxxxxxxx:/home/jchrisen2# ls /boot/grub
915resolution.mod  cs5536.mod                   gcry_sha1.mod       load.cfg        parttool.lst         terminal.mod
acpi
.mod           datehook.mod                 gcry_sha256.mod     loadenv.mod     parttool.mod         terminfo.mod
affs
.mod           date.mod                     gcry_sha512.mod     locale          password.mod         test.mod
afs_be
.mod         datetime.mod                 gcry_tiger.mod      loopback.mod    password_pbkdf2.mod  tga.mod
afs
.mod            diskboot.img                 gcry_twofish.mod    lsmmap.mod      pbkdf2.mod           trig.mod
aout
.mod           dm_nv.mod                    gcry_whirlpool.mod  ls.mod          pci.mod              true.mod
ata
.mod            drivemap.mod                 gettext.mod         lspci.mod       play.mod             udf.mod
ata_pthru
.mod      echo.mod                     gfxmenu.mod         lvm.mod         png.mod              ufs1.mod
at_keyboard
.mod    efiemu32.o                   gfxterm.mod         mdraid.mod      probe.mod            ufs2.mod
befs_be
.mod        efiemu64.o                   gptsync.mod         memdisk.mod     pxeboot.img          uhci.mod
befs
.mod           efiemu.mod                   grldr.img           memrw.mod       pxecmd.mod           usb_keyboard.mod
biosdisk
.mod       elf.mod                      grub.cfg            minicmd.mod     pxe.mod              usb.mod
bitmap
.mod         example_functional_test.mod  grubenv             minix.mod       raid5rec.mod         usbms.mod
bitmap_scale
.mod   ext2.mod                     gzio.mod            mmap.mod        raid6rec.mod         usbtest.mod
blocklist
.mod      extcmd.mod                   halt.mod            moddep.lst      raid.mod             vbeinfo.mod
boot
.img           fat.mod                      handler.lst         msdospart.mod   read.mod             vbe.mod
boot
.mod           font.mod                     hashsum.mod         multiboot2.mod  reboot.mod           vbetest.mod
bsd
.mod            fshelp.mod                   hdparm.mod          multiboot.mod   regexp.mod           vga.mod
bufio
.mod          fs.lst                       hello.mod           nilfs2.mod      reiserfs.mod         vga_text.mod
cat
.mod            functional_test.mod          help.mod            normal.mod      relocator.mod        video_bochs.mod
cdboot
.img         gcry_arcfour.mod             hexdump.mod         ntfscomp.mod    scsi.mod             video_cirrus.mod
chain
.mod          gcry_blowfish.mod            hfs.mod             ntfs.mod        search_fs_file.mod   video_fb.mod
cmostest
.mod       gcry_camellia.mod            hfsplus.mod         ohci.mod        search_fs_uuid.mod   video.lst
cmp
.mod            gcry_cast5.mod               iorw.mod            part_acorn.mod  search_label.mod     video.mod
command
.lst        gcry_crc.mod                 iso9660.mod         part_amiga.mod  search.mod           videotest.mod
configfile
.mod     gcry_des.mod                 jfs.mod             part_apple.mod  serial.mod           xfs.mod
core
.img           gcry_md4.mod                 jpeg.mod            part_bsd.mod    setjmp.mod           xnu.mod
cpio
.mod           gcry_md5.mod                 kernel.img          part_gpt.mod    setpci.mod           xnu_uuid.mod
cpuid
.mod          gcry_rfc2268.mod             keystatus.mod       partmap.lst     sfs.mod              zfsinfo.mod
crc
.mod            gcry_rijndael.mod            linux16.mod         part_msdos.mod  sleep.mod            zfs.mod
crypto
.lst         gcry_seed.mod                linux.mod           part_sun.mod    tar.mod
crypto
.mod         gcry_serpent.mod             lnxboot.img         part_sunpc.mod  terminal.lst 


EDDY1 10-22-2010 11:53 AM

Here is the output from debian

debianjchrisen1:/home/jerome# ls /boot/grub
default fat_stage1_5 menu.lst~ stage1
device.map jfs_stage1_5 minix_stage1_5 stage2
e2fs_stage1_5 menu.lst reiserfs_stage1_5 xfs_stage1_5

EDDY1 10-22-2010 07:38 PM

Thank you Yancek for putting me back on track, I don't think I spent enough time reading that article.

http://www.dedoimedo.com/computers/g...mozTocId982259
It has been suggested in prev posts, I obviously haven't done all my homework. I'll post my results as soon as I get it taken care of.

yancek 10-22-2010 11:33 PM

That's an awful lot of files in the Ubuntu /boot/grub directory! Guess it's right, you do have a grub.cfg file there. I haven't used Grub2 so I have nothing to compare it to. From what I have read about Grub2, it seems it would be easier to boot a Grub Legacy system from Grub2 than the reverse. At least you are able to boot your systems. Good luck with everything.

EDDY1 10-23-2010 12:14 AM

I think that I've found the file that I've been looking for in /boot/grub/grub.cfg

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 7fe3df2a-5ee2-468a-a97d-e8f777b34c3f
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 7fe3df2a-5ee2-468a-a97d-e8f777b34c3f
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 7fe3df2a-5ee2-468a-a97d-e8f777b34c3f
    linux    
/boot/vmlinuz-2.6.35-22-generic root=UUID=7fe3df2a-5ee2-468a-a97d-e8f777b34c3f 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 7fe3df2a-5ee2-468a-a97d-e8f777b34c3f
    
echo    'Loading Linux 2.6.35-22-generic ...'
    
linux    /boot/vmlinuz-2.6.35-22-generic root=UUID=7fe3df2a-5ee2-468a-a97d-e8f777b34c3f 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 7fe3df2a-5ee2-468a-a97d-e8f777b34c3f
    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 7fe3df2a-5ee2-468a-a97d-e8f777b34c3f
    linux16    
/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Debian GNU/Linux, kernel 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=/dev/hda1 ro
    initrd 
/boot/initrd.img-2.6.26-2-686
}
menuentry "Debian GNU/Linux, kernel 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=/dev/hda1 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 ### 

This file shows all 3 o.s.
I don't think that I really need to keep grub-legacy, being that grub2 can detect all operating systems,
but I do want to try and cofigure it just 2 say I can do it.

So I will be trying to restore grub-legacy and making the link to grub2.
What do I need to adjust on this installation so I don't have to scroll to view my post?
It's obviously this browser, I'm using same computer different o.s if that helps.

Larry Webb 10-23-2010 05:46 AM

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,

EDDY1 10-23-2010 05:55 AM

I know it doesn't just have to know how to do it.

Larry Webb 10-23-2010 07:07 AM

Here is a good tutorial on grub2 that I used and still refer to. Pay attention to Reinstalling grub2 from live cd. You will have to use your ubuntu disc as live cd.

grub2 tutorial

I am no authority but will try and help.

EDDY1 10-23-2010 08:11 AM

Thank You Larry that 1 is 1 I didn't have a bookmark on. Very useful, along with the totorials at the dedoimedo site.

Larry Webb 10-23-2010 10:50 AM

Try to restore grub2 as explained by using a live cd. If you run into problems try and remember what you tried and any errors or what did not work.

EDDY1 10-24-2010 03:35 AM

Okay I ended-up installing grub2 all together. I also had to change my Debian lenny kernel because
it didn't have support fort ext4 fs. I wasn't aware that grub2 changes the drive letters. In fact
I was sure that the ide drives were still listed as hdX. You learn something new everyday.
And Thanks for the info Larry and Yancek.

To my fellow newbies using cd to recover, look in the examples file. It's all there.

Larry Webb 10-24-2010 06:43 AM

If solved please use Thread Tools button at top and mark Solved

EDDY1 10-24-2010 03:21 PM

Sorry Larry I haven't completed this task yet. As soon as I have my grub completely configured,
I shall mark as solved.


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