Re: Questions about 3.9 Installation on External USB Disk

2006-04-09 Thread Nick Holland

Dave Feustel wrote:

I got my 3.9 Cdrom set yesterday and today started installing
it on an external usb disk so as not to wipe out my existing
3.8 setup. When I got to the disk partition, I erased the existing
'a' partition (dos) and created a new bsd 'a' partition. The partition
had a default offset of 32 which looked odd to me, so I changed
it to 64 and sized it to 1G. Then I created a 'b' partition. Again,
the default offset was 32. That looked even odder to me, so
I aborted the installation. A dmesg of the 3.8 boot (with external
usb drive attached) follows at the end of this post.

So is it possible to install 3.9 on an external usb drive and then to
boot from that drive? Is the default 32 offset for a and b partitions
on the usb drive correct? (I don't think so, but I am asking anyways
since I have not used usb hard drives with OpenBSD before).


The point is not a 32 block or 63 block offset, but rather, a ONE TRACK 
offset for the first partition on i386 and some other systems.  This 
leaves room for the master boot record (MBR) which is in sector 0.


Your dmesg showed this:

sd0 at scsibus2 targ 1 lun 0:  SCSI0 0/direct fixed
sd0: 57231MB, 57231 cyl, 64 head, 32 sec, 512 bytes/sec, 117210240 sec total


so the layout for this disk connected this way is 32 sectors per track 
so YES, it should be starting at 32.


If you override this, you left a 32 sector gap at the beginning of the 
disk, and disklabel will start looking for space at the start of the 
disk, so again, it will offer you that same starting address.


Most modern IDE and SATA disks will use a track size of 63 sectors, so 
yes, that's your offset.  HOWEVER, if you were to bring OpenBSD up on an 
old MFM drive, you would be looking at 17 sectors per track, so THAT 
would be your offset.


Your disklabel offsets should match your fdisk offsets, though if you 
answered "yes" to the "use entire disk" option, that was done for you in 
the install program.


Can this all work?  Certainly, assuming a machine that boots off an 
external USB HD, but most new machines can.  You can even set up the 
disk with funny offsets if you take full responsibility for doing the 
math accurately. :)


I would recommend disconnecting the "normal" disk from the machine for 
testing, however.  Keeps life easier...


Nick.

Nick.



Re: Questions about 3.9 Installation on External USB Disk

2006-04-09 Thread Dave Feustel
On Sunday 09 April 2006 18:39, [EMAIL PROTECTED] wrote:
> I do not believe an existing 'a' partition (dos).
> I do believe an existing dos partition, 
> which is something very different from an OpenBSD 'a' partition.

I now have installed 3.9 on my external usb drive.

There is a bug in the install that causes disklabel to not always
include the size of the 'a' partition when computing the
offset of the 'b' (swap) partition. This bug does not occur
often, but I have seen it at least twice during installs of previous 
versions of OpenBSD. This bug is not 100% repeatable.

I was able to install 3.9 on the usb disk sd0. However, my system 
is 8 years old and the bios does not support booting from usb devices.
I cannot boot from any but fd*, wd*, and cd* right now, unless I reinstall 
my old  scsi subsystems. If, later this year, I buy a new system, boot 
problems should become moot.

Dave Feustel
-- 
Lose, v., experience a loss, get rid of, "lose the weight"
Loose, adj., not tight, let go, free, "loose clothing"



Re: Questions about 3.9 Installation on External USB Disk

2006-04-09 Thread Tony
Dave Feustel wrote:
> 
> 
> On Sunday 09 April 2006 16:41, [EMAIL PROTECTED] wrote:
> > Something is very confused. 
> > I do not believe an existing 'a' partition (dos).
> 
> I bought the disk at Best Buy and copied a few files from
> /home/daf to test the disk. The files were copied to the
> usb-connected disk and stored in the fat file system already
> installed on the disk. I don't mind the fat file system on a usb flash
> disk, but I do mind a fat file system on a large usb hard drive.
> I wanted to replace the fat file system with default BSD 
> partitions/filesystems. I though I could kill 2 birds with one stone
> by installing OpenBSD 3.9 on the usb drive. Maybe this is not possible 
> with external usb drives. Until now I have had no experience with usb 
> harddrives running with OpenBSD, hence my caution.
> 
> Dave

I do not believe an existing 'a' partition (dos).
I do believe an existing dos partition, 
which is something very different from an OpenBSD 'a' partition. 

OpenBSD partitions are stored in an OpenBSD disklabel
Dos formatted disks do not have OpenBSD disklabels.

You can certainly install OpenBSD on the usb drive.
If your BIOS allows, you can even boot from it.

