Não é possível adicionar o Fedora 14 ao grub

5

Hoje eu instalei o Fedora 14 em uma partição diferente no mesmo disco rígido que o Ubuntu. Na instalação do Fedora 14, optei por não instalar o Boot-loader no MBR e, em vez disso, optei por instalá-lo na própria partição do Fedora, que está de acordo com o meu layout HD / sda3.

Após a instalação do Fedora 14 eu iniciei no Ubuntu e rodei

sudo update-grub
mas 'grub.cfg' não adiciona o Fedora 14 na lista do sistema operacional. Aqui está a saída do script boot-info.
                  Boot Info Script 0.60    from 17 May 2011


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

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos1)/boot/grub on this drive.

sda1: __________________________________________________________________________

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

sda2: __________________________________________________________________________

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

sda5: __________________________________________________________________________

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

sda3: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub Legacy
    Boot sector info:   Grub Legacy (v0.97) is installed in the boot sector 
                       of sda3 and looks at sector 49897340 on boot drive #1 
                       for the stage2 file.  A stage2 file is at this 
                       location on /dev/sda.  Stage2 looks on partition #3 
                       for /grub/grub.conf.
    Operating System:  
    Boot files:        /grub/menu.lst /grub/grub.conf

sda4: __________________________________________________________________________

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

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders, total 78165360 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    49,865,759    49,863,712  83 Linux
/dev/sda2          74,866,686    78,163,967     3,297,282   5 Extended
/dev/sda5          74,866,688    78,163,967     3,297,280  82 Linux swap / Solaris
/dev/sda3          49,866,752    50,890,751     1,024,000  83 Linux
/dev/sda4          50,890,752    74,864,639    23,973,888  8e Linux LVM


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        03e2a8da-171f-49e9-b24d-434e66cd1140   ext4       
/dev/sda3        dea81d77-a375-4d0e-954e-1829f6b91f10   ext4       
/dev/sda4        mzVoj0-GHJu-DJr4-0G2Y-SzZ0-LTfW-F01yf9 LVM2_member 
/dev/sda5        3e89ba8e-7754-4ee4-aca1-e2a82bffb7a7   swap       

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

Device           Mount_Point              Type       Options

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


=========================== sda1/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="2"
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,msdos1)'
search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
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='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
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-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,msdos1)'
    search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
    linux   /boot/vmlinuz-2.6.38-8-generic root=UUID=03e2a8da-171f-49e9-b24d-434e66cd1140 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,msdos1)'
    search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
    echo    'Loading Linux 2.6.38-8-generic ...'
    linux   /boot/vmlinuz-2.6.38-8-generic root=UUID=03e2a8da-171f-49e9-b24d-434e66cd1140 ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.38-8-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.35-28-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,msdos1)'
    search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
    linux   /boot/vmlinuz-2.6.35-28-generic root=UUID=03e2a8da-171f-49e9-b24d-434e66cd1140 ro   quiet splash vt.handoff=7
    initrd  /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-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,msdos1)'
    search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
    echo    'Loading Linux 2.6.35-28-generic ...'
    linux   /boot/vmlinuz-2.6.35-28-generic root=UUID=03e2a8da-171f-49e9-b24d-434e66cd1140 ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-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,msdos1)'
    search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
    linux   /boot/vmlinuz-2.6.32-21-generic root=UUID=03e2a8da-171f-49e9-b24d-434e66cd1140 ro   quiet splash vt.handoff=7
    initrd  /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-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,msdos1)'
    search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
    echo    'Loading Linux 2.6.32-21-generic ...'
    linux   /boot/vmlinuz-2.6.32-21-generic root=UUID=03e2a8da-171f-49e9-b24d-434e66cd1140 ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.32-21-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,msdos1)'
    search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
    linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos1)'
    search --no-floppy --fs-uuid --set=root 03e2a8da-171f-49e9-b24d-434e66cd1140
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### 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 ###
--------------------------------------------------------------------------------

