On Thu, Jan 03, 2008 at 06:56:18PM +0200, Soner Tari wrote:

> The problem I am facing happens during installation of OpenBSD 4.2
> -release, -stable, or -current as of January 1st (both amd64 and i386).
> I can very easily reproduce this issue every time. I've been testing for
> the last 48 hours, and can confirm that it never happens on 4.0 or 4.1.
> Happens with SATA drives, never with PATA. See the dmesg with SATA at
> the bottom (dmesg is for -stable, no custom changes otherwise).
> 
> Firstly, while I try to upgrade my 4.1/amd64 box to 4.2/amd64, the
> upgrade script tries to fsck /dev/wd0a, but gives me the following:
> 
> wd0a: id not found reading fsbn 128 of 128 143 (wd0 bn 8755093022399; cn
> 547... tn 80 sn 4), retrying
> wd0: transfer error, downgrading to Ultra: DMA mode 4
> 
> It downgrades down to DMA mode 2, finally gives up as FAILED, and
> instructs me to fsck manually (which doesn't work either).
> 
> And, disklabel output at this point looks strange:
> 
> #                size           offset  fstype [fsize bsize  cpg]
>   a:          4036512    8755093022271  4.2BSD      0     0  256 
> 
> The expected offset for partition a is of course 63. (disklabel in
> 4.2/i386 does the same too.)

This can happen if you have a version mismatch between kernel and
disklabel executable.

> 
> Just to confirm my observations, I managed to replace disklabel binary
> of 4.2 installation (in /sbin of rd0a) with the one from 4.1, and it
> does not have this issue.

So that suggests you are NOT running a 4.2 kernel during your upgrade.

> 
> 4.2 disklabel behaves the same in install mode too. I mean, if I give up
> on upgrade (which is every time) and choose to install instead, after I
> drop to disklabel editor, and print the existing partitions, I see
> exactly the same huge number as the offset. But the difference is that
> if I continue with install without changing anything in disklabel
> editor, newfs cannot format the partition, and gives me the same "id not
> found... downgrading ... DMA mode to..." errors as above, and finally
> gives up.
> 
> Therefore, the only way to install 4.2 (on my system with SATA HD
> already partitioned) is to zero out the partition table and recreate all
> the partitions in disklabel editor, and everything works fine
> thereafter.
> 
> If this issue did happen with 4.0 and 4.1 too, then I could blame my
> hardware (perhaps nvidia chipset). But upgrading from 4.0 to 4.1 is
> fine. Up/downgrading from 4.2 to again 4.2 works fine too. And,
> otherwise this system has been running fine for more than a year now.
> 
> Also, trying to *fake* downgrade from 4.2 to 4.1 fails during fsck (did
> not really downgrade, just wanted to test disklabel, fsck, mount, and
> newfs of 4.1). But downgrade from 4.2 to 4.0 seems to fsck fine.

Downgrades are NOT supported.

Some backrground info: the disklabel format changed from 4.1 to 4.2.
A 4.2 kernel makes sure to translate the format, and the new tools handle
things fine too. We tested many upgrade scenarios, and they all work
fine. So far reports like yours all have boiled down to version conflicts.

I'm pretyy confident you mixed versions somewhere in your process, and
with all your experimenting, you could very well have made the on-disk
label faulty.

> 
> I have tried with many different partitioning, enabled/disabled IDE and
> SATA ports in bios, and used install42.iso (-release), cd42.iso
> (snapshot), etc.
> 
> disklabel output after first boot seems fine, i.e. the issue I am
> reporting is only during installation of 4.2.

Another indicator your are NOT running a 4.2 kernel during install/upgrade.

> 
> I have seen that there are major changes to disklabel (and related
> tools) since June. Could this issue be related with those?
> 
> I would appreciate any help. I can file a bug report if this is really a
> bug.

My bets are on a user error.

        -Otto

> 
> (I myself have tried a patch before submitting this post, namely, a
> typecast to u_int64_t for the starting_sector in find_bounds() in
> editor.c, but it did not fix the disklabel offset. Lines 1649 and 1650
> in -stable.)
> 
> OpenBSD 4.2-stable (STABLE) #6: Sun Dec  2 17:51:00 EET 2007
>     [EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/STABLE
> real mem = 1073278976 (1023MB)
> avail mem = 1030926336 (983MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf0000 (75 entries)
> bios0: vendor Phoenix Technologies, LTD version "ASUS A8N5X ACPI BIOS
> Revision 1003" date 06/01/2006
> bios0: ASUSTeK Computer INC. A8N5X
> acpi at mainbus0 not configured
> cpu0 at mainbus0: (uniprocessor)
> cpu0: AMD Athlon(tm) 64 Processor 3700+, 2211.58 MHz
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB
> 64b/line 16-way L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu0: AMD erratum 89 present, BIOS upgrade may be required
> cpu0: Cool'n'Quiet K8 2211 MHz: speeds: 2200 2000 1800 1000 MHz
> pci0 at mainbus0 bus 0: configuration mode 1
> "NVIDIA nForce4 DDR" rev 0xa3 at pci0 dev 0 function 0 not configured
> pcib0 at pci0 dev 1 function 0 "NVIDIA nForce4 ISA" rev 0xa3
> nviic0 at pci0 dev 1 function 1 "NVIDIA nForce4 SMBus" rev 0xa2
> iic0 at nviic0
> iic1 at nviic0
> pciide0 at pci0 dev 6 function 0 "NVIDIA nForce4 IDE" rev 0xf2: DMA,
> channel 0 configured to compatibility, channel 1 configured to
> compatibility
> pciide0: channel 0 disabled (no drives)
> atapiscsi0 at pciide0 channel 1 drive 0
> scsibus0 at atapiscsi0: 2 targets
> cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, CD-RW GCE-8527B, 1.02> SCSI0
> 5/cdrom removable
> cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
> pciide1 at pci0 dev 7 function 0 "NVIDIA nForce4 SATA" rev 0xf3: DMA
> pciide1: using irq 11 for native-PCI interrupt
> pciide2 at pci0 dev 8 function 0 "NVIDIA nForce4 SATA" rev 0xf3: DMA
> pciide2: using irq 5 for native-PCI interrupt
> wd0 at pciide2 channel 0 drive 0: <SAMSUNG HD160JJ>
> wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
> wd0(pciide2:0:0): using PIO mode 4, Ultra-DMA mode 5
> ppb0 at pci0 dev 9 function 0 "NVIDIA nForce4 PCI-PCI" rev 0xa2
> pci1 at ppb0 bus 5
> vr0 at pci1 dev 6 function 0 "VIA VT6105 RhineIII" rev 0x8b: irq 5,
> address 00:02:44:95:71:a8
> ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 9: OUI
> 0x004063, model 0x0034
> fxp0 at pci1 dev 7 function 0 "Intel 8255x" rev 0x10, i82551: irq 3,
> address 00:07:e9:09:d4:80
> inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4
> nfe0 at pci0 dev 10 function 0 "NVIDIA CK804 LAN" rev 0xa3: irq 3,
> address 00:17:31:62:4f:2d
> eephy0 at nfe0 phy 1: Marvell 88E1111 Gigabit PHY, rev. 2
> ppb1 at pci0 dev 11 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
> pci2 at ppb1 bus 4
> ppb2 at pci0 dev 12 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
> pci3 at ppb2 bus 3
> ppb3 at pci0 dev 13 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
> pci4 at ppb3 bus 2
> ppb4 at pci0 dev 14 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
> pci5 at ppb4 bus 1
> vga1 at pci5 dev 0 function 0 "ATI Radeon X550" rev 0x00
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> "ATI Radeon X550 Sec" rev 0x00 at pci5 dev 0 function 1 not configured
> pchb0 at pci0 dev 24 function 0 "AMD AMD64 HyperTransport" rev 0x00
> pchb1 at pci0 dev 24 function 1 "AMD AMD64 Address Map" rev 0x00
> pchb2 at pci0 dev 24 function 2 "AMD AMD64 DRAM Cfg" rev 0x00
> pchb3 at pci0 dev 24 function 3 "AMD AMD64 Misc Cfg" rev 0x00
> isa0 at pcib0
> isadma0 at isa0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> pckbc0 at isa0 port 0x60/5
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> mpu0 at isa0 port 0x330/2: generic MPU-401 compatible
> midi0 at mpu0: <MPU-401 MIDI UART>
> pcppi0 at isa0 port 0x61
> midi1 at pcppi0: <PC speaker>
> spkr0 at pcppi0
> lpt0 at isa0 port 0x378/4 irq 7
> it0 at isa0 port 0x290/8: IT87
> fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> dkcsum: wd0 matches BIOS drive 0x80
> root on wd0a swap on wd0b dump on wd0b

Reply via email to