Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2009 23:37:34 -0800 (PST)
From:      Luke Dean <LukeD@pobox.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: "boot0cfg: read /dev/ad1: Input/output error" using nanobsd
Message-ID:  <alpine.BSF.2.00.0902152314340.80490@border.lukas.is-a-geek.org>
In-Reply-To: <alpine.BSF.2.00.0902151757360.80490@border.lukas.is-a-geek.org>
References:  <alpine.BSF.2.00.0902151757360.80490@border.lukas.is-a-geek.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> I'm running FreeBSD 7.0 on a soekris 4801 with an image built by nanobsd. 
> It's a small piece of headless hardware that boots from a compact flash drive 
> - no moving parts.
>
> I wanted to update the operating system to 7.1 and install some more packages 
> on it, so I built a new image with nanobsd and uploaded it to the second 
> partition using nanobsd's updatep2 tool.  The new image mounts fine, but the 
> last line of updatep2, "boot0cfg -s 2 -v ${NANO_DRIVE}" fails with the 
> message I've quoted in the subject line.
>
> The machine boots fine, but I can't provoke any kind of response from 
> boot0cfg except for input/output errors.  I'd like to make the machine start 
> booting from the second slice.
>
> Any ideas?

More information...

The number of heads that the "diskinfo" reports is different depending on 
whether the compact flash card is plugged into the soekris box or mounted 
in a USB card reader/writer.

The usb reader/writer reports:
da0
         512             # sectorsize
         2052513792      # mediasize in bytes (1.9G)
         4008816         # mediasize in sectors
         249             # Cylinders according to firmware.
         255             # Heads according to firmware.
         63              # Sectors according to firmware.
The soekris box reports:
ad1
         512             # sectorsize
         2052513792      # mediasize in bytes (1.9G)
         4008816         # mediasize in sectors
         3977            # Cylinders according to firmware.
         16              # Heads according to firmware.
         63              # Sectors according to firmware.

This is the same compact flash card.

I gave up on boot0cfg and booting from the second partition, so I took the 
compact flash card out of the soekris box, connected it to my workstation 
with a USB card reader, and wrote a whole new image to it.

Even after doing this, boot0cfg still won't work.  I noticed some new 
messages on the console when I tried "boot0cfg -v ad1":

ata0: FAILURE - non aligned DMA transfer attempted
ad1: setting up DMA failed
boot0cfg: read /dev/ad1: Input/output error

ad1 is attached to ata0, per dmesg:
ad1: 1957MB <LEXAR ATA FLASH CARD 20060911> at ata0-slave WDMA2

I think this means there is some kind of geometry problem here, but I 
don't know how to fix it.
I'd like to find a solution to this, but it's not critical.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0902152314340.80490>