man fdisk   plays with DOS partitions
man disklabel   plays with OpenBSD partitions
They are NOT the same 



Re: Questions about 3.9 Installation on External USB Disk

2006-04-09 Thread Dave Feustel
On Sunday 09 April 2006 16:41, [EMAIL PROTECTED] wrote:
> Something is very confused. 
> I do not believe an existing 'a' partition (dos).

I bought the disk at Best Buy and copied a few files from
/home/daf to test the disk. The files were copied to the
usb-connected disk and stored in the fat file system already
installed on the disk. I don't mind the fat file system on a usb flash
disk, but I do mind a fat file system on a large usb hard drive.
I wanted to replace the fat file system with default BSD 
partitions/filesystems. I though I could kill 2 birds with one stone
by installing OpenBSD 3.9 on the usb drive. Maybe this is not possible 
with external usb drives. Until now I have had no experience with usb 
harddrives running with OpenBSD, hence my caution.

Dave



Re: Questions about 3.9 Installation on External USB Disk

2006-04-09 Thread Tony
Dave Feustel wrote:
> 
> 
> I got my 3.9 Cdrom set yesterday and today started installing
> it on an external usb disk so as not to wipe out my existing
> 3.8 setup. When I got to the disk partition, I erased the existing
> 'a' partition (dos) and created a new bsd 'a' partition. The partition
> had a default offset of 32 which looked odd to me, so I changed
> it to 64 and sized it to 1G. Then I created a 'b' partition. Again,
> the default offset was 32. That looked even odder to me, so
> I aborted the installation. A dmesg of the 3.8 boot (with external
> usb drive attached) follows at the end of this post.
Something is very confused. 
I do not believe an existing 'a' partition (dos).
What you really need is the disk geometry BEFORE you did whatever.
The OpenBSD 'a' partition is the root. It needs to be bootable
(id addressable) by the BIOS. It needs be be very small so that
everything required for booting fits inside the limits of the BIOS.
The BIOS likely uses CHS addressing. The exact limits depend on
which BIOS and which disk geometry. Generally hard drives went to
claiming 63 sectors per track very early to extend the limits.
Since the disks are small and NOT usually boot devices there is not
the need to use antiquated methods of extending addressable disk
space. In that case, 32 sectors per track seems a very plausible
number. It should make some internal addressing rather more readily
calculable with stuff being powers of two.

Partitions labeled a,b,c etc belong to an OpenBSD disklabel.
This is actually totally independent of what holds what are called 
DOS partitions (and I think these are numbered like 0,1,2,3 on OpenBSD.
The 
> 
> So is it possible to install 3.9 on an external usb drive and then to
> boot from that drive? Is the default 32 offset for a and b partitions
> on the usb drive correct? (I don't think so, but I am asking anyways
> since I have not used usb hard drives with OpenBSD before).
The offset should be whatever the drive wants to claim.
I think the number has to be somewhere between 1 and 63 and is really
one less than the number of wasted sectors at the beginning of the disk.
For some reason, Operating Systems seem to be unhappy unless they start
at the beginning of the track they start on. An offset that is valid for
one disk geometry is very wrong for a different disk geometry.
Do not decide it looks funny just because it's a different disk.


> sd0: 57231MB, 57231 cyl, 64 head, 32 sec, 512 bytes/sec, 

That is 32 sitting there.



Re: Questions about 3.9 Installation on External USB Disk

2006-04-09 Thread Joachim Schipper
On Sun, Apr 09, 2006 at 01:58:32PM -0500, Dave Feustel wrote:
> I got my 3.9 Cdrom set yesterday and today started installing
> it on an external usb disk so as not to wipe out my existing
> 3.8 setup. When I got to the disk partition, I erased the existing
> 'a' partition (dos) and created a new bsd 'a' partition. The partition
> had a default offset of 32 which looked odd to me, so I changed
> it to 64 and sized it to 1G. Then I created a 'b' partition. Again,
> the default offset was 32. That looked even odder to me, so
> I aborted the installation. A dmesg of the 3.8 boot (with external
> usb drive attached) follows at the end of this post.
> 
> So is it possible to install 3.9 on an external usb drive and then to
> boot from that drive? Is the default 32 offset for a and b partitions
> on the usb drive correct? (I don't think so, but I am asking anyways
> since I have not used usb hard drives with OpenBSD before).

I don't know if the offset is correct - though I presume it is - but
disklabel will always try to put new slices at the lowest unused
address, so the question about the second diskslice is as it should be.

I don't think I've ever seen or owned a machine that could boot off an
external USB drive, but I'm sure they exist and assume that you know
what you are doing. ;-)

Joachim



