Patch for adding label support to NanoBSD

Olivier Cochard-Labbé olivier at cochard.me
Thu Jul 9 12:37:35 UTC 2009


Hi,


> I like the idea but what does this mean for upgrading existing NanoBSD
> installations?  From reading the patch it looks like the new _.disk.image
> file is not compatible with an existing installation and would be a POLA
> violation.
>
> Perhaps a configuration option to choose between the old and new naming
> can be added?

The 3 differences between the new and old nanobsd file are:
1. The new  don't have the /etc/nanobsd.conf file (not needed anymore)
2. The new  have slice labelled
3. The new use label in its fstab

Then, if you are using an "old" nanobsd system, it should be possible
to upgrade it to a "new" by:
1.use "old" updatep1 or updatep2 for installing the new system
2.use tunefs -L for label the slice, for example
tunefs -L nanobsd1 /dev/ad0s1a
tunefs -L nanobsd2 /dev/ad0s2a
tunefs -L cfg /dev/ad0s3
tunefs -L data /dev/ad0s4
3. modify the /etc/fstab on the mounted upgraded slice for configuring
the correct label name for the / (nanobsd1 or nanobsd2)

I don't know if it's usefull to include a kind of old2new() function
in the upgrade script ? (But the "old" system can't have this "new"
script).

> Notes on the script itself:
>  - use glabel status instead of glabel list to find the provider name, this
>   makes the script easier to follow and less vulnerable to future changes
>   in the (verbose) output of glabel list.

Done, thanks for the tips.

>  - # Check and set final >>varible<< should be spelled variable.

Done too...

Regards,

Olivier


More information about the freebsd-embedded mailing list