Autor Tópico: Problema com o Grub!  (Lida 6178 vezes)

Offline Bhior

  • Usuário Ubuntu
  • *
  • Mensagens: 27
    • Ver perfil
Problema com o Grub!
« Online: 15 de Junho de 2009, 17:49 »
Bom pessoal, tenho dois HD´s um de 80gb que veio de fabrica (Primário) no qual uso o Ubuntu, e um de 160gb (slave).
Recentemente eu formatei o sleve, criei uma partição e de 30gb e instalei o Windows, e resolvi instalar o openSUSE numa partição de 130gb, onde na instalação criou uma partição de 20gb e uma de 110gb.
Como o HD primário e o de 80, o grub do Ubuntu não estar reconhecendo o openSUSE e reconhece o Windows normal.


Dados dos HD´s
Citar
Disco /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Disk identifier: 0xca0bca0b

Dispositivo Boot Início Fim Blocos Id Sistema
/dev/sda1   *           1        9355    75144006   83  Linux
/dev/sda2            9356        9729     3004155    5  Estendida
/dev/sda5            9356        9729     3004123+  82  Linux swap / Solaris

Disco /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Disk identifier: 0x54225422

Dispositivo Boot Início Fim Blocos Id Sistema
/dev/sdb1   *           1        3824    30716248+   7  HPFS ou NTFS
/dev/sdb2            3825       19457   125572072+   f  Win95 (LBA) Partição Extendida
/dev/sdb5            3825        4086     2104483+  82  Linux swap / Solaris
/dev/sdb6            4087        6697    20972826   83  Linux
/dev/sdb7            6698       19457   102494668+  83  Linux

O grub
Citar
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default      0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout      10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title      Windows 95/98/NT/2000
# root      (hd0,0)
# makeactive
# chainloader   +1
#
# title      Linux
# root      (hd0,1)
# kernel   /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=a1ef322f-bbcd-420a-81fc-53ca47edc716 ro locale=pt_BR

## default grub root device
## e.g. groot=(hd0,0)
# groot=a1ef322f-bbcd-420a-81fc-53ca47edc716

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title      Ubuntu 9.04, kernel 2.6.28-11-generic
uuid      a1ef322f-bbcd-420a-81fc-53ca47edc716
kernel      /boot/vmlinuz-2.6.28-11-generic root=UUID=a1ef322f-bbcd-420a-81fc-53ca47edc716 ro locale=pt_BR quiet splash
initrd      /boot/initrd.img-2.6.28-11-generic
quiet

title      Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid      a1ef322f-bbcd-420a-81fc-53ca47edc716
kernel      /boot/vmlinuz-2.6.28-11-generic root=UUID=a1ef322f-bbcd-420a-81fc-53ca47edc716 ro locale=pt_BR  single
initrd      /boot/initrd.img-2.6.28-11-generic

title      Ubuntu 9.04, memtest86+
uuid      a1ef322f-bbcd-420a-81fc-53ca47edc716
kernel      /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title      Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title      Microsoft Windows XP Professional
rootnoverify   (hd1,0)
savedefault
makeactive
map      (hd0) (hd1)
map      (hd1) (hd0)
chainloader   +1


Se alguem puder me ajudar como configurar o grub...
Desde já agradeço atenção...

Abraços

Offline coelhuturbo

  • Usuário Ubuntu
  • *
  • Mensagens: 68
    • Ver perfil
Re: Problema com o Grub!
« Resposta #1 Online: 15 de Junho de 2009, 19:50 »
Wow.. muito chato o Ubuntu não colocar logo o openSUSE.. falando nisto, qual versão do openSUSE?
Se ele também usava grub o Ubuntu reescreveu o dele.

Lá onde tem:
title      Ubuntu 9.04, kernel 2.6.28-11-generic
uuid      a1ef322f-bbcd-420a-81fc-53ca47edc716
kernel      /boot/vmlinuz-2.6.28-11-generic root=UUID=a1ef322f-bbcd-420a-81fc-53ca47edc716 ro locale=pt_BR quiet splash
initrd      /boot/initrd.img-2.6.28-11-generic
quiet


Precisa ter mais uma para o openSUSE, como eu não tenho aqui uma vou ficar acreditando que você conseguirá uma, a mais acima na organização do arquivo será a principal e que o grub iniciará automaticamente caso o usuário não se manifeste. A não ser que modifique aqui:

# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default      0
(o zero que é 'primeiro' por outro número)

Bom, então é isso.. falta uma configuração adicional para a opção do openSUSE aparecer no grub ou mesmo para que seja a escolha principal.. tem um LiveCD deste SO para procurar?

