Re: setting currdev correctly after repartitioning
Date: Sat, 22 Jun 2024 15:46:34 UTC
On Sat, Jun 22, 2024, 9:23 AM void <void@f-m.fm> wrote: > I've imaged with dd an rpi4 ssd and created on the hardware > 4*8GB swap partitions, and have transferred with cpdup the > freebsd contents from the image back to the ssd. The msdos-based > EFI and rpi partition was unmodified. > > When I try to boot, it drops an OK prompt with the following error > > "Setting currdev to disk0p2: > ERROR: cannot open /boot/lua/loader.lua: no such file or directory." > > The partition table looks like this > > # gpart show da5 (this is da5 on another machine) > How do you know disk0 in the boot loader is da5 in FreeBSD? Or that it's even the disk you think it is? P2 is GPT partitioning, not MBR so you are chasing shadows here, i think. => 63 1953525105 da5 MBR (932G) > 63 1 - free - (512B) > 64 524288 1 fat32lba [active] (256M) > 524352 1952448512 2 freebsd (931G) > 1952972864 552304 - free - (270M) > > > # gpart show da5s2 > > => 0 1952448512 da5s2 BSD (931G) > 0 16777216 1 freebsd-swap (8.0G) > 16777216 16777216 2 freebsd-swap (8.0G) > 33554432 16777216 4 freebsd-swap (8.0G) > 50331648 16777216 5 freebsd-swap (8.0G) > 67108864 1885339648 6 freebsd-ufs (899G) > > I wonder if freebsd-ufs needs to be the first slice? No. Is that what the error means? Whatever disk this is, it GPT partitioned, may have a kernel but not the lua support files. It might even not have a recognized filesystem on it, but we think the ESP was on this disk if not, how can I tell it > that the loader is on (when it's installed on the rpi4) /dev/da5s2f ? > I think you'll be happier with labels for this. But you will need to set things up with the ESP tgat booted. it's not in fstab. context is -current and ufs2. > > fstab looks like this > > # Custom /etc/fstab for FreeBSD embedded images > /dev/ufs/rootfs / ufs rw,noatime 1 > 1 > /dev/msdosfs/EFI /boot/efi msdosfs rw,noatime 0 > 0 > tmpfs /tmp tmpfs rw,mode=1777 0 > 0 > # > #/dev/label/growfs_swap none swap sw 0 > 0 > #md none swap sw,late,file=/usr/swap0 0 > 0 > There's much confusion here. That needs to be sorted out first. Warner >