Re: First install: Grub doesn't find partitions

2007-10-29 Thread Bertram Scharpf
Hi again,

Am Montag, 29. Okt 2007, 02:38:08 +0100 schrieb Bertram Scharpf:
 I just installed OpenBSD on a i386 from cd41.iso as
 described in the FAQ, chapter 4.

 When I restart the system from the CD all OpenBSD partitions
 show up properly and I can chroot into /mnt after I mounted
 them.

 However, Grub refuses to recognize any of the OpenBSD
 partitions. A Linux resides on the same disk that cannot
 mount any of these partitions either.

 Here is a `sfdisk' (Linux) output:

   /dev/hdb1 : start=1, size=32255, Id=83
   /dev/hdb2 : start=32256, size=  2096640, Id=82
   /dev/hdb3 : start=  2128896, size=117974304, Id= 5
   /dev/hdb4 : start=0, size=0, Id= 0
   /dev/hdb5 : start=  2128897, size=  4194287, Id=83
   /dev/hdb6 : start=  6323185, size= 37748591, Id=a6, bootable
   /dev/hdb7 : start= 44071777, size= 76031423, Id=8e

 And here is what I entered into `disklabel':

   start   size mountpoint
   wd1a   6323185 524159/
   wd1b   6847344 524160(swap)
   wd1d   7371504 524160/tmp
   wd1e   7895664   12582864/usr
   wd1f  204785288388576/home

First of all thanks to the off-list responders. I already
considered the chainloader option but as I installed no
bootloader this probably would not work.

I examined the Grub source code to find out where it looks
for BSD partitions. I found there is a sector containing the
BSD magic label and appropriate partitioning info. It's
sector 1, the second one on the disk == the first in slice
/dev/hdb1 or (hd1,0), respectively.

Arrgh!

Sectors 6323185 and 6323186 are still untouched. I tried to
use the 'b' command in 'disklabel -E ..' but nothing went
better. I dd'ed sector 1 to 6323186 and voila - there they
are. Could this be the correct way that I first have to
damage another partition and then manually have to move a
sector?

When booting this system I run into the next problem:

  panic: /boot too old: upgrade!

Therefore I would like to try to install a bootloader and
chainload it. But with a 'disklabel' that overwrites
existing partitions?

Do I have to get used to struggle with such fundamental
problems when I proceed with OpenBSD?

Thank for reading so far,

Bertram


--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de



Re: First install: Grub doesn't find partitions

2007-10-29 Thread Pau Amaro-Seoane
Hi,

I don't quite understand what you're doing? Are you looking for a
dual-boot with linux via grub?

If so, have a look at

www.aei.mpg.de/~pau/zen_process_obsd.html

Read it in detail.

If not, just forget this mail.

Cheers,

Pau

2007/10/29, Bertram Scharpf [EMAIL PROTECTED]:
 Hi again,

 Am Montag, 29. Okt 2007, 02:38:08 +0100 schrieb Bertram Scharpf:
  I just installed OpenBSD on a i386 from cd41.iso as
  described in the FAQ, chapter 4.
 
  When I restart the system from the CD all OpenBSD partitions
  show up properly and I can chroot into /mnt after I mounted
  them.
 
  However, Grub refuses to recognize any of the OpenBSD
  partitions. A Linux resides on the same disk that cannot
  mount any of these partitions either.
 
  Here is a `sfdisk' (Linux) output:
 
/dev/hdb1 : start=1, size=32255, Id=83
/dev/hdb2 : start=32256, size=  2096640, Id=82
/dev/hdb3 : start=  2128896, size=117974304, Id= 5
/dev/hdb4 : start=0, size=0, Id= 0
/dev/hdb5 : start=  2128897, size=  4194287, Id=83
/dev/hdb6 : start=  6323185, size= 37748591, Id=a6, bootable
/dev/hdb7 : start= 44071777, size= 76031423, Id=8e
 
  And here is what I entered into `disklabel':
 
start   size mountpoint
wd1a   6323185 524159/
wd1b   6847344 524160(swap)
wd1d   7371504 524160/tmp
wd1e   7895664   12582864/usr
wd1f  204785288388576/home

 First of all thanks to the off-list responders. I already
 considered the chainloader option but as I installed no
 bootloader this probably would not work.

 I examined the Grub source code to find out where it looks
 for BSD partitions. I found there is a sector containing the
 BSD magic label and appropriate partitioning info. It's
 sector 1, the second one on the disk == the first in slice
 /dev/hdb1 or (hd1,0), respectively.

 Arrgh!

 Sectors 6323185 and 6323186 are still untouched. I tried to
 use the 'b' command in 'disklabel -E ..' but nothing went
 better. I dd'ed sector 1 to 6323186 and voila - there they
 are. Could this be the correct way that I first have to
 damage another partition and then manually have to move a
 sector?

 When booting this system I run into the next problem:

   panic: /boot too old: upgrade!

 Therefore I would like to try to install a bootloader and
 chainload it. But with a 'disklabel' that overwrites
 existing partitions?

 Do I have to get used to struggle with such fundamental
 problems when I proceed with OpenBSD?

 Thank for reading so far,

 Bertram


 --
 Bertram Scharpf
 Stuttgart, Deutschland/Germany
 http://www.bertram-scharpf.de