=============================== sda1/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).
#
#                
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
# Commented out by Dropbox
# UUID=03e2a8da-171f-49e9-b24d-434e66cd1140 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=3e89ba8e-7754-4ee4-aca1-e2a82bffb7a7 none            swap    sw              0       0
UUID=03e2a8da-171f-49e9-b24d-434e66cd1140 / ext4 errors=remount-ro,user_xattr 0 1
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)

   0.065803528 = 0.070656000    boot/grub/core.img                             1
  21.263332367 = 22.831329280   boot/grub/grub.cfg                             1
   0.771381378 = 0.828264448    boot/initrd.img-2.6.31-wl                      1
   2.054199219 = 2.205679616    boot/initrd.img-2.6.32-21-generic              3
   2.893260956 = 3.106615296    boot/initrd.img-2.6.35-28-generic              2
   6.833232880 = 7.337127936    boot/initrd.img-2.6.38-8-generic               2
   1.772453308 = 1.903157248    boot/vmlinuz-2.6.32-21-generic                 2
   2.068012238 = 2.220511232    boot/vmlinuz-2.6.35-28-generic                 1
   5.532531738 = 5.940510720    boot/vmlinuz-2.6.38-8-generic                  1
   6.833232880 = 7.337127936    initrd.img                                     2
   2.893260956 = 3.106615296    initrd.img.old                                 2
   5.532531738 = 5.940510720    vmlinuz                                        1
   2.068012238 = 2.220511232    vmlinuz.old                                    1

============================= sda3/grub/grub.conf: =============================

--------------------------------------------------------------------------------
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,2)
#          kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda3
default=0
timeout=0
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.35.6-45.fc14.i686)
    root (hd0,2)
    kernel /vmlinuz-2.6.35.6-45.fc14.i686 ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
    initrd /initramfs-2.6.35.6-45.fc14.i686.img
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)

  23.792903900 = 25.547436032   grub/grub.conf                                 1
  23.792903900 = 25.547436032   grub/menu.lst                                  1
  23.793020248 = 25.547560960   grub/stage2                                    1
  23.817364693 = 25.573700608   initramfs-2.6.35.6-45.fc14.i686.img            2
  23.787566185 = 25.541704704   initrd-plymouth.img                            1
  23.791228294 = 25.545636864   vmlinuz-2.6.35.6-45.fc14.i686                  1

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda2

00000000  81 71 62 ff a1 94 89 ff  4d 43 3a ff fa f2 ec ff  |.qb.....MC:.....|
00000010  fb f6 f1 ff fc f8 f4 ff  fc f8 f4 ff fc f8 f4 ff  |................|
00000020  5d 56 50 ff a1 94 89 ff  81 70 62 ff 81 70 62 ff  |]VP......pb..pb.|
00000030  81 70 62 ff 81 70 62 ff  81 70 62 ff a1 94 89 ff  |.pb..pb..pb.....|
00000040  4d 43 3a ff fa f2 ec ff  fb f6 f1 ff fc f8 f4 ff  |MC:.............|
00000050  fc f8 f4 ff fc f8 f4 ff  5d 56 50 ff a1 94 89 ff  |........]VP.....|
00000060  81 70 62 ff 81 70 62 ff  81 70 62 ff 81 70 62 ff  |.pb..pb..pb..pb.|
00000070  81 70 62 ff a1 94 89 ff  4d 43 3a ff fa f2 ec ff  |.pb.....MC:.....|
00000080  fb f6 f1 ff fc f8 f4 ff  fc f8 f4 ff fc f8 f4 ff  |................|
00000090  5d 56 50 ff a0 93 89 ff  80 6f 61 ff 80 6f 61 ff  |]VP......oa..oa.|
000000a0  80 6f 61 ff 80 6f 61 ff  80 6f 61 ff a0 93 89 ff  |.oa..oa..oa.....|
000000b0  4d 43 3a ff fa f2 ed ff  fb f6 f2 ff fc f8 f5 ff  |MC:.............|
000000c0  fc f8 f5 ff fc f8 f5 ff  5d 56 50 ff 9f 93 88 ff  |........]VP.....|
000000d0  7f 6f 60 ff 7f 6f 60 ff  7f 6f 60 ff 7f 6f 60 ff  |.o'..o'..o'..o'.|
000000e0  7f 6f 60 ff 9f 93 88 ff  4d 43 3a ff fa f2 ed ff  |.o'.....MC:.....|
000000f0  fb f6 f2 ff fc f8 f5 ff  fc f8 f5 ff fc f8 f5 ff  |................|
00000100  5d 56 50 ff 9f 93 88 ff  7f 6f 60 ff 7f 6f 60 ff  |]VP......o'..o'.|
00000110  7f 6f 60 ff 7f 6f 60 ff  7f 6f 60 ff 9f 93 88 ff  |.o'..o'..o'.....|
00000120  4d 43 3a ff fa f2 ed ff  fb f6 f2 ff fc f8 f5 ff  |MC:.............|
00000130  fc f8 f5 ff fc f8 f5 ff  5d 56 50 ff 9e 92 88 ff  |........]VP.....|
00000140  7e 6e 60 ff 7e 6e 60 ff  7e 6e 60 ff 7e 6e 60 ff  |~n'.~n'.~n'.~n'.|
00000150  7e 6e 60 ff 9e 92 88 ff  4d 43 3a ff fa f2 ed ff  |~n'.....MC:.....|
00000160  fb f6 f2 ff fc f8 f5 ff  fc f8 f5 ff fc f8 f5 ff  |................|
00000170  5d 56 50 ff 9e 92 88 ff  7d 6d 5f ff 7d 6d 5f ff  |]VP.....}m_.}m_.|
00000180  7d 6d 5f ff 7d 6d 5f ff  7d 6d 5f ff 9e 92 88 ff  |}m_.}m_.}m_.....|
00000190  4d 43 3a ff fa f2 ed ff  fb f6 f2 ff fc f8 f5 ff  |MC:.............|
000001a0  fc f8 f5 ff fc f8 f5 ff  5d 56 50 ff 9e 92 88 ff  |........]VP.....|
000001b0  7d 6d 5f ff 7d 6d 5f ff  7d 6d 5f ff 7d 6d 00 fe  |}m_.}m_.}m_.}m..|
000001c0  ff ff 82 fe ff ff 02 00  00 00 00 50 32 00 00 00  |...........P2...|
000001d0  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


