Date: Sun, 08 Dec 2013 12:21:03 +0100 From: Ilya Bakulin <webmaster@kibab.com> To: Nick Hibma <nick@van-laarhoven.org> Cc: "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org> Subject: Re: NanoBSD update scripts are broken when using disk labels Message-ID: <52A4561F.8090900@kibab.com> In-Reply-To: <330D2CBB-9A54-487D-B780-1936E8F58B74@van-laarhoven.org> References: <52926BE0.8050003@kibab.com> <4615AB4C-9DA5-4475-BFB6-68964B4CFC0A@van-laarhoven.org> <330D2CBB-9A54-487D-B780-1936E8F58B74@van-laarhoven.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 28.11.13, 11:00, Nick Hibma wrote: > On 28 Nov 2013, at 09:49, Nick Hibma <nick@van-laarhoven.org> wrote: > >> On 24 Nov 2013, at 22:13, Ilya Bakulin <webmaster@kibab.com> wrote: >> >>> After looking in the /root/updatep2 script I realized that it cannot >>> work when NANO_LABEL parameter >>> is set when building the NanoBSD image. >> >> The problem is that you need the device, not the UFS label to update the active partition. Attached the fixed updatep1 and updatep2 scripts. I’ve fixed exactly this problem yesterday to make booting from a USB thumb drive, and embedded CF card using the same image work. >> >> If you could test them, I’d be more than happy to commit them. > > The dev= line was incorrect in the scripts I provided. Try the attached files instead. Hi Nick, sorry for keeping silence. I was going to try your scripts when I have found another bug... But I suspect that you have made some modifications to nanobsd.sh as well. You check if the variable NANO_LABEL has some value after sourcing /etc/nanobsd.conf, but FreeBSD-standard nanobsd.sh doesn't write NANO_LABEL in the config file. Additionally, there is a problem that after dd'ing the image manually onto the correct partition, you won't have the required disk label on it. See: # glabel status -s ufs/FBSDFLTs3 N/A ada0s3 ufs/FBSDFLTs1a N/A ada0s1a ufsid/52a44002fa6458ff N/A ada0s2a The last entry is automatically generated UFSID label, because the _.disk.image that is generated from NanoBSD build doesn't have any label on it -- it is also logical, because the build system doesn't know which partition you will be upgrading. -- Ilya
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52A4561F.8090900>