Автор Тема: Opensolaris <-> Linux Grub Error 13  (Прочетена 2875 пъти)

cdiem

  • Напреднали
  • *****
  • Публикации: 21
    • Профил
Opensolaris <-> Linux Grub Error 13
« -: Dec 30, 2008, 18:22 »
-------------------------------
Проблем: Дебиан не се зарежда, dual boot система.
-------------------------------
-------------------------------
Описание на проблема:
-------------------------------
Преди инсталиране на Opensolaris 2008.11 системата изглежда така:
/dev/sda1   /home   66GB
/dev/sda2   linux-swap  1GB
/dev/sda3   /    15 GB
/dev/sda4   ?    30 GB

/dev/sda1, /dev/sda2 и /dev/sda3 са Дебиан, на /dev/sda4 има Fedora. Федората се изтрива, и на нейно място се поставя Opensolaris. Opensolaris има проблеми ако като primary дял на диска има linux-swap, затова /dev/sda2 се превръща в NTFS дял по време на инсталацията на Opensolaris, и след това съответно се връща в предния си вид. След инсталацията Opensolaris бутва без проблеми - но Дебиан не. Инсталаторът на Opensolaris по някакъв начин променя дяловете, и на мястото на /dev/sda2 поставя /dev/sda3 и т.н. - по долу е 'fdisk -l'.

При опит за зареждане на Дебиан се получава Grub Error 13: "Invalid or unsupported executable format"

Реших да поставя boot флага на дяла с Дебиан - за целта заредих от Убунту 8.10 LiveCD. След поставяне на boot флаг на дяла с Дебиан се получаваше
Bad Pbr Sig
и след това съобщения:
----------------------------------------
Yukon PXE v. 4.17.8.1
PXE v.2.1
PXE-E61: Media
test failure check
PXE-MOF: Exiting PXE ROM
Operating System not fount
----------------------------------------
Същото се получаваше, ако в menu.lst на Opensolaris поставя 'makeactive' опитвайки се да заредя Дебиан. Затова върнах 'boot' флага обратно на дяла с Opensolaris, който се зарежда без проблем. Но Дебиан не се зарежда въобще.

-------------------------------
Още инфо
-------------------------------
1. Как Линукс вижда дисковете:
fdisk -l от LiveCD на Убунту:
Код:
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf6f6f6f6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        8625    69280281   83  Linux
/dev/sda2           12420       14469    16466625   83  Linux
/dev/sda3           14470       14593      996030   82  Linux swap / Solaris
/dev/sda4   *        8626       12419    30475305   bf  Solaris

Partition table entries are not in disk order

2. Как Соларис вижда дисковете:
format от LiveCD на Opensolaris:
Код:
format> current
Current Disk = c4t0d0
<ATA-WDCWD1200BEVS-0-6M01 cyl 122 alt 2 hd 255 sec 63>
/pci@0,0/pci1734,10c1@1f,2/disk@0,0

format> verify
Warning: Could not read backup labels.

Warning: Check the current partitioning and 'label' the disk or use the
'backup' command.

             Total disk size is 14593 cylinders
             Cylinder size is 16065 (512 byte) blocks

                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1                 Linux native      0  8624    8625     59
          2                 Linux native   12419  14468    2050     14
          3                 Solaris        14469  14592     124      1
          4       Active    Solaris2       8625  12418    3794     26
format> quit

3. В /boot/grub/menu.lst на Дебиан (монтирано от LiveCD на Убунту):
Код:
# 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 change this entry to 'saved' 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 5

# 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=/dev/sda3 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## 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=

## 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=(single-user) single
# altoptions=(single-user 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

## 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 Debian GNU/Linux, kernel 2.6.26-1-686
root (hd0,2)
kernel /boot/vmlinuz-2.6.26-1-686 root=/dev/sda3 ro
initrd /boot/initrd.img-2.6.26-1-686

