Subject: Fewer cylinders for a hd after using a ACPI kernel
To: None <current-users@NetBSD.org>
From: Bernd Ernesti <netbsd@lists.veego.de>
List: current-users
Date: 04/18/2006 15:59:05
--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

the number of cylinders for one hd changed after I booted a kernel with ACPI support.

I got a new motherboard and had a problem with a normal kernel when i did a
shutdown -p, which caused a kernel panic after the sync step, so I tried
to use a ACPI kernel and thats where my problem with the hd started.

This is a part of the dmesg output for a non ACPI kernel of the new mb and
the disk. There is only one disk connected:

viaide0 at pci0 dev 8 function 0
viaide0: NVIDIA nForce3 250 IDE Controller (rev. 0xa2)
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at irq 14
atabus0 at viaide0 channel 0
viaide0: secondary channel configured to compatibility mode
viaide0: secondary channel interrupting at irq 15
[..]
wd0 at atabus0 drive 0: <WDC WD2500JB-00GVA0>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 232 GB, 484521 cyl, 16 head, 63 sec, 512 bytes/sect x 488397168 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)

And here is the same part after i booted with the new ACPI kernel:

viaide0 at pci0 dev 8 function 0
viaide0: NVIDIA nForce3 250 IDE Controller (rev. 0xa2)
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
atabus0 at viaide0 channel 0
viaide0: secondary channel configured to compatibility mode
viaide0: secondary channel interrupting at ioapic0 pin 15 (irq 15)
[..]
wd0 at atabus0 drive 0: <WDC WD2500JB-00GVA0>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 232 GB, 484518 cyl, 16 head, 63 sec, 512 bytes/sect x 488395055 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)

As you can see, the number of cylinders changed from 484521 to 484518 and
the following errors occurred, because the rc script tried to mount a
partition which was at the end of this disk:

wd0i: error reading fsbn 20971436 of 20971436-20971439 (wd0 bn 488396156; cn 484519 tn 15 sn 59), retrying
wd0: (id not found)
[same error repeated 6 times]

The number of sectors before I booted with the ACPI kernel matches the
manufactor spec: http://www.wdc.com/en/products/Products.asp?DriveID=42

I reduced the total size in the disklabel, changed the parition, did a newfs
and everything is working again.
Except that I lost my data on that partition and 3 cylinders.

How can a ACPI kernel change the number of cylinders for a disk?
I tried to boot with the old kernel and even switching back to the old mb, but
nothing gave the 3 cyl back.

Attached is the full dmesg of the acpi kernel and the old fdisk.wd0 before
I booted the ACPI kernel.

Bernd


--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="dmesg.boot-acpi"

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 3.99.18 (ARRESUM-ACPI) #0: Mon Apr 17 17:52:40 CEST 2006
	bernd@parresum.lan.rfc1918.veego.de:/usr/obj/src.i386/sys/arch/i386/compile/ARRESUM-ACPI
