From nobody Sat Jun 22 15:46:34 2024 X-Original-To: freebsd-fs@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 4W5z9h5XJBz5Nf27 for ; Sat, 22 Jun 2024 15:46:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W5z9g5kdzz57wf for ; Sat, 22 Jun 2024 15:46:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=zONZP6WU; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::636) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1f9a78c6c5dso24787985ad.1 for ; Sat, 22 Jun 2024 08:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1719071206; x=1719676006; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=wFTFcHatk77It5wiJqZ1RHmbyzKpZyDyc24+zAYz/2g=; b=zONZP6WUjHmSzTNbShBT1I7L3ZzTxrUO0M4QIsXCRvPbK1JW/2JZ5I2jWDRnyIbZGG ccCCDcrhOfgCp/DnlCI03ux3omlp3LaCw5Fc0oCiaGoWagpx6ac0WykJlPyjC/R9IPZ2 KJGNxTgKYNX6t92p10Uj6tZADMGZWS98hXRcvgTJyu6sSsPhua0GMyOrxTWFQf3/Ev1u PL9+2Y8SHj0BGol5e5t3lko2nCuCn+IQwy5czqhQpnLE49Nk8SxtETc3gVg2PXuaJ9+C 12z0/RScOxhRD0KBt/L2jQIiKe79M5TWjdNjsnjFGkNe1bFRXZGjzLWtMyZvjf+PHH+9 4FVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719071206; x=1719676006; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wFTFcHatk77It5wiJqZ1RHmbyzKpZyDyc24+zAYz/2g=; b=O3vrtlMBmuY9ATYfmDH2wj2LBo5wgBE9chYiKdcw1jFsTbxZMT9QC33FRSE595El7M B1ojd/bPZnCiugotVSh6pe9oHtKu9Ni6GGk9t93tPT/XxIFzUtT2VQoYksZaAjpPDnth av7BgYlp4CoC3vvySc/YX5ZFoYpH0V33lBoXumvUElt1aS7eUO89vubgfvOZGYQEIhIk eTbvQa2E/OyiUh4YDZr2pIXTPcQ6IkM0nDWhuGWQdGpW05N+z3MI4CKsOtf+j70TNRnq x9R/t1k0VQrM0fj9yv3TYgBdTYeRXI0CnoKsnMzXaY3tx4ccWMXK0tF1bzdOe+auRC6j gcGA== X-Gm-Message-State: AOJu0YykW6CGzzZgCUrqi+Ge6ycxgomPDWTuUtFSVJTaIpR6J5xcomN7 JoI4cEp8lW96amA/K3LxqMTL/8lXH6R/ivVfxRonM6CTYYeN1ps/oRv9q8f0cTJ1997/GISX10w 2y+zD8jyVRFYRm65hubLO+2lwl1y0cNAje6dvDTKRJD5d9DKAEMs= X-Google-Smtp-Source: AGHT+IHF4WGFY7tjsmRMM9dq5JhI2E9OVRBl9aTLUk+Khrz2HgXuD4ukJUW+usuRI/iDz+EqJKnoqdXlSPZHciBYoOc= X-Received: by 2002:a17:90a:f18d:b0:2c7:9fee:6ea0 with SMTP id 98e67ed59e1d1-2c86146d120mr178694a91.32.1719071205828; Sat, 22 Jun 2024 08:46:45 -0700 (PDT) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Sat, 22 Jun 2024 09:46:34 -0600 Message-ID: Subject: Re: setting currdev correctly after repartitioning To: FreeBSD FS Content-Type: multipart/alternative; boundary="000000000000914bb8061b7c749b" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_ONE(0.00)[1]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MISSING_XM_UA(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::636:from]; ARC_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4W5z9g5kdzz57wf --000000000000914bb8061b7c749b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jun 22, 2024, 9:23=E2=80=AFAM void 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. =3D> 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 > > =3D> 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=3D1777 = 0 > 0 > # > #/dev/label/growfs_swap none swap sw 0 > 0 > #md none swap sw,late,file=3D/usr/swap0= 0 > 0 > There's much confusion here. That needs to be sorted out first. Warner > --000000000000914bb8061b7c749b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Jun 22, 2024, 9:23=E2=80=AFAM void <void@f-m.fm> wrote:
I've imaged with dd an rpi4 ssd and created on the hard= ware
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 t= he 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 t= hink.

=3D>=C2=A0 =C2=A0 =C2=A0 =C2=A0 63=C2=A0 1953525105=C2=A0 da5=C2=A0 MBR= =C2=A0 (932G)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A063=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A01=C2=A0 =C2=A0 =C2=A0 =C2=A0- free -=C2=A0 (512B)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A064=C2=A0 =C2=A0 =C2=A0 524288=C2= =A0 =C2=A0 1=C2=A0 fat32lba=C2=A0 [active]=C2=A0 (256M)
=C2=A0 =C2=A0 =C2=A0 =C2=A0524352=C2=A0 1952448512=C2=A0 =C2=A0 2=C2=A0 fre= ebsd=C2=A0 (931G)
=C2=A0 =C2=A0 =C2=A0 =C2=A01952972864=C2=A0 =C2=A0 =C2=A0 552304=C2=A0 =C2= =A0 =C2=A0 =C2=A0- free -=C2=A0 (270M)


# gpart show da5s2

=3D>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00=C2=A0 1952448512=C2=A0 da5s2=C2= =A0 BSD=C2=A0 (931G)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 16777216=C2=A0 =C2= =A0 =C2=A0 1=C2=A0 freebsd-swap=C2=A0 (8.0G)
=C2=A0 =C2=A0 =C2=A016777216=C2=A0 =C2=A0 16777216=C2=A0 =C2=A0 =C2=A0 2=C2= =A0 freebsd-swap=C2=A0 (8.0G)
=C2=A0 =C2=A0 =C2=A033554432=C2=A0 =C2=A0 16777216=C2=A0 =C2=A0 =C2=A0 4=C2= =A0 freebsd-swap=C2=A0 (8.0G)
=C2=A0 =C2=A0 =C2=A050331648=C2=A0 =C2=A0 16777216=C2=A0 =C2=A0 =C2=A0 5=C2= =A0 freebsd-swap=C2=A0 (8.0G)
=C2=A0 =C2=A0 =C2=A067108864=C2=A0 1885339648=C2=A0 =C2=A0 =C2=A0 6=C2=A0 f= reebsd-ufs=C2=A0 (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 hav= e a kernel but not the lua support files. It might even not have a recogniz= ed filesystem on it, but we think the ESP was on this disk=C2=A0=C2=A0

<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex"> 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=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ufs=C2=A0 =C2=A0 =C2=A0rw,noatime=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A01
/dev/msdosfs/EFI=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /bo= ot/efi=C2=A0 =C2=A0 =C2=A0 =C2=A0msdosfs rw,noatime=C2=A0 =C2=A0 =C2=A0 0= =C2=A0 =C2=A0 =C2=A0 =C2=A00
tmpfs=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/= tmp=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tmpfs=C2=A0 =C2=A0rw,mode=3D17= 77=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A00 #
#/dev/label/growfs_swap none=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 swap= =C2=A0 =C2=A0 sw=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A00
#md=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0none=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 swap=C2=A0 =C2=A0 sw,la= te,file=3D/usr/swap0 0=C2=A0 =C2=A0 =C2=A0 =C2=A00

There's much confusio= n here. That needs to be sorted out first.

Warner
--000000000000914bb8061b7c749b--