Re: How to create qemu images?

2016-05-05 Thread Allan Jude
On 2016-05-05 23:18, Lundberg, Johannes wrote:
> Hi
> 
> I would like to create a live vm image for qemu like the snaphots vm images
> of FreeBSD that are available for download (but with my own configuration).
> 
> Can someone tell me how these are made? If crochet is being used, is there
> any board configuration for qemu?
> 
> Thanks!
> 

Those vm images are created from the 'release' subdirectory of the
source tree.

cd /usr/src/release
make vm-release

will create the stock images. There are config files in that directory
you can play with to adjust the partition layout etc.

-- 
Allan Jude
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


How to create qemu images?

2016-05-05 Thread Lundberg, Johannes
Hi

I would like to create a live vm image for qemu like the snaphots vm images
of FreeBSD that are available for download (but with my own configuration).

Can someone tell me how these are made? If crochet is being used, is there
any board configuration for qemu?

Thanks!

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
秘密保持について:この電子メールは、名宛人に送信したものであり、秘匿特権の対象となる情報を含んでいます。
もし、名宛人以外の方が受信された場合、このメールの破棄、およびこのメールに関する一切の開示、
複写、配布、その他の利用、または記載内容に基づくいかなる行動もされないようお願い申し上げます。
---
CONFIDENTIALITY NOTE: The information in this email is confidential
and intended solely for the addressee.
Disclosure, copying, distribution or any other action of use of this
email by person other than intended recipient, is prohibited.
If you are not the intended recipient and have received this email in
error, please destroy the original message.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: ctfmerge slows & sometimes crashes

2016-05-05 Thread Julian H. Stacey
Hans Petter Selasky wrote:
> On 05/05/16 23:53, Julian H. Stacey wrote:
> > Has anyone else noticed ctfmerge either
> > - temporarily sucks the life out of the machine,
> > - or crashes
> > ?
> > cd /usr/src; make buildworld ; make buildkernel
> > linking kernel.full
> > ctfmerge -L VERSION -g -o kernel.full ...
> > No rponse from these:
> >Attempt to start new xterm to host (to run top) fails,
> >Attempt to Control Z suspend the job in existing xterm is ignored,
> >Stroking keypad (aka mouse wobble) ignored
> >Screen stayed black (as it was before cos xdm was running & no human 
> > using it)
> >No disk activity.
> > Eventually laptop fan ran a bit faster for a bit (BIOS ?)
> > I had to power off laptop to reboot.
> >
> > I've seen it a few times in recent weeks with various recent current.
> >
> > uname -a
> > FreeBSD lapr.js.berklix.net 11.0-CURRENT FreeBSD 11.0-CURRENT
> > #4 r298975M: Wed May  4 14:59:04 CEST 2016
> > 
> > j...@lapr.js.berklix.net:/data/release/11.0-CURRENT/usr/obj/usr/src/sys/GENERIC
> > amd64
> >
> > /usr/src it crashed building is at svn 299060   OK I now have newer 
> > here.
> >
> > I have nothing to debug in /var/crash as
> > swapinfo2 355 200 1K-blocks
> > bsdlabel /dev/ada0s14 710 400
> >
> > dmesg real memory   3 221 225 472 (3072 MB)
> > dmesg avail memory  2 759 401 472 (2631 MB)
> > So ready for next one, I'll re bsdlabel the partition,
> > (less risky than keeping a 4G ram stick in with /etc/rc.conf 
> > dumpdev=/dev/da0 )
> >
> > Cheers,
> > Julian
> >
> 
> Hi,
> 
> I've seen this on 10-stable machines when compiling 11-current, but not 
> on 11-current machines doing the same build.
> 
> --HPS

Thanks HPS, I've repartitioned & rebooted with an exactly matching swap
swapinfo3145728
bsdlabel6291456
dmesg real memory   3221225472 (3072 MB)
dc 3145728 2 * p 6291456 512 * p 3221225472
& again running make buildkernel, I'll hope to offer a back trace next time.