Re: First install: Grub doesn't find partitions

2007-10-29 Thread Bertram Scharpf
Hi,

Am Montag, 29. Okt 2007, 11:01:44 +0100 schrieb Pau Amaro-Seoane:
 I don't quite understand what you're doing? Are you looking for a
 dual-boot with linux via grub?

Yes. I have a Linux box here with Grub. Admittedly the first
hard disk contains a Windows that gets used sometimes by
other persons. What else should I do? Buy another machine
while I have unused disk space here? Migrate back to Windows
before I try out OpenBSD?

 If so, have a look at
 www.aei.mpg.de/~pau/zen_process_obsd.html
 Read it in detail.
 If not, just forget this mail.

This is exactly what I did.

The first difference appears while partitioning. I quote the document
you told me I should have a look at:

  Here is the partition information you chose:

  Disk: wd0   geometry: 969/128/63 [7814016 Sectors]
   #: idC   H  S -C   H  S [   start:  size   ]
  
  ..
  *2: A6  304 103  1 -  968  25 63 [ 2457945: 5349645 ] OpenBSD
  ..
  ...
  Treating sectors 2457945-7807590 as the OpenBSD portion of the disk.
  You can use the 'b' command to change this.

When I run the installation this reads:

  Treating sectors 63-120103200 as the OpenBSD portion of the disk.
  
  You can use the 'b' command to change this.

Unfortunately, when I use the 'b' command, this won't
change. The partition table is written to sector 1. Not 63.
Not 64. Not 6323185. Not 6323186. I not even find a way to
display that message again after I changed the portion.
The document you pointed to doesn't mention a command to
display what the portion is.