total memory = 2047 MB
avail memory = 2003 MB
BIOS32 rev. 0 found at 0xfb030
mainbus0 (root)
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Unknown K7 (Athlon) (686-class), 1808.91 MHz, id 0x20ff2
cpu0: features 78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features 78bfbff<PGE,MCA,CMOV,PAT,PSE36,MPC,MMX>
cpu0: features 78bfbff<FXSR,SSE,SSE2>
cpu0: features2 1<SSE3>
cpu0: "AMD Athlon(tm) 64 Processor 3000+"
cpu0: calibrating local timer
cpu0: apic clock running at 200 MHz
ioapic0 at mainbus0 apid 2 (I/O APIC)
ioapic0: pa 0xfec00000, version 11, 24 pins
acpi0 at mainbus0: Advanced Configuration and Power Interface
acpi0: using Intel ACPI CA subsystem version 20060217
acpi0: X/RSDT: OemId <Nvidia,AWRDACPI,42302e31>, AslId <AWRD,01010101>
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
acpi0: fixing up intr link \_SB_.PCI0.LMAC
acpi0: fixing up intr link \_SB_.PCI0.LMCI
acpi0: fixing up intr link \_SB_.PCI0.LIDE
acpi0: fixing up intr link \_SB_.PCI0.LSID
acpi0: fixing up intr link \_SB_.PCI0.LNK1
acpi0: fixing up intr link \_SB_.PCI0.LNK2
acpi0: fixing up intr link \_SB_.PCI0.LNK3
acpi0: fixing up intr link \_SB_.PCI0.L3CM
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
acpibut0 at acpi0 (PNP0C0C): ACPI Power Button
PNP0C01 [System Board] at acpi0 not configured
PNP0A03 [PCI/PCI-X Host Bridge] at acpi0 not configured
ACPI Object Type 'Power' (0x0b) at acpi0 not configured
_NVRAIDBU at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
PNP0000 [AT Interrupt Controller] at acpi0 not configured
PNP0200 [AT DMA Controller] at acpi0 not configured
attimer0 at acpi0 (PNP0100): AT Timer
attimer0: io 0x40-0x43 irq 0
PNP0B00 [AT Real-Time Clock] at acpi0 not configured
pcppi0 at acpi0 (PNP0800)
pcppi0: io 0x61
spkr0 at pcppi0
npx0 at acpi0 (PNP0C04)
npx0: io 0xf0-0xff irq 13
npx0: using exception 16
fdc0 at acpi0 (PNP0700)
fdc0: io 0x3f0-0x3f5,0x3f7 irq 6 drq 2
com0 at acpi0 (PNP0501-1)
com0: io 0x3f8-0x3ff irq 4
com0: ns16550a, working fifo
com1 at acpi0 (PNP0501-2)
com1: io 0x2f8-0x2ff irq 3
com1: ns16550a, working fifo
lpt0 at acpi0 (PNP0400)
lpt0: io 0x378-0x37f irq 7
pckbc0 at acpi0 (PNP0303): kbd port
pckbc0: io 0x60,0x64 irq 1
joy0 at acpi0 (PNPB02F)
joy0: io 0x201
joy0: joystick not connected
pcppi0: attached to attimer0
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: NVIDIA nForce3 250 Host-PCI bridge (rev. 0xa1)
agp at pchb0 not configured
pcib0 at pci0 dev 1 function 0
pcib0: NVIDIA nForce3 250 PCI-ISA bridge (rev. 0xa2)
NVIDIA nForce3 250 SMBus Controller (SMBus serial bus, revision 0xa1) at pci0 dev 1 function 1 not configured
ohci0 at pci0 dev 2 function 0: NVIDIA nForce3 250 USB Host Controller (rev. 0xa1)
ohci0: interrupting at ioapic0 pin 9 (irq 9)
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: NVIDIA OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
ohci1 at pci0 dev 2 function 1: NVIDIA nForce3 250 USB Host Controller (rev. 0xa1)
ohci1: interrupting at ioapic0 pin 9 (irq 9)
ohci1: OHCI version 1.0, legacy support
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: NVIDIA OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 4 ports with 4 removable, self powered
ehci0 at pci0 dev 2 function 2: NVIDIA nForce3 250 USB2 Host Controller (rev. 0xa2)
ehci0: interrupting at ioapic0 pin 9 (irq 9)
ehci0: BIOS has given up ownership
ehci0: EHCI version 1.0
ehci0: companion controllers, 4 ports each: ohci0 ohci1
usb2 at ehci0: USB revision 2.0
uhub2 at usb2
uhub2: NVIDIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 8 ports with 8 removable, self powered
auich0 at pci0 dev 6 function 0: nForce3 250 MCP-T AC-97 Audio
auich0: interrupting at ioapic0 pin 5 (irq 5)
auich0: ac97: Avance Logic ALC850 codec; no 3D stereo
auich0: ac97: ext id 9c6<AC97_23,LDAC,SDAC,CDAC,SPDIF,DRA>
viaide0 at pci0 dev 8 function 0
viaide0: NVIDIA nForce3 250 IDE Controller (rev. 0xa2)
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
atabus0 at viaide0 channel 0
viaide0: secondary channel configured to compatibility mode
viaide0: secondary channel interrupting at ioapic0 pin 15 (irq 15)
atabus1 at viaide0 channel 1
viaide1 at pci0 dev 10 function 0
viaide1: NVIDIA nForce3 250 Serial ATA Controller (rev. 0xa2)
viaide1: bus-master DMA support present
viaide1: primary channel wired to native-PCI mode
viaide1: using ioapic0 pin 11 (irq 11) for native-PCI interrupt
atabus2 at viaide1 channel 0
viaide1: secondary channel wired to native-PCI mode
atabus3 at viaide1 channel 1
ppb0 at pci0 dev 11 function 0: NVIDIA nForce3 250 AGP (rev. 0xa2)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga0 at pci1 dev 0 function 0: ATI Technologies product 0x4153 (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
ATI Technologies product 0x4173 (miscellaneous display) at pci1 dev 0 function 1 not configured
ppb1 at pci0 dev 14 function 0: NVIDIA nForce3 250 PCI-PCI bridge (rev. 0xa2)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled
skc0 at pci2 dev 11 function 0: ioapic0 pin 10 (irq 10)
skc0: interrupt moderation is 0 us
skc0: Marvell Yukon Lite Gigabit Ethernet rev. (0x9)
sk0 at skc0 port A: Ethernet address 00:14:85:ba:27:98
makphy0 at sk0 phy 0: Marvell 88E1011 Gigabit PHY, rev. 5
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
pchb1 at pci0 dev 24 function 0
pchb1: Advanced Micro Devices AMD64 HyperTransport configuration (rev. 0x00)
pchb2 at pci0 dev 24 function 1
pchb2: Advanced Micro Devices AMD64 Address Map configuration (rev. 0x00)
pchb3 at pci0 dev 24 function 2
pchb3: Advanced Micro Devices AMD64 DRAM configuration (rev. 0x00)
pchb4 at pci0 dev 24 function 3
pchb4: Advanced Micro Devices AMD64 Miscellaneous configuration (rev. 0x00)
isa0 at pcib0
lm0 at isa0 port 0x290-0x297: ITE8712F
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
isapnp0: no ISA Plug 'n Play devices found
ioapic0: enabling
audio0 at auich0: full duplex, independent
Kernelized RAIDframe activated
IPsec: Initialized Security Association Processing.
uhidev0 at uhub0 port 4 configuration 1 interface 0
uhidev0: Logitech N48, rev 1.00/4.01, addr 2, iclass 3/1
ums0 at uhidev0: 3 buttons and Z dir.
wsmouse0 at ums0 mux 0
wd0 at atabus0 drive 0: <WDC WD2500JB-00GVA0>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 232 GB, 484518 cyl, 16 head, 63 sec, 512 bytes/sect x 488395055 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsdisplay0: screen 5 added (80x25, vt100 emulation)
wsdisplay0: screen 6 added (80x25, vt100 emulation)
wsdisplay0: screen 7 added (80x25, vt100 emulation)

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="fdisk.wd0"

Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 484521, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 488397168

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 488397168

Partition table:
0: NTFS, OS/2 HPFS, QNX2 or Advanced UNIX (sysid 7)
    bootmenu: WinXP
    start 63, size 32901057 (16065 MB, Cyls 0-2048), Active
1: NetBSD (sysid 169)
    bootmenu: NetBSD
    start 356691195, size 131700870 (64307 MB, Cyls 22203-30401)
2: <UNUSED>
3: Ext. partition - LBA (sysid 15)
    start 32901120, size 323790075 (158101 MB, Cyls 2048-22203)
Extended partition table:
E0: NTFS, OS/2 HPFS, QNX2 or Advanced UNIX (sysid 7)
    start 32901183, size 64757952 (31620 MB, Cyls 2048-6079)
E1: NTFS, OS/2 HPFS, QNX2 or Advanced UNIX (sysid 7)
    start 97659198, size 259031997 (126480 MB, Cyls 6079-22203)
Bootselector enabled, timeout 5 seconds.

--PEIAKu/WMn1b1Hv9--