/sbin/bsdlabel -B -r -w ad4s1 auto FAILED

  • I get the following when I try to do a quick install of pfSense to a hard disk (or with custom install, using all default settings):

    Executing '/sbin/bsdlabel -B -r -w ad4s1 auto'
    bsdlabel: /dev/ad4s1: No such file or directory
    Exit status: 1

    I have a vanilla Asus motherboard, Intel CPU, generic SATA disk.  I've never played with pfSense before so not sure what details would be of use diagnosing this.

    Another poster mentioned fixing the above problem with "a low-level format".  How would I do that?  I am formatting, partitioning, and installing bootblocks per defaults on the disk as I go through the custom install path and all succeed, but after selecting disk ad4 for install and hitting "go" I get the above error.

  • Rebel Alliance Developer Netgate

    Before trying anything like that, try looking in the BIOS for any SATA options and adjust them, in particular, check for a setting such as IDE/Legacy/AHCI and toggle it.

  • I am getting this exact same error.

    I'm trying to get pfsense installed onto a C7 system (a jetway J7F4 board) onto a WD800BEVT 80GB SATA drive. After numerous attempts, I simply can't get it installed.

    I looked in the BIOS for settings related to IDE/Legacy/AHCI, like you suggested, and didn't find anything. I tried lots of combinations of other settings in the BIOS with things related to IDE and SATA to no avail.

    I tried sticking the HD into my desktop thinking maybe I could get it to install there (after trying various BIOS settings), but was also unsuccessful that way. I tried attaching the HD to a USB "toaster" then to a VM, but that turned up the same result.

    I then attempted to install pfsense onto an old IDE drive I had laying around, then tried dd'ing the drive onto my sata drive. It wouldn't boot, tho. (I was just getting creative at this point, I didn't think it'd work either).

    My next option is probably to buy this: http://www.newegg.com/Product/Product.aspx?Item=N82E16812226024

    I am also considering just getting a CF card and IDE adapter and going the embedded route, but it sounds like I can't install packages then (but I've seen some mixed information regarding that). Plus, I would really like to run a squid proxy on it, since my current smoothwall setup runs one. Which is why I've considered getting a laptop IDE drive (which aren't cheap these days compared to SATA equivalents).

    I have also tried pfHacom (found via google) which apparently had some modifications in the area of SATA support, but that didn't help, either.

    Please help! I'd really like to get this installed onto the laptop SATA drive I already have.

  • Rebel Alliance Developer Netgate

    Have you tried making multiple partitions? You might try making one partition about 4gb for /, then use the rest of the disk for /usr

  • I suppose I could try that, but I'm wondering why that would make a difference. Could you explain why that would help it?

  • Rebel Alliance Developer Netgate

    Some BIOS implementations have issues booting partitions that cross the 1024 cylinder boundary.

  • jimp, thank you for your help, but that still did not work. I created a 4gb for / and it still had trouble running the bsdlabel command (/dev/ad6s1: no such file or directory)

    Any other ideas?

  • Rebel Alliance Developer Netgate

    Can you break out into a shell and look at the install log in /tmp? (I think it's /tmp, it may be in /var/tmp)

    It may be that a command before that is really the one that fails. If ad6s1 doesn't exist, but ad6 does, that might mean that fdisk failed.

  • Sounds reasonable, but how do I get to a shell from the install process?

    I did a quick google search on how to do it… and came across this, which might be helpful to me just by chance. I will try his suggestion in the mean time.

  • Rebel Alliance Developer Netgate

    You should be able to cancel out of the install and get back to the pfSense menu, and option 8 is a shell prompt.

    There may also be a button to view the log when you get that error.

  • Actually, that mail list I came across turned out to be helpful!

    Stupid Macs, grrr.

    For future reference of people coming across this thread:

    The problem turned out to be an initialization problem related to FreeBSD not
    beeing able to wipe out partition created with a mac (EFI).
    This is really a macintosh problem

    Solution is:

    1. Use Disk Utility and erase the disk
    2. Format a "free space" partition using DOS Label

    Once you have done that you can then start using your disk properly and install
    whatever you want on It.

  • @electrofreak:

    Solution is:

    1. Use Disk Utility and erase the disk
    2. Format a "free space" partition using DOS Label

    You = The Man.

    This worked for me as well!

  • Rebel Alliance Developer Netgate

    That is one of the suggestions here:


    From a shell on the Live CD:

    # dd if=/dev/zero of=/dev/ad0 bs=8k count=16
    # fdisk -I ad0

  • That is actually the weird thing…. I actually tried writing zeros to much of the disk (I got impatient, but it definitely got the first 16 blocks). Not sure why it didn't work, but... the Mac solution did, thankfully.

  • Rebel Alliance Developer Netgate

    It may have needed the whole disk wiped then.

    # dd if=/dev/zero of=/dev/ad0 bs=1M

Log in to reply