Re: Migrating to new disk

From: mike tancsa <mike_at_sentex.net>
Date: Mon, 03 Apr 2023 00:02:48 UTC
On 4/2/2023 5:18 PM, Henrik Morsing wrote:
> On Sun, Apr 02, 2023 at 03:09:15PM -0400, mike tancsa wrote:
>
> Hi Mike,
>
> [...]
>>>
>>>
>> What does
>>
>> gpart list
>>
>> show on your new disk ?
>
> At bottom of this email.
>
>>
>> When I do a bare metal restore, I do something like this
>>
>> echo ""
>> echo "# Create zfs boot (512k) and a 220 gig root partition"
>> gpart create -s gpt $DESTDEVICE
>> gpart add -a 4k -s 40M -t efi $DESTDEVICE
>> gpart add -a 4k  -s 8G -t freebsd-swap -l swap1 $DESTDEVICE
>> gpart add -a 4k  -t freebsd-zfs -l $DISKNAME $DESTDEVICE
>> newfs_msdos -F 32 -c 1 /dev/${DESTDEVICE}p1
>> mkdir -p /mnttmp
>> mount -t msdosfs /dev/${DESTDEVICE}p1 /mnttmp
>> mkdir -p /mnttmp/EFI/BOOT
>> cp /boot/loader.efi /mnttmp/EFI/BOOT/BOOTX64.efi
>> umount /mnttmp
>
> Exact same steps I have done. When I boot I get this:
>
What is in /boot/loader.conf ?  And did you set the right pool name ?

zpool set bootfs=$POOLNAME/ROOT/default $POOLNAME