Date: Thu, 1 Sep 2022 17:20:39 -0700 From: Dan Mahoney <freebsd@gushi.org> To: paul beard <paulbeard@gmail.com> Cc: FreeBSD-questions <freebsd-questions@freebsd.org> Subject: Re: making a disk/slice bootable Message-ID: <A99C0412-FD34-46D6-AB9A-AFC45FB10C10@gushi.org> In-Reply-To: <07BE254D-7701-47F2-94E3-09ED7229FB2B@gushi.org> References: <CAMtcK2r4L3SCba4EZt73=F2=fnBnEPGvEL3GCM_38R8_e5meXg@mail.gmail.com> <07BE254D-7701-47F2-94E3-09ED7229FB2B@gushi.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Fdisk is for old-school partitions (where disks had only 1-4 primary = partitions, and then subdivided those partitions into "slices" = (bsdlabel). I'm pretty sure the command you're looking for is: gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1 In english, this says: * Stick the "protective master boot record" on the root of the disk = (/boot/pmbr) * Write a partition boot label from the file specified... * to this indexed partition (-i 1)=20 * ...on ada1 =46rom there, you may need to tell the stage 0 loader where to find your = next bootable partition on the next boot() prompt. -Dan > On Sep 1, 2022, at 16:44, Dan Mahoney <freebsd@gushi.org> wrote: >=20 >=20 >=20 >> On Sep 1, 2022, at 16:41, paul beard <paulbeard@gmail.com> wrote: >>=20 >> 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.=20 >>=20 >> 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.=20 >=20 > Let's start with the obvious: Can you post your disk layout? Mirrored = how? Gmirror/ZFS/Hardware raid/etc? MBR or Gpart? >=20 > What commands have you tried thusfar? >=20 > What does the boot so far look like (i.e. are you hitting the stage 0 = boot loader, and getting the loader prompt?) >=20 > More info required, please, but this sounds very fixable. >=20 > -Dan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A99C0412-FD34-46D6-AB9A-AFC45FB10C10>