Hello all.

I am in need of a little help or advice to rescue an OpenBSD server I do 
not have physical access to. I have or can have a KVM but no iso remote 
loading/booting. I can use a "PXE linux boot disk" to do basic disc / 
Slice changes. The server was installed using a custom procedure 
similar to yafoo. 




The setup
---------
I set up the computer disk with two slices (what dos call partitions, 
the one that are limited to 4 primary ones to get the terminology 
right), BOTH of them having OpenBSD, the fist one of 1G contains a 
"rescue" OBSD and the other one contains the "main/ productive" Openbsd. 
To achieve this I installed one slice, hidden it as a Opus (code 10) 
partition type and installed another OpenBSD on the other slice. 

The disk layout is as such 



fdisk wd0
Disk: wd0       geometry: 19457/255/63 [312581808 Sectors]
Offset: 0       Signature: 0xAA55
             Starting         Ending        LBA Info:
 #: id      C   H  S -      C   H  S [      start:        size ]
------------------------------------------------------------------------
 0: 10      0   1  1 -    100 254 63 [         63:     1622502 ] OPUS
*1: A6    101   0  1 -  19456 254 63 [    1622565:   310954140 ] OpenBSD
 2: 00      0   0  0 -      0   0  0 [          0:           0 ] unused
 3: 00      0   0  0 -      0   0  0 [          0:           0 ] unused

The first Opus(10) partition is in fact an openbsd install. I switch 
between the two by making the slice 0 active putting its os code at 
openBSD(A6) and putting the slice 2 at OS code Opus(10). I was probably 
too smart for my own good at the time. :) 




The problem
-----------

Since a few days I was not able to access the machine. A ram hardware 
failure was diagnosed and ram changed but I still was not able to boot 
on the main partition on slice 1. 




===============================================================
A KWM showed a failure at boot time of the "ERR M " kind ...
===============================================================
 I looked it up and understand that it is linked to boot(8) being 
corrupt and not knowing were to look for the kernel. Installboot should 
be a solution but I don't know how to run it in my situation. 

I have acces and can boot on the "rescue" slice 0 partition but running 
installboot from it won't give me the desired result since it would link 
the "boot(8)" record to the slice 0 kernel and not the slice 1 kernel. 


"Questions"
----------


Question 1

Is it possible to do that ? i.e. reinstall the boot(8) bloc on slice 1 
refering to the slice 1 kernel on that partition ? 

To me it means being able to mount the slice 1 frome slice 0 no ? 

witch lead the to my second question 

Question 2 

Either to recue the slice 1 setup or to retrieve my datas, how can I 
make the slice 1 seen and mount it from slice 0 ? I have record of the 
exact layout of both slices. Currently disklabel from slice 0 show me 
that : 



# disklabel wd0
# Inside MBR partition 0: type A6 start 63 size 1622502
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: ST3160812AS
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 19457
total sectors: 312581808
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          1333332               63  4.2BSD   2048 16384    1
  b:           289170          1333395    swap
  c:        312581808                0  unused      0     0
  i:        310954140          1622565 unknown

Obviously the i partition is the whole slice 1.

I want to make it so
16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          4194307          1622565  4.2BSD   2048 16384    1
  b:          4194304          5816872    swap
  c:        312581808                0  unused      0     0
  d:          4194304         10011176  4.2BSD   2048 16384    1
  e:         62914560         14205480  4.2BSD   2048 16384    1
  g:         62914560         77120040  4.2BSD   2048 16384    1
  h:        125829120        140034600  4.2BSD   2048 16384    1

Since I recorded the layout of the slice 1 when configuring the machine. 

Is it the right thing to do from disklabel from the slice 0 openBSD ? 

Would there be some adverse effect from doing it on my slice 1 datas ? 

Am I right in my understanding that is will only change my slice 0 
disklabel, giving it knowledge of the slice 1 layout but not write 
anything on the slice 1 ? 

Question 3 

Anybody would have a bright idea of a solution or things to do that 
would have escaped my limited mind ? I am open to any pointer or 
suggestion before doing some irreparable harm to my disks. 

Thanks a lot for your time and help anyway and thanks for helping make 
OpenBSD the OS it is... 


 
Aditionnal datas
----------------

Original slice 0 layout :

# disklabel wd0
# Inside MBR partition 0: type A6 start 63 size 1622502
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: ST3160812AS
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 19457
total sectors: 312581808
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          1333332               63  4.2BSD   2048 16384    1
  b:           289170          1333395    swap
  c:        312581808                0  unused      0     0
  i:        310954140          1622565 unknown

Original slice 1 layout :

>disklabel  wd0
# Inside MBR partition 1: type A6 start 1622565 size 310954140
# /dev/rwd0c:
type: ESDI
disk: yaifo
label:
flags:
bytes/sector: 512
sectors/track: 4
tracks/cylinder: 2
sectors/cylinder: 8
cylinders: 768
total sectors: 312581808
rpm: 300
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          4194307          1622565  4.2BSD   2048 16384    1
  b:          4194304          5816872    swap
  c:        312581808                0  unused      0     0
  d:          4194304         10011176  4.2BSD   2048 16384    1
  e:         62914560         14205480  4.2BSD   2048 16384    1
  g:         62914560         77120040  4.2BSD   2048 16384    1
  h:        125829120        140034600  4.2BSD   2048 16384    1

Reply via email to