Cheers,
Julian
--
Julian Stacey, BSD Linux Unix Sys Eng Consultant Munich http://berklix.eu/jhs/
 Mail plain text,  No quoted-printable, HTML, base64, MS.doc.
 Prefix old lines '> '  Reply below old, like play script.  Break lines by 80.
 Brexit: Meeting +UK blocks votes of Brits in EU  http://www.berklix.eu/brexit/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Jenkins build is back to normal : FreeBSD_HEAD #252

2016-05-05 Thread jenkins-admin
See 

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: ctfmerge slows & sometimes crashes

2016-05-05 Thread Hans Petter Selasky

On 05/05/16 23:53, Julian H. Stacey wrote:

Has anyone else noticed ctfmerge either
- temporarily sucks the life out of the machine,
- or crashes
?
cd /usr/src; make buildworld ; make buildkernel
linking kernel.full
ctfmerge -L VERSION -g -o kernel.full ...
No rponse from these:
   Attempt to start new xterm to host (to run top) fails,
   Attempt to Control Z suspend the job in existing xterm is ignored,
   Stroking keypad (aka mouse wobble) ignored
   Screen stayed black (as it was before cos xdm was running & no human using 
it)
   No disk activity.
Eventually laptop fan ran a bit faster for a bit (BIOS ?)
I had to power off laptop to reboot.

I've seen it a few times in recent weeks with various recent current.

uname -a
FreeBSD lapr.js.berklix.net 11.0-CURRENT FreeBSD 11.0-CURRENT
#4 r298975M: Wed May  4 14:59:04 CEST 2016

j...@lapr.js.berklix.net:/data/release/11.0-CURRENT/usr/obj/usr/src/sys/GENERIC
amd64

/usr/src it crashed building is at svn 299060   OK I now have newer here.

I have nothing to debug in /var/crash as
swapinfo2 355 200 1K-blocks
bsdlabel /dev/ada0s14 710 400

dmesg real memory   3 221 225 472 (3072 MB)
dmesg avail memory  2 759 401 472 (2631 MB)
So ready for next one, I'll re bsdlabel the partition,
(less risky than keeping a 4G ram stick in with /etc/rc.conf dumpdev=/dev/da0 )

Cheers,
Julian



Hi,

I've seen this on 10-stable machines when compiling 11-current, but not 
on 11-current machines doing the same build.


--HPS
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


ctfmerge slows & sometimes crashes

2016-05-05 Thread Julian H. Stacey
Has anyone else noticed ctfmerge either 
- temporarily sucks the life out of the machine,
- or crashes 
?
cd /usr/src; make buildworld ; make buildkernel
linking kernel.full
ctfmerge -L VERSION -g -o kernel.full ...
No rponse from these:
  Attempt to start new xterm to host (to run top) fails,
  Attempt to Control Z suspend the job in existing xterm is ignored,
  Stroking keypad (aka mouse wobble) ignored
  Screen stayed black (as it was before cos xdm was running & no human using it)
  No disk activity.
Eventually laptop fan ran a bit faster for a bit (BIOS ?)
I had to power off laptop to reboot.

I've seen it a few times in recent weeks with various recent current.

uname -a
FreeBSD lapr.js.berklix.net 11.0-CURRENT FreeBSD 11.0-CURRENT
#4 r298975M: Wed May  4 14:59:04 CEST 2016

j...@lapr.js.berklix.net:/data/release/11.0-CURRENT/usr/obj/usr/src/sys/GENERIC
amd64

/usr/src it crashed building is at svn 299060   OK I now have newer here.

I have nothing to debug in /var/crash as
swapinfo2 355 200 1K-blocks
bsdlabel /dev/ada0s14 710 400 

dmesg real memory   3 221 225 472 (3072 MB)
dmesg avail memory  2 759 401 472 (2631 MB)
So ready for next one, I'll re bsdlabel the partition, 
(less risky than keeping a 4G ram stick in with /etc/rc.conf dumpdev=/dev/da0 )

Cheers,
Julian
-- 
Julian Stacey, BSD Linux Unix Sys Eng Consultant Munich http://berklix.eu/jhs/
 Mail plain text,  No quoted-printable, HTML, base64, MS.doc.
 Prefix old lines '> '  Reply below old, like play script.  Break lines by 80.
 Brexit: Meeting +UK blocks votes of Brits in EU  http://www.berklix.eu/brexit/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