Offline jomafras

  • Usuário Ubuntu
  • *
  • Mensagens: 2.009
  • 17.04 Zesty Zapus
    • Ver perfil
Re: Problema com o Grub!
« Resposta #2 Online: 15 de Junho de 2009, 20:10 »
Está faltando mesmo a entrada do openSUSE no menu.lst do Ubuntu.
Vc pode entrar pelo Ubuntu, acessar a partição do openSUSE (/dev/sdb6 4087  6697 20972826   83  Linux - é essa não?), abrir o menu.lst
do openSUSE (/boot/grub/menu.lst), copiar a entrada dele e colar no menu.lst do Ubuntu.
O Ubuntu sem dúvida é a melhor Distro.
Pesquise primeiro... só depois abra um tópico.
Canal do YouTube - Blog

Offline Rsrocha

  • Usuário Ubuntu
  • *
  • Mensagens: 124
  • "O conhecimento só é útil se for compartilhado"
    • Ver perfil
Re: Problema com o Grub!
« Resposta #3 Online: 15 de Junho de 2009, 23:44 »

Offline Bhior

  • Usuário Ubuntu
  • *
  • Mensagens: 27
    • Ver perfil
Re: Problema com o Grub!
« Resposta #4 Online: 16 de Junho de 2009, 01:43 »
esse eo menu.lst do openSUSE 11.1

Citar
# Modified by YaST2. Last modification on Mon Jun 15 03:19:48 BRT 2009
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,5)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.1 - 2.6.27.23-0.1
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.27.23-0.1-default root=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part6 resume=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part5 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.27.23-0.1-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.1 - 2.6.27.23-0.1
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.27.23-0.1-default root=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part6 showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a
    initrd /boot/initrd-2.6.27.23-0.1-default

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    rootnoverify (hd0,0)
    chainloader +1

tentei colocar isso tudo ai no grub do ubuntu mais não deu certo...

Offline coelhuturbo

  • Usuário Ubuntu
  • *
  • Mensagens: 68
    • Ver perfil
Re: Problema com o Grub!
« Resposta #5 Online: 16 de Junho de 2009, 06:09 »
É esta parte aqui:

title openSUSE 11.1 - 2.6.27.23-0.1
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.27.23-0.1-default root=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part6 resume=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part5 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.27.23-0.1-default

É só encontrar onde ficam as outras do Ubuntu (Ubuntu, ubuntu safe, test-mem, Win) e adicionar.

Offline Rsrocha

  • Usuário Ubuntu
  • *
  • Mensagens: 124
  • "O conhecimento só é útil se for compartilhado"
    • Ver perfil
Re: Problema com o Grub!
« Resposta #6 Online: 16 de Junho de 2009, 11:30 »
Caro amigo Bhior, você vai ter que "armar" o boot corretamente, pois você deve ter salvo o grub do OpenSuse apenas na partição dele e este não está "sinalizado" no grub do Ubuntu. Como no tutorial que lhe indiquei e depois sim incluir o OpenSuse, mas apenas o nome e o root e o initrd, sem as outras opções, isto com o grub do "Ubuntu", mas se quiser o grub do "OpenSuse" faça o setup da partição hd1,3 primeiro e depois setup hd1.

Offline Bhior

  • Usuário Ubuntu
  • *
  • Mensagens: 27
    • Ver perfil
Re: Problema com o Grub!
« Resposta #7 Online: 16 de Junho de 2009, 13:03 »
Ainda não deu certo, tentei o que o coelhuturbo colocou, da erro na hora de entrar... erro 22

e no grub, quando dou o comando root (hd0,5) que e onde está o sopenSUSE da o mesmo erro 22

