From owner-freebsd-current@FreeBSD.ORG Sat Aug 23 19:00:43 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6A2C1CF for ; Sat, 23 Aug 2014 19:00:43 +0000 (UTC) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E48E3236 for ; Sat, 23 Aug 2014 19:00:42 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id ty20so11261231lab.4 for ; Sat, 23 Aug 2014 12:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=5xzZArOPH2UXrceuxoV86Yk5yMFbXdHdNHf3uU+cabI=; b=tHmWP1lvBuY/db18x+PulcPJcuf+ANJ1shoX1ZPDfYKW2UX4ijAO8ju9GeolRmZnG6 nQyV2bmTPMWsp/5I9vw7fMuzF7x/hkSKexFqyg5syeJVGKOBR/vxtgDB72nq/adFSXcO JV7M5I/S+sOn8z021uSOhUhmhNDGb7v+MREuLnNQXwb/B35hJ1oPhKS+Pn+zewsjkErM r2MHneoBq9R2HXFl4mSpDi9IRUqesZ34B8Zo4t5bpJeNwk9LXaL+VN4Pz9nfOn4wSr93 rsFGyi0w3lldLrgs16v7fbt9g6D0LPYycWJABak3OV1v7HpdV/uv7A6z4Op0i+Tak7hy 0B6w== MIME-Version: 1.0 X-Received: by 10.152.21.98 with SMTP id u2mr3212375lae.80.1408820440874; Sat, 23 Aug 2014 12:00:40 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Sat, 23 Aug 2014 12:00:40 -0700 (PDT) In-Reply-To: <853B0396-2C19-49DF-A8E8-8EB43D107597@xcllnt.net> References: <853B0396-2C19-49DF-A8E8-8EB43D107597@xcllnt.net> Date: Sat, 23 Aug 2014 12:00:40 -0700 X-Google-Sender-Auth: sw6GaqHPaxRhpYNoNBQk-j4Ztac Message-ID: Subject: Re: mkimg used to create gpt image, problem booting From: Craig Rodrigues To: Marcel Moolenaar Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 19:00:43 -0000 On Fri, Aug 22, 2014 at 1:45 PM, Marcel Moolenaar wrote: > >> If I mdconfig the foo1.img disk image, and do a gpart show, I see: >> >> => 3 1784944 md0 GPT (872M) >> 3 32 1 freebsd-boot (16K) >> 35 1784912 2 freebsd-ufs (872M) >> >> Any idea what I am doing wrong? > > To the best of my knowledge, qemu is the thing you're > doing wrong :-) Hi, I transferred foo1.img to a Mac with VirtualBox, converted it to VMDK with "VBoxManage convertfromraw --format VMDK", and tried to boot it in VirtualBox. I got the same error as in QEMU. It looks like /boot/loader runs, but I cannot do "ls" to see the root file system. I created another disk image with a GPT layout, but this time using the FreeBSD bsdinstall inside a bhyve VM. I noticed the following: WORKING IMAGE BOOTS IN QEMU, CREATED WITH BSDINSTALL ============================================= => 34 10485693 md0 GPT (5.0G) 34 128 1 83bd6b9d-7f41-11dc-be0b-001560b84f0f (64K) 162 9959296 2 516e7cb6-6ecf-11d6-8ff8-00022d09712b (4.7G) 9959458 524288 3 516e7cb5-6ecf-11d6-8ff8-00022d09712b (256M) 10483746 1981 - free - (991K) DOES NOT BOOT IN QEMU, CREATED WITH MKIMG =================================================== => 3 1784944 md1 GPT (872M) 3 32 1 83bd6b9d-7f41-11dc-be0b-001560b84f0f (16K) 35 1784912 2 516e7cb6-6ecf-11d6-8ff8-00022d09712b (872M) I ran the following crazy experiment, just to see what would happen: dd if=/dev/md1s2 of=/dev/md0s2 bs=8192 I then tried to boot the first image with QEMU, and it booted successfully, with my UFS file system that I had previously created with makefs. I'm not sure where to look for the problem. I notice that in the non-working image, the offset starts at block 3, while in the working image, the offset starts at block 34. Is that enough to make things not boot? -- Craig