I tried it several times. I booted the CD, ran
disklabel/install/..., booted linux, dd|od'ed the sectors
(there's no od on the CD), re-booted the CD, ...

Yes, I do read documentation and I read it in detail. I
still will be glad if you point me to some new information.
Telling me to read again and again the same doesn't make the
disklabel command behave different. Please do you read the
reports I post in detail.

Bertram


 2007/10/29, Bertram Scharpf [EMAIL PROTECTED]:
  Hi again,
 
  Am Montag, 29. Okt 2007, 02:38:08 +0100 schrieb Bertram Scharpf:
   I just installed OpenBSD on a i386 from cd41.iso as
   described in the FAQ, chapter 4.
  
   When I restart the system from the CD all OpenBSD partitions
   show up properly and I can chroot into /mnt after I mounted
   them.
  
   However, Grub refuses to recognize any of the OpenBSD
   partitions. A Linux resides on the same disk that cannot
   mount any of these partitions either.
  
   Here is a `sfdisk' (Linux) output:
  
 /dev/hdb1 : start=1, size=32255, Id=83
 /dev/hdb2 : start=32256, size=  2096640, Id=82
 /dev/hdb3 : start=  2128896, size=117974304, Id= 5
 /dev/hdb4 : start=0, size=0, Id= 0
 /dev/hdb5 : start=  2128897, size=  4194287, Id=83
 /dev/hdb6 : start=  6323185, size= 37748591, Id=a6, bootable
 /dev/hdb7 : start= 44071777, size= 76031423, Id=8e
  
   And here is what I entered into `disklabel':
  
 start   size mountpoint
 wd1a   6323185 524159/
 wd1b   6847344 524160(swap)
 wd1d   7371504 524160/tmp
 wd1e   7895664   12582864/usr
 wd1f  204785288388576/home
 
  First of all thanks to the off-list responders. I already
  considered the chainloader option but as I installed no
  bootloader this probably would not work.
 
  I examined the Grub source code to find out where it looks
  for BSD partitions. I found there is a sector containing the
  BSD magic label and appropriate partitioning info. It's
  sector 1, the second one on the disk == the first in slice
  /dev/hdb1 or (hd1,0), respectively.
 
  Arrgh!
 
  Sectors 6323185 and 6323186 are still untouched. I tried to
  use the 'b' command in 'disklabel -E ..' but nothing went
  better. I dd'ed sector 1 to 6323186 and voila - there they
  are. Could this be the correct way that I first have to
  damage another partition and then manually have to move a
  sector?
 
  When booting this system I run into the next problem:
 
panic: /boot too old: upgrade!
 
  Therefore I would like to try to install a bootloader and
  chainload it. But with a 'disklabel' that overwrites
  existing partitions?
 
  Do I have to get used to struggle with such fundamental
  problems when I proceed with OpenBSD?
 
  Thank for reading so far,
 
  Bertram
 
 
  --
  Bertram Scharpf
  Stuttgart, Deutschland/Germany
  http://www.bertram-scharpf.de
 

-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de



Re: First install: Grub doesn't find partitions

2007-10-29 Thread michael hamerski
is it a recent grub? if you're reading grub source I will assume you
know more about it than I do, but am writing this on a box which boots
debian/openbsd/xp without problems, from grub installed circa 6 months
ago. I certainly did not dd any sectors around. I can send you my grub
conf when I reboot next.

mike



Re: First install: Grub doesn't find partitions

2007-10-29 Thread Pau Amaro-Seoane
I am writing this from a dual-boot system with linux only and I never
had your problem.

2007/10/29, michael hamerski [EMAIL PROTECTED]:
 is it a recent grub? if you're reading grub source I will assume you
 know more about it than I do, but am writing this on a box which boots
 debian/openbsd/xp without problems, from grub installed circa 6 months
 ago. I certainly did not dd any sectors around. I can send you my grub
 conf when I reboot next.

 mike



Re: First install: Grub doesn't find partitions

2007-10-29 Thread Pau Amaro-Seoane
indeed...

you seem not to have read the site I pointed to previously.

Don't say you have read it if you didn't. The information is there.

Do what Andrew says and tag it as A6; i.e. openbsd from the linux fdisk

This is *also* written in the web page

2007/10/29, Andrew Daugherity [EMAIL PROTECTED]:
 On 10/28/07, Bertram Scharpf [EMAIL PROTECTED] wrote:
grub root (hd1,^I
 Possible partitions are:
   Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 1,  Filesystem type unknown, partition type 0x82
   Partition num: 4,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 5,  No BSD sub-partition found, partition type 0xa6
   Partition num: 6,  Filesystem type unknown, partition type 0x8e
 
grub root (hd1,5,a)
 
Error 5: Partition table invalid or corrupt
 
grub rootnoverify (hd1,5,a)
 
grub cat /
 
Error 17: Cannot mount selected partition
 
  Here is a `sfdisk' (Linux) output:
 
/dev/hdb1 : start=1, size=32255, Id=83
/dev/hdb2 : start=32256, size=  2096640, Id=82
/dev/hdb3 : start=  2128896, size=117974304, Id= 5
/dev/hdb4 : start=0, size=0, Id= 0
/dev/hdb5 : start=  2128897, size=  4194287, Id=83
/dev/hdb6 : start=  6323185, size= 37748591, Id=a6, bootable
/dev/hdb7 : start= 44071777, size= 76031423, Id=8e
 

 I think this is your problem -- the OpenBSD partition needs to be a
 primary partition (hda1-hda4 in Linux terminology, or (hd0,1) -
 (hd0,3) in GRUB language, and you have it as an extended partition
 (hdb6).  This is not supported.  Reallocated your fdisk partitions so
 the OpenBSD partition is a primary partition and reinstall (you may
 have to resize your extended partition, ID=5, to make room).

 Andrew



Re: First install: Grub doesn't find partitions

2007-10-29 Thread Andrew Daugherity
On 10/28/07, Bertram Scharpf [EMAIL PROTECTED] wrote:
   grub root (hd1,^I
Possible partitions are:
  Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
  Partition num: 1,  Filesystem type unknown, partition type 0x82
  Partition num: 4,  Filesystem type is ext2fs, partition type 0x83
  Partition num: 5,  No BSD sub-partition found, partition type 0xa6
  Partition num: 6,  Filesystem type unknown, partition type 0x8e

   grub root (hd1,5,a)

   Error 5: Partition table invalid or corrupt

   grub rootnoverify (hd1,5,a)

   grub cat /

   Error 17: Cannot mount selected partition

 Here is a `sfdisk' (Linux) output:

   /dev/hdb1 : start=1, size=32255, Id=83
   /dev/hdb2 : start=32256, size=  2096640, Id=82
   /dev/hdb3 : start=  2128896, size=117974304, Id= 5
   /dev/hdb4 : start=0, size=0, Id= 0
   /dev/hdb5 : start=  2128897, size=  4194287, Id=83
   /dev/hdb6 : start=  6323185, size= 37748591, Id=a6, bootable
   /dev/hdb7 : start= 44071777, size= 76031423, Id=8e


I think this is your problem -- the OpenBSD partition needs to be a
primary partition (hda1-hda4 in Linux terminology, or (hd0,1) -
(hd0,3) in GRUB language, and you have it as an extended partition
(hdb6).  This is not supported.  Reallocated your fdisk partitions so
the OpenBSD partition is a primary partition and reinstall (you may
have to resize your extended partition, ID=5, to make room).

Andrew



Re: First install: Grub doesn't find partitions

2007-10-29 Thread Bertram Scharpf
Hi,

Am Montag, 29. Okt 2007, 11:54:23 -0500 schrieb Andrew Daugherity:
 On 10/28/07, Bertram Scharpf [EMAIL PROTECTED] wrote:
grub root (hd1,^I
   ...
   Partition num: 5,  No BSD sub-partition found, partition type 0xa6
   ...
 
  Here is a `sfdisk' (Linux) output:
 
/dev/hdb1 : start=1, size=32255, Id=83
/dev/hdb2 : start=32256, size=  2096640, Id=82
/dev/hdb3 : start=  2128896, size=117974304, Id= 5
/dev/hdb4 : start=0, size=0, Id= 0
/dev/hdb5 : start=  2128897, size=  4194287, Id=83
/dev/hdb6 : start=  6323185, size= 37748591, Id=a6, bootable
/dev/hdb7 : start= 44071777, size= 76031423, Id=8e
 
 
 I think this is your problem -- the OpenBSD partition needs to be a
 primary partition (hda1-hda4 in Linux terminology, or (hd0,1) -
 (hd0,3) in GRUB language, and you have it as an extended partition
 (hdb6).  This is not supported.  Reallocated your fdisk partitions so
 the OpenBSD partition is a primary partition and reinstall (you may
 have to resize your extended partition, ID=5, to make room).

Those @#$! extended partitions! It's really time for me to
get rid of that kind of programming style.

I tried it out on another machine where I had a free primary
partition. Hoolay--it boots! Moving partitions around on the
machine described above will take some time but I will try
it in any case and I will report.

Thanks a lot for your patience when I became fretful.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de



Re: First install: Grub doesn't find partitions

2007-10-29 Thread Pau Amaro-Seoane
 Thanks a lot for your patience when I became fretful.

I also become very usually fretful when something that SHOULD be
working is as stubborn as to refuse to do it. I know it. Oh, yes...
and how...

glad to read that it worked for you!

Pau

2007/10/29, Bertram Scharpf [EMAIL PROTECTED]:
 Hi,

 Am Montag, 29. Okt 2007, 11:54:23 -0500 schrieb Andrew Daugherity:
  On 10/28/07, Bertram Scharpf [EMAIL PROTECTED] wrote:
 grub root (hd1,^I
...
Partition num: 5,  No BSD sub-partition found, partition type 0xa6
...
  
   Here is a `sfdisk' (Linux) output:
  
 /dev/hdb1 : start=1, size=32255, Id=83
 /dev/hdb2 : start=32256, size=  2096640, Id=82
 /dev/hdb3 : start=  2128896, size=117974304, Id= 5
 /dev/hdb4 : start=0, size=0, Id= 0
 /dev/hdb5 : start=  2128897, size=  4194287, Id=83
 /dev/hdb6 : start=  6323185, size= 37748591, Id=a6, bootable
 /dev/hdb7 : start= 44071777, size= 76031423, Id=8e
  
 
  I think this is your problem -- the OpenBSD partition needs to be a
  primary partition (hda1-hda4 in Linux terminology, or (hd0,1) -
  (hd0,3) in GRUB language, and you have it as an extended partition
  (hdb6).  This is not supported.  Reallocated your fdisk partitions so
  the OpenBSD partition is a primary partition and reinstall (you may
  have to resize your extended partition, ID=5, to make room).

 Those @#$! extended partitions! It's really time for me to
 get rid of that kind of programming style.

 I tried it out on another machine where I had a free primary
 partition. Hoolay--it boots! Moving partitions around on the
 machine described above will take some time but I will try
 it in any case and I will report.

 Thanks a lot for your patience when I became fretful.

 Bertram


 --
 Bertram Scharpf
 Stuttgart, Deutschland/Germany
 http://www.bertram-scharpf.de



Re: First install: Grub doesn't find partitions

2007-10-29 Thread Bertram Scharpf
Hi,

Am Montag, 29. Okt 2007, 20:01:22 +0100 schrieb Bertram Scharpf:
 Am Montag, 29. Okt 2007, 11:54:23 -0500 schrieb Andrew Daugherity:
  I think this is your problem -- the OpenBSD partition needs to be a
  primary partition (hda1-hda4 in Linux terminology, or (hd0,1) -
  (hd0,3) in GRUB language, and you have it as an extended partition
  (hdb6).  This is not supported.
 
 [...] Moving partitions around on the
 machine described above will take some time but I will try
 it in any case and I will report.

I shuffled the OpenBSD partition to the primary section in
front and --- it works!

Phew!

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de