On 03/06/11 02:25, Matthew Dempsky wrote:
On Sat, Mar 5, 2011 at 7:20 AM, Jens A. Griepentrog
<griep...@wias-berlin.de> wrote:
What went wrong? The procedure works for usual hard disks and memory
sticks with sectors of 512 bytes. I would be grateful for any hint.
(As a final aim I would like to have some bootable magneto-optical
disk with root partition a: and two more partitions d: and e: ...)

When you say "The procedure works for usual hard disks and memory
sticks [...]", do you mean it works on this same system when attached
to the same ahc(4) controller? E.g., if you replace this sd0 with a
standard SCSI disk, will the same set of fdisk/disklabel/newfs
commands work correctly?

Thanks, Matthew, I just checked this again with some 16-year old SCSI
disk to give a rigorous proof of my above statement:

...
ahc0 at pci6 dev 2 function 0 vendor "Adaptec",
unknown product 0x0082 rev 0x02: apic 7 int 21 (irq 3)
scsibus0 at ahc0: 8 targets, initiator 7
sd0 at scsibus0 targ 4 lun 0: <QUANTUM, FIREBALL1080S, 1Q09>
SCSI2 0/direct fixed
sd0: 1042MB, 512 bytes/sec, 2134305 sec total
...

Here, the same set of commands works successfully:

# fdisk sd0
Disk: sd0       geometry: 132/255/63 [2134305 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
# fdisk -i sd0
Do you wish to write new MBR and partition table? [n] y
Writing MBR at offset 0.
# fdisk sd0
Disk: sd0       geometry: 132/255/63 [2134305 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
*3: A6      0   1   2 -    131 254  63 [          64:     2120516 ] OpenBSD
# disklabel -E sd0
Label editor (enter '?' for help at any prompt)
> p
OpenBSD area: 64-2120580; size: 2120516; free: 2120516
#                size           offset  fstype [fsize bsize  cpg]
  c:          2134305                0  unused
> a e
offset: [64]
size: [2120516]
FS type: [4.2BSD]
> w
> q
No label changes.
# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: FIREBALL1080S
uid: 6e33f59301aa59ca
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 132
total sectors: 2134305
boundstart: 64
boundend: 2120580
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:          2134305                0  unused
  e:          2120512               64  4.2BSD   2048 16384    1
# newfs /dev/rsd0e
/dev/rsd0e: 1035.4MB in 2120512 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
 32, 414688, 829344, 1244000, 1658656, 2073312,
# mount /dev/sd0e /mnt
# mount
/dev/sd1a on / type ffs (local)
/dev/sd1d on /home type ffs (local, nodev, nosuid, softdep)
mfs:12008 on /tmp type mfs (asynchronous, local, nodev, nosuid, size=2097152 512-blocks)
/dev/sd2d on /usr type ffs (local, nodev, softdep)
/dev/sd2e on /var type ffs (local, nodev, nosuid, softdep)
/dev/sd0e on /mnt type ffs (local)
# umount /mnt

By the way, I also tried to add the sector-size option "-S 2048"
to the newfs command on the MO disk but without any success.

Jens

Reply via email to