FreeBSD_HEAD_i386 - Build #3053 - Fixed

2016-05-05 Thread jenkins-admin
FreeBSD_HEAD_i386 - Build #3053 - Fixed:

Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/3053/
Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/3053/changes
Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/3053/console

Change summaries:

299126 by jkim:
Fix intmax_t to uintptr_t casting on 32-bit platforms.  Found by GCC.

Submitted by:   bde

299125 by zeising:
Fix kernel build with parallel make.

Approved by:jhb

299124 by zbb:
Fix GICv3 build after r299090

Obtained from:  Semihalf
Sponsored by:   Cavium

299123 by emaste:
bhnd: another build fix for GCC-using architectures

Further to r299119. GCC architectures failed with
bcma_subr.c:138: warning: control reaches end of non-void function

Sponsored by:   The FreeBSD Foundation

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: FreeBSD_HEAD_i386 - Build #3052 - Failure

2016-05-05 Thread Adrian Chadd
I'm looking at this again now. I thought I fixed it, but maybe I had
some stale .h files from a previous build.



-adrian


On 5 May 2016 at 11:16,   wrote:
> FreeBSD_HEAD_i386 - Build #3052 - Failure:
>
> Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/3052/
> Full change log: 
> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/3052/changes
> Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/3052/console
>
> Change summaries:
>
> 299122 by jhb:
> Fix  and  to not require .
>
> - Hardcode '8' instead of NBBY in _BITSET_BITS.
> - Define a private version of 'howmany' for use in __bitset_words().
> - While here, move a few more things out of _bitset.h and _cpuset.h to
>   bitset.h and cpuset.h, respectively.  The only things left in
>   _bitset.h and _cpuset.h are the bits needed to define a bitset
>   structure.
>
> Reviewed by:bde, kib (ish)
>
> 299121 by asomers:
> mpr(4) and mps(4) shouldn't indefinitely retry for "terminated ioc" errors
>
> Submitted by:   ken
> Reviewed by:slm
> MFC after:  4 weeks
> Sponsored by:   Spectra Logic Corp
> Differential Revision:  https://reviews.freebsd.org/D6210
>
> 299120 by emaste:
> Add explicit cast to fix mips and powerpc build after r299090
>
> Sponsored by:   The FreeBSD Foundation
>
> 299119 by emaste:
> bhnd: fix build on gcc architectures
>
> "make tinderbox" fails on sparc64 GENERIC-NODEBUG with:
> bhnd_subr.c:188: warning: control reaches end of non-void function
>
> Sponsored by:   The FreeBSD Foundation
>
> 299118 by br:
> Implement FBT provider (MD part) for DTrace on MIPS.
> Tested on MIPS64.
>
> Sponsored by:   DARPA, AFRL
> Sponsored by:   HEIF5
>
> 299117 by skra:
> INTRNG - redefine struct intr_map_data to avoid headers pollution. Each
> struct associated with some type defined in enum intr_map_data_type
> must have struct intr_map_data on the top of its own definition now.
> When such structs are used, correct type and size must be filled in.
>
> There are three such structs defined in sys/intr.h now. Their
> definitions should be moved to corresponding headers by follow-up
> commits.
>
> While this change was propagated to all INTRNG like PICs,
> pic_map_intr() method implementations were corrected on some places.
> For this specific method, it's ensured by a caller that the 'data'
> argument passed to this method is never NULL. Also, the return error
> values were standardized there.
>
> 299116 by skra:
> Remove superfluous check. The pic_dev member of struct pic
> is never NULL on PIC found by pic_lookup().
>
> 299115 by kib:
> Warn about consequences of suspending threads in arbitrary state of
> execution.
>
> While there, fix minor nits in markup.
>
> Sponsored by:   The FreeBSD Foundation
> MFC after:  1 week
>
> 299114 by kib:
> Do not leak THR_FLAGS_SUSPENDED from the previous suspend/resume
> cycle.  The flag currently is cleared by the resumed thread.  If next
> suspend request comes before the thread was able to clean the flag, in
> which case suspender skip the thread.
>
> Instead, clear the THR_FLAGS_SUSPEND flag in resume_common(), we do
> not care how much code was executed in the resumed thread when the
> pthread_resume_*np(s) functions returned.
>
> PR: 209233
> Reported by:Lawrence Esswood 
> MFC after:  1 week
>
> 299113 by jmcneill:
> Add support for the Allwinner A83T (sun8iw6p1) SoC.
>
> Clocks, GPIO, UART, SD card / eMMC, USB, watchdog, and ethernet are
> supported. Note that the A83T contains two clusters of four Cortex-A7
> CPUs, and only CPUs in first cluster are started for now.
>
> Tested on a Sinovoip Banana Pi BPI-M3.
>
> 299110 by adrian:
> [bwn] implement firmware tx/rx versioning and fix RSSI calculation.
>
> Different versions of firmware have different requirments for TX/RX
> packet layouts (and other things, of course.)  Currently the driver
> checks between 3xx and 4xx firmware by using the BWN_ISOLDFMT() macro,
> which doesn't take into account the 5xx firmware (which I think I need
> for the HT and N series PHY chips.  I'll know when I do the port.)
> BWN_HDRSIZE() also needs to learn about the 5xx series firmware
> as well.
>
> So:
>
> * add a firmware version enum
> * populate it based on the firmware version we read at load time
> * don't finish loading if the firmware is the 5xx firmware; any
>   code using BWN_ISOLDFMT or BWN_HDRSIZE needs updating (most notably
>   the TX and RX bits.)
>
> Then, for RX RSSI:
>
> * write down and reimplement the b43 rssi calculation method;
> * use it for the correct PHYs (which are all the ones we support);
> * do the RSSI calculation before radiotap, not after.
>
> Tested:
>
> * Broadcom BCM4312, STA mode
>
> Obtained from:  Linux b43 (careful writing and reimplementing; lots of 
> integer math..)
>
> 299109 by adrian:
> [bhnd] add missing bus file.
>
> 299108 by ngie:
> Revert r299096
>
> The change broke buildworld when building lib/libkvm
>
> This change 

