cdiem
December 30th, 2008, 12:40 PM
-------------------------------
Problem: Debian doesn't boot; the system is dual-bootable with Opensolaris.
-------------------------------
-------------------------------
Problem Description:
-------------------------------
Before installing Opensolaris 2008.11, the system looks this way:
/dev/sda1 /home 66GB
/dev/sda2 linux-swap 1GB
/dev/sda3 / 15 GB
/dev/sda4 ? 30 GB
/dev/sda1, /dev/sda2 and /dev/sda3 are Debian, on /dev/sda4 there is Fedora. The Fedora is deleted, and Opensolaris is installed instead. There are problems with Opensolaris if as a primary slice on the disk there is linux-swap, so following some advices over the internet, /dev/sda2 is turned into NTFS during the installation and is turned back to linux-swap after the installation completes. After the installation Opensolaris boots without problems - but Debian doesn't. The installer of Opensolaris somehow changes the slices, and instead of /dev/sda2 puts /dev/sda3 etc., - down here follows 'fdisk -l'.
When trying to load Debian this error comes: Grub Error 13: "Invalid or unsupported executable format"
With the help of a LiveCD of Ubuntu 8.10, I decided to set the 'boot' flag to the slice with Debian. After setting the boot flag on the slice with Debian (the 15 GB one), there was this:
Bad Pbr Sig
and this afterwards:
----------------------------------------
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
----------------------------------------
I was able to receive the same messages if I put 'makeactive' in the menu.lst of Opensolaris. So i turned back the 'boot' flag to the slice with Opensolaris, who now loads without any problems. But Debian doesn't load at all.
-------------------------------
Some more info
-------------------------------
1. How Linux sees the disk:
fdisk -l from the Ubuntu 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. How Solaris sees the disk:
'format' from the LiveCD of 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. What is in the /boot/grub/menu.lst of Debian (which was mounted with the Ubuntu's 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. What is in /rpool/boot/grub/menu.lst of 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
-------------------------------
What else was done in regards to the problem
-------------------------------
The change of rootnoverify (hd0,1) with all other variants: hd(0,1), hd0(0,1), etc. did not help. Putting 'makeactive' did not help. Opensolaris boots, Debian doesn't. I'm not quite sure where the installer of Opensolaris installs grub - whether in the slice for Opensolaris, or in MBR. PLease, help me, cause my ideas are over.
Problem: Debian doesn't boot; the system is dual-bootable with Opensolaris.
-------------------------------
-------------------------------
Problem Description:
-------------------------------
Before installing Opensolaris 2008.11, the system looks this way:
/dev/sda1 /home 66GB
/dev/sda2 linux-swap 1GB
/dev/sda3 / 15 GB
/dev/sda4 ? 30 GB
/dev/sda1, /dev/sda2 and /dev/sda3 are Debian, on /dev/sda4 there is Fedora. The Fedora is deleted, and Opensolaris is installed instead. There are problems with Opensolaris if as a primary slice on the disk there is linux-swap, so following some advices over the internet, /dev/sda2 is turned into NTFS during the installation and is turned back to linux-swap after the installation completes. After the installation Opensolaris boots without problems - but Debian doesn't. The installer of Opensolaris somehow changes the slices, and instead of /dev/sda2 puts /dev/sda3 etc., - down here follows 'fdisk -l'.
When trying to load Debian this error comes: Grub Error 13: "Invalid or unsupported executable format"
With the help of a LiveCD of Ubuntu 8.10, I decided to set the 'boot' flag to the slice with Debian. After setting the boot flag on the slice with Debian (the 15 GB one), there was this:
Bad Pbr Sig
and this afterwards:
----------------------------------------
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
----------------------------------------
I was able to receive the same messages if I put 'makeactive' in the menu.lst of Opensolaris. So i turned back the 'boot' flag to the slice with Opensolaris, who now loads without any problems. But Debian doesn't load at all.
-------------------------------
Some more info
-------------------------------
1. How Linux sees the disk:
fdisk -l from the Ubuntu 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. How Solaris sees the disk:
'format' from the LiveCD of 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. What is in the /boot/grub/menu.lst of Debian (which was mounted with the Ubuntu's 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. What is in /rpool/boot/grub/menu.lst of 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
-------------------------------
What else was done in regards to the problem
-------------------------------
The change of rootnoverify (hd0,1) with all other variants: hd(0,1), hd0(0,1), etc. did not help. Putting 'makeactive' did not help. Opensolaris boots, Debian doesn't. I'm not quite sure where the installer of Opensolaris installs grub - whether in the slice for Opensolaris, or in MBR. PLease, help me, cause my ideas are over.