Questions about 3.9 Installation on External USB Disk

2006-04-09 Thread Dave Feustel
I got my 3.9 Cdrom set yesterday and today started installing
it on an external usb disk so as not to wipe out my existing
3.8 setup. When I got to the disk partition, I erased the existing
'a' partition (dos) and created a new bsd 'a' partition. The partition
had a default offset of 32 which looked odd to me, so I changed
it to 64 and sized it to 1G. Then I created a 'b' partition. Again,
the default offset was 32. That looked even odder to me, so
I aborted the installation. A dmesg of the 3.8 boot (with external
usb drive attached) follows at the end of this post.

So is it possible to install 3.9 on an external usb drive and then to
boot from that drive? Is the default 32 offset for a and b partitions
on the usb drive correct? (I don't think so, but I am asking anyways
since I have not used usb hard drives with OpenBSD before).

Thanks,
Dave Feustel
-- 
OpenBSD 3.8 (GENERIC) #138: Sat Sep 10 15:41:37 MDT 2005
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium III ("GenuineIntel" 686-class) 797 MHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 536190976 (523624K)
avail mem = 482353152 (471048K)
using 4278 buffers containing 26910720 bytes (26280K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 09/17/01, BIOS32 rev. 0 @ 0xfda74
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 30102 dobusy 0 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf/0x1
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf2c30/224 (12 entries)
pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #3 is the last bus
bios0: ROM list: 0xc/0xb000 0xcb000/0x800
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82815 Hub" rev 0x02: rng active, 7Kb/sec
ppb0 at pci0 dev 1 function 0 "Intel 82815 AGP" rev 0x02
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Rage Fury" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 30 function 0 "Intel 82801BA AGP" rev 0x02
pci2 at ppb1 bus 2
xl0 at pci2 dev 10 function 0 "3Com 3c905C 100Base-TX" rev 0x78: irq 3, address 
00:01:03:23:4c:b3
bmtphy0 at xl0 phy 24: Broadcom 3C905C internal PHY, rev. 7
ohci0 at pci2 dev 11 function 0 "NEC USB" rev 0x41: irq 11, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: NEC OHCI root hub, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1 at pci2 dev 11 function 1 "NEC USB" rev 0x41: irq 9, version 1.0
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: NEC OHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ehci0 at pci2 dev 11 function 2 "NEC USB" rev 0x01: irq 11
usb2 at ehci0: USB revision 2.0
uhub2 at usb2
uhub2: NEC EHCI root hub, rev 2.00/1.00, addr 1
uhub2: 5 ports with 5 removable, self powered
ppb2 at pci2 dev 12 function 0 "Texas Instruments PCI2250 PCI-PCI" rev 0x02
pci3 at ppb2 bus 3
sis0 at pci3 dev 0 function 0 "NS DP83815 10/100" rev 0x00: DP83816A, irq 9, 
address 00:00:24:c3:4c:c0
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci3 dev 1 function 0 "NS DP83815 10/100" rev 0x00: DP83816A, irq 11, 
address 00:00:24:c3:4c:c1
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
sis2 at pci3 dev 2 function 0 "NS DP83815 10/100" rev 0x00: DP83816A, irq 3, 
address 00:00:24:c3:4c:c2
nsphyter2 at sis2 phy 0: DP83815 10/100 PHY, rev. 1
sis3 at pci3 dev 3 function 0 "NS DP83815 10/100" rev 0x00: DP83816A, irq 11, 
address 00:00:24:c3:4c:c3
nsphyter3 at sis3 phy 0: DP83815 10/100 PHY, rev. 1
eap0 at pci2 dev 13 function 0 "Ensoniq AudioPCI97" rev 0x07: irq 11
ac97: codec id 0x83847608 (SigmaTel STAC9708/11)
ac97: codec features 18 bit DAC, 18 bit ADC, SigmaTel 3D
audio0 at eap0
midi0 at eap0: 
ichpcib0 at pci0 dev 31 function 0 "Intel 82801BA LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801BA IDE" rev 0x02: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 1: 
wd0: 16-sector PIO, LBA, 76345MB, 156355584 sectors
wd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0:  SCSI0 5/cdrom 
removable
atapiscsi1 at pciide0 channel 1 drive 1
scsibus1 at atapiscsi1: 2 targets
cd1 at scsibus1 targ 0 lun 0:  SCSI0 5/cdrom 
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
cd1(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 31 function 2 "Intel 82801BA USB" rev 0x02: irq 10
usb3 at uhci0: USB revision 1.0
uhub3 at usb3
uhub3: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
"Intel 82801BA SMBus" rev 0x02 at pci0 dev 31 function 3 not configured
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pck