Build failed in Jenkins: FreeBSD_HEAD #251

2016-05-05 Thread jenkins-admin
See 

--
[...truncated 14272 lines...]
--- cleandir_subdir_lib/atf ---
--- cleandepend ---
rm -f .depend.fs_test .depend.fs_test.* GPATH GRTAGS GSYMS GTAGS
--- cleanobj ---
--- cleandir_subdir_usr.bin ---
--- cleanobj ---
--- cleandir_subdir_lib ---
--- list_test.cleandir ---
(cd /builds/workspace/FreeBSD_HEAD/src/lib/atf/libatf-c/tests/detail &&  
DEPENDFILE=.depend.list_test  NO_SUBDIR=1 
/builds/workspace/FreeBSD_HEAD/obj/builds/workspace/FreeBSD_HEAD/src/make.amd64/bmake
 -f Makefile _RECURSING_PROGS=t  PROG=list_test  cleandir)
--- cleandir_subdir_lib/ncurses ---
--- cleandir_subdir_lib/ncurses/ncursesw ---
===> lib/ncurses/ncursesw (cleandir)
--- cleandir_subdir_usr.bin ---
--- cleandir_subdir_usr.bin/locate/code ---
===> usr.bin/locate/code (cleandir)
--- cleandir_subdir_lib ---
--- cleandir_subdir_lib/atf ---
--- clean ---
rm -f  list_test list_test.full list_test.debug list_test.o test_helpers.o
--- cleandepend ---
rm -f .depend.list_test .depend.list_test.* GPATH GRTAGS GSYMS GTAGS
--- cleanobj ---
--- cleandir_subdir_usr.sbin ---
--- cleanobj ---
--- cleandir_subdir_lib ---
--- map_test.cleandir ---
(cd /builds/workspace/FreeBSD_HEAD/src/lib/atf/libatf-c/tests/detail &&  
DEPENDFILE=.depend.map_test  NO_SUBDIR=1 
/builds/workspace/FreeBSD_HEAD/obj/builds/workspace/FreeBSD_HEAD/src/make.amd64/bmake
 -f Makefile _RECURSING_PROGS=t  PROG=map_test  cleandir)
