From nobody Fri Sep 2 00:09:44 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MJdZs0kz5z4b79B for ; Fri, 2 Sep 2022 00:09:57 +0000 (UTC) (envelope-from paulbeard@gmail.com) Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MJdZr1kLwz4D2H for ; Fri, 2 Sep 2022 00:09:56 +0000 (UTC) (envelope-from paulbeard@gmail.com) Received: by mail-vs1-xe29.google.com with SMTP id c3so523690vsc.6 for ; Thu, 01 Sep 2022 17:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=TPHDS98rua+aJFCYCdnSwPHGti1ZvhKnxonhwaEqbfg=; b=hkfclJ/dsg8/s0SKw2DUfKgx+llNO1/x8moXJW55K46UD+uIsnhrHW/53zw0Kz1qlU 2G6MH6RNpxbSKak1GZfOc281QvbRFSOu18uYc75+jOVOimm8q7657EbrLNz/Z+9kgPtV SAlMUM96HhN9MywQX4jTl3aq5+uHPNkJf+sDEDRApGjvlu4iFWlQNcC9Ahrr22xiYB62 rBTJwZYQQ/gFhCrvrS62e5biwlL+VD9/RlrU4EIwyBcNhap8lj5HoBi7b4TWbaDPrqlz oOsV/tdyd8mAmKLfl3//KdJafCznhkAA1WgtiAfGcBHV770WQi98kXUf1Qc2eZhEzf9G dMOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=TPHDS98rua+aJFCYCdnSwPHGti1ZvhKnxonhwaEqbfg=; b=NObQoV/A0ACMXZqBDvVgF13PehDyTvzfDEyfs4FhPaWpyv04x9GKNAjMT77d71iykC Ug6Yxvqkb6XDMEDAAkynJzhjde5qoTyswnm7RaRo4JXy7CBPMIxJrNL+03glCHYB8z98 lCbJrhoTgMvfXw/VSqRHODrqyHPSDr8RDL6U6c7KON0R9Ljq89Dy+8Zbc0ZfBxprp6r0 zbhn7WDimCO58HpalplSJJvrqWwynCUwKlVUyQ3ieiLbvBILR30YIPyVadgZDHUQLgbh sE63bQGHVJ6NkrXM09KP6OmHwev7LR4Vyj0JxiSNMdHintAtqpqfhVMFwqWz4WyMyFi3 9iKg== X-Gm-Message-State: ACgBeo01oSOXpLTsbKCUGDAjNKT89BsirqEt58toPl4tMJD+llK+g4Pz /vUytiWirV6IAB+GiOueJElMlWZL9dhz9BL6Pln3Z6zLSpU= X-Google-Smtp-Source: AA6agR7OgYOEw2Iejo6x72vRzXOc9rBMF/aUJfYCXGFxKLiyf+OSnXZecIiLSN18n5SJiZykXUvCMpz6qDzXdeDthgQ= X-Received: by 2002:a05:6102:390:b0:390:f409:4255 with SMTP id m16-20020a056102039000b00390f4094255mr6970310vsq.15.1662077395752; Thu, 01 Sep 2022 17:09:55 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <07BE254D-7701-47F2-94E3-09ED7229FB2B@gushi.org> In-Reply-To: <07BE254D-7701-47F2-94E3-09ED7229FB2B@gushi.org> From: paul beard Date: Thu, 1 Sep 2022 17:09:44 -0700 Message-ID: Subject: Re: making a disk/slice bootable To: Dan Mahoney Cc: FreeBSD-questions Content-Type: multipart/alternative; boundary="000000000000c35b4405e7a68c72" X-Rspamd-Queue-Id: 4MJdZr1kLwz4D2H X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b="hkfclJ/d"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of paulbeard@gmail.com designates 2607:f8b0:4864:20::e29 as permitted sender) smtp.mailfrom=paulbeard@gmail.com X-Spamd-Result: default: False [-3.95 / 15.00]; NEURAL_HAM_SHORT(-0.99)[-0.995]; NEURAL_HAM_LONG(-0.99)[-0.994]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e29:from]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N --000000000000c35b4405e7a68c72 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable FATAL: no bootable medium found! System halted. gpart shows me this=E2=80=A6 =3D> 40 134217648 ada1 GPT (64G) 40 1024 1 freebsd-boot (512K) 1064 984 - free - (492K) 2048 4194304 2 freebsd-ufs (2.0G) 4196352 4194304 3 freebsd-swap (2.0G) 8390656 10485760 4 freebsd-ufs (5.0G) 18876416 524288 5 freebsd-ufs (256M) 19400704 114814976 6 freebsd-ufs (55G) 134215680 2008 - free - (1.0M) All I have done so for is fdisk -B -b /boot/boot0 device Not sure that is the right approach with a gpart'ed disk. It wanted to change the boot code which sounds like what I want. On Thu, Sep 1, 2022 at 4:45 PM Dan Mahoney wrote: > > > > > On Sep 1, 2022, at 16:41, paul beard wrote: > > > > I have been mirroring the virtual disk in a FreeBSD vm for a couple of years and the main disk got corrupted. The mirrored disk doesn't boot, says it can't find a kernel, so I think I missed out on an additional step, writing an MBR or boot sector, perhaps. > > > > The files are all there if I mount them from a VM with FreeBSD.I assume there is a way to make a mountable disk bootable. fdisk and gpart are available but it's been a long time since I messed around with those. > > Let's start with the obvious: Can you post your disk layout? Mirrored how? Gmirror/ZFS/Hardware raid/etc? MBR or Gpart? > > What commands have you tried thusfar? > > What does the boot so far look like (i.e. are you hitting the stage 0 boot loader, and getting the loader prompt?) > > More info required, please, but this sounds very fixable. > > -Dan -- Paul Beard / www.paulbeard.org/ --000000000000c35b4405e7a68c72 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
FATAL: no bootable medium found! System halted.=C2=A0=