title Debian GNU/Linux, kernel 2.6.26-1-686 (single-user mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.26-1-686 root=/dev/sda3 ro single
initrd /boot/initrd.img-2.6.26-1-686

title Debian GNU/Linux, kernel 2.6.25-2-686
root (hd0,2)
kernel /boot/vmlinuz-2.6.25-2-686 root=/dev/sda3 ro
initrd /boot/initrd.img-2.6.25-2-686

title Debian GNU/Linux, kernel 2.6.25-2-686 (single-user mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.25-2-686 root=/dev/sda3 ro single
initrd /boot/initrd.img-2.6.25-2-686

title Debian GNU/Linux, kernel 2.6.24-1-686
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-1-686 root=/dev/sda3 ro
initrd /boot/initrd.img-2.6.24-1-686

title Debian GNU/Linux, kernel 2.6.24-1-686 (single-user mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-1-686 root=/dev/sda3 ro single
initrd /boot/initrd.img-2.6.24-1-686

title Debian GNU/Linux, kernel 2.6.18-6-686
root (hd0,2)
kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/sda3 ro
initrd /boot/initrd.img-2.6.18-6-686

title Debian GNU/Linux, kernel 2.6.18-6-686 (single-user mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/sda3 ro single
initrd /boot/initrd.img-2.6.18-6-686

### END DEBIAN AUTOMAGIC KERNELS LIST

4. В /rpool/boot/grub/menu.lst на Opensolaris:

Код:
splashimage /boot/grub/splash.xpm.gz
background 215ECA
timeout 30
default 0
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title OpenSolaris 2008.11 snv_101b_rc2 X86
findroot (pool_rpool,3,a)
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
bootfs rpool/ROOT/opensolaris
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------

# Unknown partition of type 131 found on /dev/rdsk/c4t0d0p0 partition: 1
# It maps to the GRUB device: (hd0,0) .

# Unknown partition of type 131 found on /dev/rdsk/c4t0d0p0 partition: 2
# It maps to the GRUB device: (hd0,1) .

title Debian01
rootnoverify (hd0,1)
chainloader +1

title Debian00
rootnoverify (hd0,0)
chainloader +1

title Debian02
rootnoverify (hd0,2)
chainloader +1

title OpenSolaris 2008.11 snv_101b_rc2 X86 text boot
findroot (pool_rpool,3,a)
bootfs rpool/ROOT/opensolaris
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

-------------------------------
Какви още е правено по проблема
-------------------------------

Смяна на rootnoverify (hd0,1) с всякакви варианти - hd(0,1), hd0(0,1) и т.н. не помогна. Поставяне на 'makeactive' не помогна. Opensolaris зарежда, Debian - не. Не знам къде инсталира grub инсталационната програма на Opensolaris - дали в дяла, или на MBR. Идеите ми запонаха да свършват.

P.S. Моля администраторите да преместят темата, ако не е пусната в подходящия раздел. Мерси.
« Последна редакция: Dec 31, 2008, 10:50 от zeridon »
Активен

zeridon

  • Killmode enabled
  • Administrator
  • Напреднали
  • *****
  • Публикации: 1398
  • Distribution: Debian/Ubuntu
  • Window Manager: console/Gnome
  • BOfH
    • Профил
    • WWW
Re: Opensolaris <-> Linux Grub Error 13
« Отговор #1 -: Dec 30, 2008, 19:41 »
Първо не съм много в час със солариса за това съвета ми да се приема с прилична доза сол ...

Според мен най удачно е груба на солариса (понеже чете zfs) да се инсталира в MBR а груба на debian да се преинсталира в дяла.

След това да се нацъкат правилните партиции на дебиана в solaris-кия груб и да се използва chainloader +1 и rootnoverify.

Все пак най-добре е да се пита във форум специфициран за Соларис/Unix

Евентуално някой от BSD феновете може да помогне.
Активен

Внмимавай имам клещи за кабел
http://www.netsecad.com/
http://theregister.co.uk/odds/bofh/

cdiem

  • Напреднали
  • *****
  • Публикации: 21
    • Профил
Re: Opensolaris <-> Linux Grub Error 13
« Отговор #2 -: Dec 30, 2008, 20:34 »
Мерси все пак. Успях да го оправя. Не съм сигурен как да добавя <SOLVED> на темата.

Ето как се оправи ( с помощта на caljohnsmith от ubuntuforums.org ) :
със
--------------------------
title Debian
root (hd0,1)
configfile /boot/grub/menu.lst 
-------------------------
в /rpool/boot/grub/menu.lst на Opensolaris и
------------------------
title        Debian GNU/Linux, kernel 2.6.26-1-686
root        (hd0,1)
kernel        /boot/vmlinuz-2.6.26-1-686 root=/dev/sda2 ro
initrd        /boot/initrd.img-2.6.26-1-686

title        Debian GNU/Linux, kernel 2.6.26-1-686 (single-user mode)
root        (hd0,1)
kernel        /boot/vmlinuz-2.6.26-1-686 root=/dev/sda2 ro single
initrd        /boot/initrd.img-2.6.26-1-686 
-------------------------
в /boot/grub/menu.lst на Debian зареждаше без проблеми; т.е. зареждаше първия kernel от menu.lst на Дебиан. Явно инсталационната програма на Opensolaris е разместила имената на дяловете - /dev/sda2, /dev/sda3 и т.н.

За да зарежда grub на Дебиан след grub на Opensolaris:
направих setup на grub в (hd0,1)
grub
grub> root (hd0,1)
grub> setup (hd0,1)
grub> quit

и в /rpool/boot/grub/menu.lst на Opensolaris:
title Debian
rootnoverify (hd0,1)
chainloader +1

и вече работи. Темата може да бъде затворена.
Активен

Подобни теми
Заглавие Започната от Отговора Прегледи Последна публикация
Grub - error 18
Настройка на програми
Ivv 14 5126 Последна публикация Mar 30, 2006, 22:23
от GoodT
Grub error 22?
Настройка на програми
bauer 9 3717 Последна публикация Apr 19, 2006, 18:33
от Abyssos
Grub error 13
Кошче
basement 1 2553 Последна публикация Mar 19, 2008, 22:45
от neter
Grub error 17
Настройка на програми
completer 11 6478 Последна публикация Jun 11, 2008, 11:38
от completer
OpenSolaris и Linux - проблеми.
Настройка на програми
viv1111 12 4079 Последна публикация Jan 15, 2009, 13:46
от viv1111