--- cleandir_subdir_usr.sbin ---
--- cleandir_subdir_usr.sbin/bootparamd ---
===> usr.sbin/bootparamd (cleandir)
--- cleandir_subdir_usr.sbin/bootparamd/bootparamd ---
===> usr.sbin/bootparamd/bootparamd (cleandir)
--- cleandir_subdir_lib ---
--- clean ---
rm -f  map_test map_test.full map_test.debug map_test.o test_helpers.o
--- cleandepend ---
--- cleandir_subdir_usr.bin ---
--- cleanobj ---
--- cleandir_subdir_lib ---
rm -f .depend.map_test .depend.map_test.* GPATH GRTAGS GSYMS GTAGS
--- cleanobj ---
--- cleandir_subdir_usr.bin ---
--- cleandir_subdir_usr.bin/locate/locate ---
===> usr.bin/locate/locate (cleandir)
--- cleandir_subdir_lib ---
--- process_test.cleandir ---
(cd /builds/workspace/FreeBSD_HEAD/src/lib/atf/libatf-c/tests/detail &&  
DEPENDFILE=.depend.process_test  NO_SUBDIR=1 
/builds/workspace/FreeBSD_HEAD/obj/builds/workspace/FreeBSD_HEAD/src/make.amd64/bmake
 -f Makefile _RECURSING_PROGS=t  PROG=process_test  cleandir)
--- clean ---
rm -f  process_test process_test.full process_test.debug process_test.o 
test_helpers.o
--- cleandepend ---
rm -f .depend.process_test .depend.process_test.* GPATH GRTAGS GSYMS GTAGS
--- cleanobj ---
--- sanity_test.cleandir ---
(cd /builds/workspace/FreeBSD_HEAD/src/lib/atf/libatf-c/tests/detail &&  
DEPENDFILE=.depend.sanity_test  NO_SUBDIR=1 
/builds/workspace/FreeBSD_HEAD/obj/builds/workspace/FreeBSD_HEAD/src/make.amd64/bmake
 -f Makefile _RECURSING_PROGS=t  PROG=sanity_test  cleandir)
--- cleandir_subdir_usr.sbin ---
--- cleanobj ---
--- cleandir_subdir_usr.sbin/bootparamd/callbootd ---
===> usr.sbin/bootparamd/callbootd (cleandir)
--- cleandir_subdir_lib ---
--- clean ---
rm -f  sanity_test sanity_test.full sanity_test.debug sanity_test.o 
test_helpers.o
--- cleandepend ---
rm -f .depend.sanity_test .depend.sanity_test.* GPATH GRTAGS GSYMS GTAGS
--- cleandir_subdir_usr.bin ---
--- cleanobj ---
--- cleandir_subdir_lib ---
--- cleanobj ---
--- text_test.cleandir ---
(cd /builds/workspace/FreeBSD_HEAD/src/lib/atf/libatf-c/tests/detail &&  
DEPENDFILE=.depend.text_test  NO_SUBDIR=1 
/builds/workspace/FreeBSD_HEAD/obj/builds/workspace/FreeBSD_HEAD/src/make.amd64/bmake
 -f Makefile _RECURSING_PROGS=t  PROG=text_test  cleandir)
--- cleandir_subdir_usr.bin ---
--- cleandir_subdir_usr.bin/biff ---
===> usr.bin/biff (cleandir)
--- cleandir_subdir_usr.sbin ---
--- cleanobj ---
--- cleandir_subdir_lib ---
--- clean ---
rm -f  text_test text_test.full text_test.debug text_test.o test_helpers.o
--- cleandepend ---
rm -f .depend.text_test .depend.text_test.* GPATH GRTAGS GSYMS GTAGS
--- cleanobj ---
--- cleandir_subdir_usr.sbin ---
--- cleandir_subdir_usr.sbin/bsdinstall ---
===> usr.sbin/bsdinstall (cleandir)
--- cleandir_subdir_lib ---
--- user_test.cleandir ---
(cd /builds/workspace/FreeBSD_HEAD/src/lib/atf/libatf-c/tests/detail &&  
DEPENDFILE=.depend.user_test  NO_SUBDIR=1 
/builds/workspace/FreeBSD_HEAD/obj/builds/workspace/FreeBSD_HEAD/src/make.amd64/bmake
 -f Makefile _RECURSING_PROGS=t  PROG=user_test  cleandir)