gpart shows me this=E2=80=A6

=3D> =C2=A0 =C2= =A0 =C2=A0 40 =C2=A0134217648 =C2=A0ada1 =C2=A0GPT =C2=A0(64G)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A040 =C2=A0 =C2=A0 =C2=A0 1024 =C2=A0 =C2=A0 1 =C2= =A0freebsd-boot =C2=A0(512K)
=C2=A0 =C2=A0 =C2=A0 =C2=A01064 =C2=A0 =C2= =A0 =C2=A0 =C2=A0984 =C2=A0 =C2=A0 =C2=A0 =C2=A0- free - =C2=A0(492K)
= =C2=A0 =C2=A0 =C2=A0 =C2=A02048 =C2=A0 =C2=A04194304 =C2=A0 =C2=A0 2 =C2=A0= freebsd-ufs =C2=A0(2.0G)
=C2=A0 =C2=A0 4196352 =C2=A0 =C2=A04194304 =C2= =A0 =C2=A0 3 =C2=A0freebsd-swap =C2=A0(2.0G)
=C2=A0 =C2=A0 8390656 =C2= =A0 10485760 =C2=A0 =C2=A0 4 =C2=A0freebsd-ufs =C2=A0(5.0G)
=C2=A0 =C2= =A018876416 =C2=A0 =C2=A0 524288 =C2=A0 =C2=A0 5 =C2=A0freebsd-ufs =C2=A0(2= 56M)
=C2=A0 =C2=A019400704 =C2=A0114814976 =C2=A0 =C2=A0 6 =C2=A0freebsd= -ufs =C2=A0(55G)
=C2=A0 134215680 =C2=A0 =C2=A0 =C2=A0 2008 =C2=A0 =C2= =A0 =C2=A0 =C2=A0- free - =C2=A0(1.0M)

All I have done so for is
fdisk -B -b /boot/boot0 device

Not sure that is the = right approach with a gpart'ed=C2=A0disk. It wanted to change the boot = code which sounds like what I want.=C2=A0

On Thu, = Sep 1, 2022 at 4:45 PM Dan Mahoney <freebsd@gushi.org> wrote:
>
>
>
> > On S= ep 1, 2022, at 16:41, paul beard <paulbeard@gmail.com> wrote:
> >
> > I have been m= irroring the virtual disk in a FreeBSD vm for a couple of years and the mai= n disk got corrupted. The mirrored disk doesn't boot, says it can't= find a kernel, so I think I missed out on an additional step, writing an M= BR or boot sector, perhaps.
> >
> > The files are all the= re if I mount them from a VM with FreeBSD.I assume there is a way to make a= mountable disk bootable. =C2=A0fdisk and gpart are available but it's = been a long time since I messed around with those.
>
> Let'= s start with the obvious: Can you post your disk layout?=C2=A0 Mirrored how= ?=C2=A0 Gmirror/ZFS/Hardware raid/etc?=C2=A0 MBR or Gpart?
>
> = What commands have you tried thusfar?
>
> What does the boot so= far look like (i.e. are you hitting the stage 0 boot loader, and getting t= he loader prompt?)
>
> More info required, please, but this sou= nds very fixable.
>
> -Dan



--
Paul Beard / www.paulbeard.org/
--000000000000c35b4405e7a68c72--