E complicado... :[

Offline jomafras

  • Usuário Ubuntu
  • *
  • Mensagens: 2.009
  • 17.04 Zesty Zapus
    • Ver perfil
Re: Problema com o Grub!
« Resposta #8 Online: 16 de Junho de 2009, 19:33 »
Tenta essa entrada :

title openSUSE 11.1 - 2.6.27.23-0.1
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.27.23-0.1-default root=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part6 resume=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part5 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.27.23-0.1-default
O Ubuntu sem dúvida é a melhor Distro.
Pesquise primeiro... só depois abra um tópico.
Canal do YouTube - Blog

Offline Rsrocha

  • Usuário Ubuntu
  • *
  • Mensagens: 124
  • "O conhecimento só é útil se for compartilhado"
    • Ver perfil
Re: Problema com o Grub!
« Resposta #9 Online: 17 de Junho de 2009, 00:55 »
Caro amigo, poste aqui no  forum o que está aparecendo depois que você executa os seguintes comandos:

Vá no terminal e digite "sudo grub" e enter
Depois vai ficar aparecendo o shell do grub "grub>" daí você executa o seguinte comando "grub> find /boot/grub/menu.lst". Poste aqui as roots que vão aparecer.
Para sair do "grub>" digite "quit".

Offline Rsrocha

  • Usuário Ubuntu
  • *
  • Mensagens: 124
  • "O conhecimento só é útil se for compartilhado"
    • Ver perfil
Re: Problema com o Grub!
« Resposta #10 Online: 17 de Junho de 2009, 01:08 »
Notei também que o amigo está um pouco equivocado quanto a disposição de suas partições, pois conforme você postou na pergunta, o seu HD de 80GB não possui a root hd0,5 pois possui apenas 3 partições. O OpenSuse pelo que está postado na sua pergunta está no hd1,3. Desculpe a insistência mas apenas editando o menu.lst você não vai conseguir usar 3 sistemas em 2 HDs. Este seu caso aconteceu comigo também e só resolvi como eu lhe indiquei no tutorial na minha primeira resposta.
« Última modificação: 17 de Junho de 2009, 01:13 por Rsrocha »

Offline Bhior

  • Usuário Ubuntu
  • *
  • Mensagens: 27
    • Ver perfil
Re: Problema com o Grub!
« Resposta #11 Online: 17 de Junho de 2009, 10:20 »
Depois que entro no grub:
grub> find /boot/grub/menu.lst
 (hd0,0)
 (hd1,5)

grub>
_________________

grub> root (hd1,5)

grub>
_________________
grub> root (hd1,5)

grub>
_________________
grub> root (hd1,5)
Error 12: Invalid device requested

grub>
_________________
grub> root (hd1,5)
Error 12: Invalid device requested

grub>


Vou continuar tentando....








Offline Bhior

  • Usuário Ubuntu
  • *
  • Mensagens: 27
    • Ver perfil
Re: Problema com o Grub!
« Resposta #12 Online: 17 de Junho de 2009, 10:55 »
Bom pessoal, acho que conseguir... to logado no openSUSE

tentei o tuto que o Rsrocha passou, deu uns erro, alguns deram certo e tal... ai fui reiniciar a maquina... ai deu erro não reconheçeu nem o ubuntu mais kkkkkkkkk... pensei deu derma agora hehehehe, so que lembrei du tudo dele e fiz em linha de comanda la mesmo.... reinicei apareceu como tava antigamente....
eu entrei no grub e editei assim: no final do grub do ubuntu

eu tinha colocado assim antes...
Citar
title openSUSE 11.1 - 2.6.27.23-0.1
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.27.23-0.1-default root=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part6 resume=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part5 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.27.23-0.1-default

organizei dessa forma:
Citar
title openSUSE 11.1 - 2.6.27.23-0.1
root               (hd1,5)
kernel            /boot/vmlinuz-2.6.27.23-0.1-default root=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part6 resume=/dev/disk/by-id/ata-MAXTOR_STM3160215A_6RA82E5B-part5 splash=silent showopts vga=0x31a
initrd             /boot/initrd-2.6.27.23-0.1-default

onde tava (hd0,5) coloquei assim (hd1,5) e salvei menu.lst hehehe...
agora to no SUSE

queria agradecer a atenção do brothers

Rsrocha, pintinho, coelhuturbo

Resolvido!!!

Abraços...
« Última modificação: 17 de Junho de 2009, 16:12 por Bhior »

Offline Rsrocha

  • Usuário Ubuntu
  • *
  • Mensagens: 124
  • "O conhecimento só é útil se for compartilhado"
    • Ver perfil
Re: Problema com o Grub!
« Resposta #13 Online: 17 de Junho de 2009, 11:58 »
Caro amigo Bhior que bom que ajudamos você, lembre-se sempre que o computador é apenas uma máquina que interpreta comandos e estes comandos funcionam conforme são ordenados pela  maneira que nós determinamos. Neste seu caso foi apenas mostrar ao grub onde estão as partições inicializáveis, no caso hd0,0 e hd1,5, notei também que você, se quiser é claro!, basta apenas entrar novamente no comando "grub" e fazer o setup do hd0,0 e depois setup hd0 para ser "usado" novamente o Ubuntu, e se você está com o grub do OpenSuse desta vez é só copiar as linhas do grub do Ubuntu e inclui-las no grub do OpenSuse. Se o se problema foi solucionado edite a sua pergunte e marque como resolvido. Abraço.