=============================== StdErr Messages: ===============================

unlzma: Decoder error

De acordo com isto, o Fedora 14 é visível em sda3. Alguém sabe uma maneira de adicionar o Fedora 14 ao grub.cfg do Ubuntu para que eu possa escolher qual sistema operacional iniciar? Agradecemos antecipadamente.

    
por Dananjaya 25.06.2011 / 16:22

3 respostas

4

A maneira mais fácil de inicializar o Fedora é adicionar uma entrada no grub.cfg que a cadeia carregue na cópia do Grub do Fedora.

Crie um arquivo /etc/grub.d/15_fedora com o seguinte conteúdo:

#!/bin/sh
cat << \EOF
menuentry "Fedora" {
    set root=(hd0,3)
    chainloader +1
}
EOF

Torne o arquivo executável e, em seguida, gere novamente o arquivo de configuração do grub:

sudo chmod a+x /etc/grub.d/15_fedora
sudo update-grub

Isso deve garantir que a entrada do menu permaneça quando a configuração do Grub for regenerada.

    
por James Henstridge 25.06.2011 / 17:59
1

Você já tentou GUI do Grub-Customizer ; é realmente simples e varre a sua máquina para procurar outras instalações do SO quando você executa o programa.

Instalei recentemente o Fedora 15 juntamente com o Kubuntu 11.04 e o Windows 7; ao instalar, escolho não instalar o grub através do Fedora (nem no MBR nem na partição do Fedora). Eu reiniciei o Ubuntu e executei este programa para atualizar as entradas do menu do Grub. Até agora eu iniciei no Ubuntu e no Fedora (raramente uso mais o Windows 7, então ainda não testei essa entrada) e tudo funciona bem.

    
por 13east 25.06.2011 / 19:12
1

Eu entendo que o fedora é seu segundo sistema operacional. Pode ser que você tenha o seguinte problema:

Para fazer o grub reconhecer outros sistemas operacionais, o os-prober precisa ser instalado e o arquivo de configuração relacionado ao GRUB precisa estar presente e ser executável.

Certifique-se de ter o os-prober instalado: sudo apt-get instalar os-prober

Executando stat -c% A /etc/grub.d/30_os-prober deve dar -rwxr-xr-x. Se não for executável (ou seja, sem o x), torne-o executável executando: sudo chmod 755 /etc/grub.d/30_os-proberlinkeditflag respondeu 14 de maio às 14:10

Esta resposta foi fornecida por Lekensteyn 10.9k2133

    
por dago 25.06.2011 / 19:49