--- cleandir_subdir_usr.bin ---
--- cleanobj ---
--- cleandir_subdir_lib ---
--- clean ---
rm -f  user_test user_test.full user_test.debug user_test.o test_helpers.o
--- cleandepend ---
--- cleandir_subdir_usr.bin ---
--- cleandir_subdir_usr.bin/from ---
===> usr.bin/from (cleandir)
--- cleandir_subdir_lib ---
rm -f .depend.user_test .depend.user_test.* GPATH GRTAGS GSYMS GTAGS
--- cleanobj ---
--- cleanobj ---
--- atf_c_test.cleandir ---
(cd /builds/workspace/FreeBSD_HEAD/src/lib/atf/libatf-c/tests 

Re: boot fails "Can't stat /dev/da0a: No such file or directory"

2016-05-05 Thread Edward Tomasz Napierała
On 0505T1847, Graham Menhennitt wrote:
> On 3/05/2016 07:59 PM, Edward Tomasz Napierała wrote:
> > On 0503T1922, Graham Menhennitt wrote:
> >> On 3/05/2016 06:42 PM, Edward Tomasz Napierała wrote:
> >>> On 0502T0643, Graham Menhennitt wrote:
>  On 30/04/2016 06:53 PM, Graham Menhennitt wrote:
> > Hi all,
> >
> > I have a USB disk that I use for backup. Up till now, it's mounted
> > without any problems at boot time. After updating to -current as of
> > yesterday, it doesn't mount and causes the boot to fail.
> >
> > My /etc/fstab looks like:
> >
> > # DeviceMountpointFStypeOptionsDumpPass#
> >
> > /dev/ada0s1a/ufsrw11
> > /dev/ada0s1bnoneswapsw00
> > /dev/da0a/backupufsrw,late11
> >
> >
> > I tried adding the "late" to fix the problem, but it doesn't help.
> >
> > The error message is:
> >
> > /dev/ada0s1a: clean...
> > Can't stat /dev/da0a: No such file or directory
> > Unknown error; help!
> > ERROR: ABORTING BOOT (sending SIGTERM to parent)!
> >
> >
> > (hand transcribed - maybe typos)
> >
> > Can anybody help, please.
> >
> > Thanks,
> > Graham
>  Sorry, I forgot to mention...
> 
>  I commented out that line from fstab which allows the boot to complete.
>  I can then manually mount it without any problems. It looks like the
>  device doesn't get created early enough.
> >>> Have you run mergemaster after upgrade?  In particular, do you have
> >>> the current version of /etc/rc.d/mountcritlocal?
> >>>
> >> Thanks for replying, Edward. Yes I've installed that file. The delay
> >> that Dave told me about has fixed the problem.
> > Still, it would be nice if this worked by default.  The updated
> > mountcritlocal script should wait for USB to release root tokens
> > if the mount initially fails,
> >
> Ok, I tried to do a bit of diagnosis here. I took out the delay from
> /boot/loader.conf and I added "set -x" to the top of
> /etc/rc.d/mountcritlocal (before the start of the mountcritlocal_start()
> function definition). I then rebooted. I didn't see any shell command
> output from the "set -x" before the error occurred. That means that the
> error is happening before /etc/rc.d/mountcritlocal is being read.
> 
> When I put the delay back in and boot, I see the shell commands after
> the filesystems are mounted (and, hence, after the error would have
> occurred if the delay wasn't there). So I don't think mountcritlocal is
> going to help me.
> 
> I'm not sure what else to try. if you have any suggestions, I can do
> some experimenting. Is there a simple way to capture the output from the
> rc.d scripts?

Huh, you've nailed it - it was a different script, /etc/rc.d/fsck; it
runs before mountcritlocal.  Could you try the following patch?  You can
apply it directly to /etc/rc.d:

Index: etc/rc.d/fsck
===
--- etc/rc.d/fsck   (revision 299115)
+++ etc/rc.d/fsck   (working copy)
@@ -14,6 +14,35 @@ desc="Run file system checks"
 start_cmd="fsck_start"
 stop_cmd=":"
 
+# Originally, root mount hold had to be released before mounting
+# the root filesystem.  This delayed the boot, so it was changed
+# to only wait if the root device isn't readily available.  This
+# can result in this script executing before all the devices - such
+# as graid(8) - are available.  Thus, should the mount fail,
+# we will wait for the root mount hold release and retry.
+root_hold_wait()
+{
+   waited=0
+   while true; do
+   holders="$(sysctl -n vfs.root_mount_hold)"
+   if [ -z "${holders}" ]; then
+   break;
+   fi
+   if [ ${waited} -eq 0 ]; then
+   echo -n "Waiting ${root_hold_delay}s" \
+   "for the root mount holders: ${holders}"
+   else
+   echo -n .
+   fi
+   if [ ${waited} -ge ${root_hold_delay} ]; then
+   echo
+   break
+   fi
+   sleep 1
+   waited=$(($waited + 1))
+   done
+}
+
 fsck_start()
 {
if [ "$autoboot" = no ]; then
@@ -31,7 +60,21 @@ fsck_start()
fsck -p
fi
 
-   case $? in
+   err=$?
+   if [ ${err} -eq 3 ]; then
+   echo "Warning! Some of the devices might not be" \
+   "available; retrying"
+   root_hold_wait
+   check_startmsgs && echo "Restarting file system checks:"
+   if checkyesno background_fsck; then
+   fsck -F -p
+   else
+   fsck -p
+ 

Re: boot fails "Can't stat /dev/da0a: No such file or directory"

2016-05-05 Thread Graham Menhennitt
On 3/05/2016 07:59 PM, Edward Tomasz Napierała wrote:
> On 0503T1922, Graham Menhennitt wrote:
>> On 3/05/2016 06:42 PM, Edward Tomasz Napierała wrote:
>>> On 0502T0643, Graham Menhennitt wrote:
 On 30/04/2016 06:53 PM, Graham Menhennitt wrote:
> Hi all,
>
> I have a USB disk that I use for backup. Up till now, it's mounted
> without any problems at boot time. After updating to -current as of
> yesterday, it doesn't mount and causes the boot to fail.
>
> My /etc/fstab looks like:
>
> # DeviceMountpointFStypeOptionsDumpPass#
>
> /dev/ada0s1a/ufsrw11
> /dev/ada0s1bnoneswapsw00
> /dev/da0a/backupufsrw,late11
>
>
> I tried adding the "late" to fix the problem, but it doesn't help.
>
> The error message is:
>
> /dev/ada0s1a: clean...
> Can't stat /dev/da0a: No such file or directory
> Unknown error; help!
> ERROR: ABORTING BOOT (sending SIGTERM to parent)!
>
>
> (hand transcribed - maybe typos)
>
> Can anybody help, please.
>
> Thanks,
> Graham
 Sorry, I forgot to mention...

 I commented out that line from fstab which allows the boot to complete.
 I can then manually mount it without any problems. It looks like the
 device doesn't get created early enough.
>>> Have you run mergemaster after upgrade?  In particular, do you have
>>> the current version of /etc/rc.d/mountcritlocal?
>>>
>> Thanks for replying, Edward. Yes I've installed that file. The delay
>> that Dave told me about has fixed the problem.
> Still, it would be nice if this worked by default.  The updated
> mountcritlocal script should wait for USB to release root tokens
> if the mount initially fails,
>
Ok, I tried to do a bit of diagnosis here. I took out the delay from
/boot/loader.conf and I added "set -x" to the top of
/etc/rc.d/mountcritlocal (before the start of the mountcritlocal_start()
function definition). I then rebooted. I didn't see any shell command
output from the "set -x" before the error occurred. That means that the
error is happening before /etc/rc.d/mountcritlocal is being read.

When I put the delay back in and boot, I see the shell commands after
the filesystems are mounted (and, hence, after the error would have
occurred if the delay wasn't there). So I don't think mountcritlocal is
going to help me.

I'm not sure what else to try. if you have any suggestions, I can do
some experimenting. Is there a simple way to capture the output from the
rc.d scripts?

Graham

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"