The attached patch brings two main changes to the nanobsd script: 1- gpart is used instead of fdisk; 2- the code image is created first, and then used to ``assemble'' the full disk image. The patch was first proposed on the freebsd-embedded list: http://lists.freebsd.org/pipermail/freebsd-embedded/2012-June/001580.html and is currently under discussion: http://lists.freebsd.org/pipermail/freebsd-embedded/2014-January/002216.html Another effect is that the -f option ("suppress code slice extraction") now imples the -i option ("suppress disk image build"). Fix: Patch attached with submission follows:
Responsible Changed From-To: freebsd-bugs->imp I'll take it.
Created attachment 161646 [details] Patch adapted to current nanobsd.sh from 10-STABLE Since the first patch, nanobsd.sh has changed a bit. Some dd invocations now have the parameter 'conv=sparse'. I am not 100% sure I got it correctly; please help me review that.
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Created attachment 217561 [details] Patch adapted to the nanobsd script from current 11-STABLE This patch can be applied to 11-STABLE sources.
Sorry for the delay... https://reviews.freebsd.org/D31102
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=587c054bea0f652fdbd86baf5807f21c904ac2ad commit 587c054bea0f652fdbd86baf5807f21c904ac2ad Author: Arrigo Marchiori <ardovm@yahoo.it> AuthorDate: 2021-07-15 22:06:51 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-15 22:15:01 +0000 nanobsd: Use gpart and create code image before full disk image The attached patch brings two main changes to the nanobsd script: 1- gpart is used instead of fdisk; 2- the code image is created first, and then used to ``assemble'' the full disk image. The patch was first proposed on the freebsd-embedded list: http://lists.freebsd.org/pipermail/freebsd-embedded/2012-June/001580.html and is currently under discussion: http://lists.freebsd.org/pipermail/freebsd-embedded/2014-January/002216.html Another effect is that the -f option ("suppress code slice extraction") now imples the -i option ("suppress disk image build"). imp@ applied Patch by hand to new legacy.sh, plus tweaked for NANO_LOG vs NANO_OBJ confusion in original. PR: 186030 Reviewed by: imp@ Differential Revision: https://reviews.freebsd.org/D31102 tools/tools/nanobsd/defaults.sh | 4 +- tools/tools/nanobsd/legacy.sh | 132 ++++++++++++++++++++++++++-------------- tools/tools/nanobsd/nanobsd.sh | 17 ++++-- 3 files changed, 103 insertions(+), 50 deletions(-)
in my MFC queue, closing.
Thank you!
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=50b2e5d608d2d8876af2a8d4e5c4e60867f9ad96 commit 50b2e5d608d2d8876af2a8d4e5c4e60867f9ad96 Author: Arrigo Marchiori <ardovm@yahoo.it> AuthorDate: 2021-07-15 22:06:51 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-21 16:13:11 +0000 nanobsd: Use gpart and create code image before full disk image The attached patch brings two main changes to the nanobsd script: 1- gpart is used instead of fdisk; 2- the code image is created first, and then used to ``assemble'' the full disk image. The patch was first proposed on the freebsd-embedded list: http://lists.freebsd.org/pipermail/freebsd-embedded/2012-June/001580.html and is currently under discussion: http://lists.freebsd.org/pipermail/freebsd-embedded/2014-January/002216.html Another effect is that the -f option ("suppress code slice extraction") now imples the -i option ("suppress disk image build"). imp@ applied Patch by hand to new legacy.sh, plus tweaked for NANO_LOG vs NANO_OBJ confusion in original. PR: 186030 Reviewed by: imp@ Differential Revision: https://reviews.freebsd.org/D31102 (cherry picked from commit 587c054bea0f652fdbd86baf5807f21c904ac2ad) tools/tools/nanobsd/defaults.sh | 4 +- tools/tools/nanobsd/legacy.sh | 132 ++++++++++++++++++++++++++-------------- tools/tools/nanobsd/nanobsd.sh | 17 ++++-- 3 files changed, 103 insertions(+), 50 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e1b5efda31c36df69af31e822c4967fba8ad2b50 commit e1b5efda31c36df69af31e822c4967fba8ad2b50 Author: Arrigo Marchiori <ardovm@yahoo.it> AuthorDate: 2021-07-15 22:06:51 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-21 16:16:32 +0000 nanobsd: Use gpart and create code image before full disk image The attached patch brings two main changes to the nanobsd script: 1- gpart is used instead of fdisk; 2- the code image is created first, and then used to ``assemble'' the full disk image. The patch was first proposed on the freebsd-embedded list: http://lists.freebsd.org/pipermail/freebsd-embedded/2012-June/001580.html and is currently under discussion: http://lists.freebsd.org/pipermail/freebsd-embedded/2014-January/002216.html Another effect is that the -f option ("suppress code slice extraction") now imples the -i option ("suppress disk image build"). imp@ applied Patch by hand to new legacy.sh, plus tweaked for NANO_LOG vs NANO_OBJ confusion in original. PR: 186030 Reviewed by: imp@ Differential Revision: https://reviews.freebsd.org/D31102 (cherry picked from commit 587c054bea0f652fdbd86baf5807f21c904ac2ad) tools/tools/nanobsd/defaults.sh | 4 +- tools/tools/nanobsd/legacy.sh | 132 ++++++++++++++++++++++++++-------------- tools/tools/nanobsd/nanobsd.sh | 17 ++++-- 3 files changed, 103 insertions(+), 50 deletions(-)