From owner-freebsd-fs@freebsd.org Fri Nov 11 15:31:10 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 12A9CC3BECF for ; Fri, 11 Nov 2016 15:31:10 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C85671BE4 for ; Fri, 11 Nov 2016 15:31:09 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8CD042075D for ; Fri, 11 Nov 2016 10:31:08 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Fri, 11 Nov 2016 10:31:08 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=zyxst.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=YXNo7sn404eXM6Z cCViHqCykpfQ=; b=kt/8sLUATa2s/Mm1waB9nHDqrya6hPZtsvO8jBugdp+5Kak YKl5CwqUg8TYmBr8BX+5bXcIjaau0TAVJ309LDdrRmaqYLXXVjczPdQTdBrVGGTb FkN8Ijlq1fl7oQfNzpjT1rU3MsaLmPHIhdLr1JTsYV7yJB4Ol/zgsEChhI3o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=YXNo7sn404eXM6ZcCViHqCykpfQ=; b=uRUDdZVD4CYOA1muHqWU qW04RKYwX60IlOKTVljX4kGZaFyku4Ru68UOYN9WOh73yQPN45LjZ+qKuXdVX0Wx Qj/bc+KfEaOt/oDrHvmSBORYLaX68UwEUPqi+8pwjYiSa7rRIP0so616/PHImdn1 BKMSfa2MO3swL/vBKemIh58= X-ME-Sender: X-Sasl-enc: JTGUyHLFDzLtJxxyxkpAW3rGyOxFsVxdxvDbGZI0A/BU 1478878268 Received: from pumpkin.growveg.org (pumpkin.growveg.org [82.70.91.101]) by mail.messagingengine.com (Postfix) with ESMTPA id 1EAFD25078 for ; Fri, 11 Nov 2016 10:31:08 -0500 (EST) Subject: Re: mounting an ubuntu 14.04 bhyve image as a filesystem for editing References: <20161110152612.GH68652@e-new.0x20.net> From: tech-lists To: freebsd-fs@freebsd.org Message-ID: Date: Fri, 11 Nov 2016 15:30:59 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161110152612.GH68652@e-new.0x20.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: Fri, 11 Nov 2016 15:31:10 -0000 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 incidental] >> >> [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 > Hi, thanks for looking at this. Unfortunately it didn't work: root@host0:/vms/138# mdconfig -t vnode -f ubuntu138.img md2 root@host0:/vms/138# ext4fuse /dev/md2 /mnt Partition doesn't contain EXT4 filesystem 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 root@host0:/vms/138# ext4fuse /dev/md2s1 /mnt fuse: failed to open fuse device: No such file or directory root@host0:/vms/138# ext4fuse /dev/md2s2 /mnt Partition doesn't contain EXT4 filesystem root@host0:/vms/138# ext4fuse /dev/md2s5 /mnt Partition doesn't contain EXT4 filesystem I'm certain the defaults for 14.04 are ext4. Mind you, I upgraded this from ubuntu13.10. So it might be ext3. I have ext2fs kernel module installed: root@host0:/vms/138# kldstat | grep ext 13 1 0xffffffff81d90000 13c8e ext2fs.ko root@host0:/vms/138# root@host0:/vms/138# mount -t ext2fs /dev/md2 /mnt mount: /dev/md2: Invalid argument root@host0:/vms/138# mount -t ext2fs /dev/md2s1 /mnt mount: /dev/md2s1: Invalid argument root@host0:/vms/138# mount -t ext2fs /dev/md2s2 /mnt mount: /dev/md2s2: Invalid argument root@host0:/vms/138# mount -t ext2fs /dev/md2s5 /mnt mount: /dev/md2s5: Invalid argument As I understand it, this driver should also read ext3. Maybe bhyve does something meaning the filesystem in the image isn't readable as the installed filesystem of the image, to the host? Do you have any other suggestions? Many thanks, -- J.