*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to build nanobsd on a CF card for a Soekris Net4801. I started out with the howto at https://www.freebsd.org/doc/en_US.IS...bsd/howto.html. I can get it to build, but when I dd the image to the CF card and try to boot it, It says it can't find /boot/loader. I've tried about a million other things, and all I can get is either that message or booting just hangs with no output. What am I doing wrong?
Can you grab one of prepared images and try to boot from that? It sounds more like CF card boot issue than a problem with your image, but this would confirm my guess.
FreeBSD/x86 bootstrap loader, Revision 1.1
(root@pfs22-i386-builder, Fri Mar 13 08:35:23 CDT 2015)
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x11f7fd9 data=0x832cf0+0x279e60 syms=[0x4+0xf36c0+0x4+0x16b89c]
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.1-RELEASE-p6 #0 b69ba8f(releng/10.1)-dirty: Fri Mar 13 08:45:06 CDT 2015
I don't think the 4801 can do DMA on the CF-IDE slot. Anyway, I added "hw.ata.ata_dma=0" to the nano loader.conf on da0s1a and got slightly further.. Now it wants manual root filesystem specification on boot, and it doesn't seem to like anything I put in. The fstab on da0s1a is empty.. I'm confused. Also, I thought nanobsd was supposed to create 2 identical slices. Why then do I have da0s1a, and da0s2 but no da0s2a?
Guess I corrupted the filesystem somehow.. Reloaded the card, now I have the fstab... Changed the device names from ad0 to ada0, getting a tiny bit further..
Code:
ada0: 16.700MB/s transfers (PIO4, PIO 512bytesuhub0: 3 ports with 3 removable, self powered
)
ada0: 1953MB (4001760 512 byte sectors: 16H 63S/T 3970C)
ada0: Previously was known as ad0
random: unblocking device.
Trying to mount root from ufs:/dev/ada0s1a [ro]...
exec /sbin/init: error 20
exec /sbin/oinit: error 20
exec /sbin/init.bak: error 20
init: not found in path /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init
panic: no init
Checking what's in /sbin on the CF card, finding this:
Code:
ls: bin: Bad file descriptor
ls: media: Bad file descriptor
ls: sbin: Bad file descriptor
ls: usr: Bad file descriptor
tried fsck:
Code:
root@NANOBUILD:~ # fsck /dev/da0s1a
fsck: Could not determine filesystem type
root@NANOBUILD:~ # fsck -t ufs /dev/da0s1a
** /dev/da0s1a
BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE
ioctl (GCINFO): Inappropriate ioctl for device
fsck_ufs: /dev/da0s1a: can't read disk label
Reloaded the card after doing sysctl kern.geom.debugflags=16. sbin now exists. Boots up with:
Code:
ada0: 1953MB (4001760 512 byte sectors: 16H 63S/T 3970C)
ada0: Previously was known as ad0
random: unblocking device.
Trying to mount root from ufs:/dev/ada0s1a [ro]...
Setting hostuuid: 63aea72b-e433-11e4-9f10-000024c2bddc.
Setting hostid: 0x66fac3de.
Entropy harvesting: interrupts ethernet point_to_point swi.
Starting file system checks:
Unknown error; help!
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
Apr 16 12:23:30 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
Enter full pathname of shell or RETURN for /bin/sh:
# mount
/dev/ada0s1a on / (ufs, local, read-only)
devfs on /dev (devfs, local, multilabel)
/dev/md0 on /etc (ufs, local)
/dev/md1 on /var (ufs, local)
# fsck
** /dev/ada0s1a
BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE
ioctl (GCINFO): Inappropriate ioctl for device
fsck_ufs: /dev/ada0s1a: can't read disk label
How is it nanobsd is giving me a bad superblock right from the start? This shouldn't really be this difficult, should it?
I can now get this to boot if I skip checking filesystems. Perhaps someone has some hints why I'm seeing this superblock issue.
Last edited by blueh2o; 04-16-2015 at 11:41 AM.
Reason: update
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.