From owner-freebsd-questions@freebsd.org Fri May 31 21:33:35 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C146815C6408 for ; Fri, 31 May 2019 21:33:35 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [IPv6:2001:470:0:19b::b869:801b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "xray.he.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30DC285648 for ; Fri, 31 May 2019 21:33:35 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from 99.100.19.101 ([99.100.19.101]) by holgerdanske.com with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256:TLSv1.2:Kx=ECDH:Au=RSA:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Fri, 31 May 2019 14:33:32 -0700 Subject: Re: error when mounting md0 invalid argument To: freebsd-questions@freebsd.org References: From: David Christensen Message-ID: Date: Fri, 31 May 2019 14:33:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 May 2019 21:33:35 -0000 On 5/31/19 5:29 AM, David Mehler wrote: > Hello, > > I've got a copy of the FreeBSD 12.0 memstick img file. I'm trying to > mount it to make some changes to allow it to go serial terminal by > default. I'm doing: > > mdconfig -a -t vnode -f path/to/img > and have also added the -u0 option to that line as well. > > An mdconfig -l does indeed show /dev/md0 and file -s /dev/md0 shows > dos/mbr imgage I believe that was. I then try: > > mount /dev/md0 /mnt > > and get invalid argument. Nothing in the logs. I've tried > mount_msdosfs and mount_ufs same result invalid argument. > > Any suggestions appreciated. > > Thanks. > Dave. I wanted to make changes to: FreeBSD-11.2-RELEASE-amd64-memstick.img I burned the image to a USB flash drive and then mounted it: 2019-05-23 14:13:46 toor@ragnar ~ # camcontrol devlist | grep -i sandisk at scbus5 target 0 lun 0 (da0,pass5) 2019-05-23 14:16:27 toor@ragnar ~ # gpart show -p da0 => 1 7913470 da0 MBR (3.8G) 1 1600 da0s1 !239 (800K) 1601 1505616 da0s2 freebsd [active] (735M) 1507217 6406254 - free - (3.1G) 2019-05-23 14:17:24 toor@ragnar ~ # gpart show -p da0s2 => 0 1505616 da0s2 BSD (735M) 0 16 - free - (8.0K) 16 1505600 da0s2a freebsd-ufs (735M) 2019-05-23 14:17:53 toor@ragnar ~ # mount /dev/da0s2a /mnt 2019-05-23 14:18:04 toor@ragnar ~ # mount | grep da0s2a /dev/da0s2a on /mnt (ufs, local) The file system reads 100% full, but by working as root I can encroach into the reserved space and make changes to the BSD installer: 2019-05-23 14:18:18 toor@ragnar ~ # cd /mnt/usr/libexec/bsdinstall 2019-05-23 14:19:58 toor@ragnar /mnt/usr/libexec/bsdinstall # vi zfsboot If you have more than a little content to add, the proper way would be to start at the front end of whatever process creates the image. (I haven't learn that, yet.) David