From owner-freebsd-fs@freebsd.org Sun Nov 13 09:55:47 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB88AC3D2A0 for ; Sun, 13 Nov 2016 09:55:47 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "0x20.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65E5312FC; Sun, 13 Nov 2016 09:55:47 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 1A95C6E0081; Sun, 13 Nov 2016 10:55:45 +0100 (CET) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.7/8.14.7) with ESMTP id uAD9tiVF020153; Sun, 13 Nov 2016 10:55:44 +0100 (CET) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.7/8.14.7/Submit) id uAD9tikh019233; Sun, 13 Nov 2016 10:55:44 +0100 (CET) (envelope-from lars) Date: Sun, 13 Nov 2016 10:55:44 +0100 From: Lars Engels To: Gary Palmer Cc: tech-lists , freebsd-fs@freebsd.org Subject: Re: mounting an ubuntu 14.04 bhyve image as a filesystem for editing Message-ID: <20161113095544.GJ68652@e-new.0x20.net> References: <20161110152612.GH68652@e-new.0x20.net> <20161111160909.GA67078@in-addr.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7hPxVvx9zUFtB5wE" Content-Disposition: inline In-Reply-To: <20161111160909.GA67078@in-addr.com> X-Editor: VIM - Vi IMproved 7.4 X-Operation-System: FreeBSD 8.4-RELEASE-p35 User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2016 09:55:47 -0000 --7hPxVvx9zUFtB5wE Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 11, 2016 at 04:09:09PM +0000, Gary Palmer wrote: > On Fri, Nov 11, 2016 at 03:30:59PM +0000, tech-lists wrote: > > On 10/11/2016 15:26, Lars Engels wrote: > > > On Thu, Nov 10, 2016 at 12:32:07PM +0000, tech-lists wrote: > > >> Hello list, > > >> > > >> [originally sent to virtualization@ but got no replies, probably > > >> because, thinking about it, the fact that it's a bhyve image is inci= dental] > > >> > > >> [snipped stuff about bhyve] > > >> > > >> Is there a way of taking an ubuntu VM image that normally runs as a > > >> bhyve guest, mounting it on some mountpoint on the freebsd host and > > >> directly editing the files within it? > > >> > > >> Alternatively, is there a way of making grub boot the image into > > >> single-user-mode like one can with freebsd? > > >> > > > > > > That should work (provided sysutils/fusefs-ext4fuse is installed): > > > > > > # mdconfig -t vnode -f $ubuntu_img > > > # ext4fuse /dev/md0 /mnt > > > > >=20 > > Hi, thanks for looking at this. > >=20 > > Unfortunately it didn't work: > >=20 > > root@host0:/vms/138# mdconfig -t vnode -f ubuntu138.img > > md2 > >=20 > > root@host0:/vms/138# ext4fuse /dev/md2 /mnt > > Partition doesn't contain EXT4 filesystem > >=20 > > root@host0:/vms/138# ls -la /dev/md2* > > crw-r----- 1 root operator 0xb0 Nov 11 14:58 /dev/md2 > > crw-r----- 1 root operator 0xb4 Nov 11 15:06 /dev/md2s1 > > crw-r----- 1 root operator 0xb5 Nov 11 15:06 /dev/md2s2 > > crw-r----- 1 root operator 0xb6 Nov 11 15:06 /dev/md2s5 > >=20 > > root@host0:/vms/138# ext4fuse /dev/md2s1 /mnt > > fuse: failed to open fuse device: No such file or directory >=20 >=20 > That is a different error than the others. I somewhat suspect > that there is an ext partition on md2s1 but something else > prevented the mount from proceeding. Is there anything in > dmesg or /var/log/messages? >=20 > Do you have a /dev/fuse? You need to load the fuse kernel module first # kldload fuse --7hPxVvx9zUFtB5wE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJYKDigXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RjQwMDE3RTRERjUzMTI1N0FGRTUxNDlF NTRDQjM3RDNBMDg5RDZEAAoJEOVMs306CJ1tkukH+wT6hJp8Cs51k6PXGo5f26nk YQRC3ZNYIxZhc2KMZ2IZc9W0UJMc0zj2oDAFdrZ2pdQgYcmCVUa4PpVht19/mEXR 9fPJYAZioQ5KfB8NBOkmcjxdaOXOFXexT8AAt/XV61Sy/7omzerLXDGXa0AQzqZi 69aRqO4R7lFdEobLbj0v4tIU1+ks1UerU47bBZxcT5tJqRZNY9pKaUphzMzUS1op K7xKfa9IhVzSOLIxEcZZh8dmqrc5K+FcW2E1OYNW6g9fwZFlaDyOFjKmPTODRWlI uQjrtVqpS1qdXILpRHFdvTB22C4YHxkEmnSUgLHJxaaxApAgWoRvZDzQHi8LROU= =6r2m -----END PGP SIGNATURE----- --7hPxVvx9zUFtB5wE--