History log of /freebsd-11-stable/release/i386/make-memstick.sh
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 333410 09-May-2018 emaste

MFC r332446: switch i386 memstick installer images to MBR

Some BIOSes have trouble booting from GPT in non-UEFI mode. This is
commonly reported with Lenovo laptops, including my x220. As we do not
currently support booting FreeBSD/i386 via UEFI there's no reason to
prefer GPT.

The "vestigial swap partition" was added in r265017 to work around an
issue with loader's GPT support, so we should not need it when using
MBR.

We may want to make the same change to amd64, although the issue there is
mitigated by such systems booting via UEFI in the common case.

PR: 227422
Approved by: re
Relnotes: Yes
Sponsored by: The FreeBSD Foundation


# 332639 17-Apr-2018 emaste

MFC r332390: make-memstick.sh: put partition args on separate lines

This makes it easier to identify the individual partition types and
facilitates comparisons across architectures.

Sponsored by: The FreeBSD Foundation


# 324395 07-Oct-2017 emaste

MFC r323438: make-memstick.sh: use UFSv2

There's not much practical difference as far as install media is
concerned but newfs creates UFSv2 by default and it is sensible to use
the contemporary UFS version.

I also intend to change makefs to create UFSv2 by default (to match
newfs) so we'll want make-memstick.sh to be explicit, rather than
relying on the host tool's default.

Sponsored by: The FreeBSD Foundation


# 323476 12-Sep-2017 emaste

make-memstick.sh: use 'set -e' to abort if any step fails

Also remove the now-redundant error handling that was only for makefs.

This script was run on an older FreeBSD host that lacked efi-on-mbr
support in makefs. A warning was emitted on the console (from makefs)
but the script continued running and exited with 0.

MFC of r308171 (arm64) and r323178 (other architectures).


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 293188 05-Jan-2016 gjb

Prevent memstick installation medium from attempting to mount
the root filesystem read-write. This causes problems booting
the memstick installation medium from write-protected USB flash
drives.

Submitted by: A.J. Kehoe IV [1], Oliver Jones [2]
PR: 187161 [1], 205886 [2]
MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 283307 22-May-2015 gjb

Use mkimg(1) to create the i386 memstick images, similar to
how is done for amd64. The exception here is there is no
EFI partition for i386.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# 264933 25-Apr-2014 gjb

Fix indentation for diff reduction with commits to follow.

Sponsored by: The FreeBSD Foundation


# 264922 25-Apr-2014 gjb

Revert r264907 and r264908:

Restore make-memstick.sh back to its original state to
unbreak booting for machines that do not support GPT.

I have in-progress work to keep the MBR layout and add
the EFI partition, but it is not yet ready, and does
need at least one full release build to be certain it
does not break.

Sponsored by: The FreeBSD Foundation


# 264908 25-Apr-2014 gjb

Style cleanup
- Indent 1 full tab where needed
- Use $() for shell exec
- Insert a space between '$(( ))' parens

MFC After: 1 week
X-MFC-With: r264907
Sponsored by: The FreeBSD Foundation


# 264907 24-Apr-2014 gjb

Refactor make-memstick.sh to avoid creating the 'dangerously
dedicated' partition scheme, reported to cause the memstick.img
to fail to boot.

Similar to how make-memstick.sh worked on stable/8, use makefs(8)
to create the actual filesystem. Then calculate the size of the
resulting image file, create the GPT partition scheme, then dd(1)
the filesystem created with makefs(8) to the freebsd-ufs GPT
partition.

This was tested on a known-working machine[1] for regression, and
a known-not-working machine[2] to ensure the boot issue has been
resolved.

Testers: myself [1], db [2]
MFC After: 1 week
Sponsored by: The FreeBSD Foundation


# 226170 09-Oct-2011 nwhitehorn

Use UFS labels and bsdlabels (like the 8.x memsticks) instead of GPT to
fix problems with some BIOSes.

MFC after: 3 days


# 224504 29-Jul-2011 nwhitehorn

Mount memsticks read-only by default to prevent them being filled by
user modifications and subsequently preventing a functioning installation.

Approved by: re (kib)


# 219856 21-Mar-2011 nwhitehorn

Use labels to find release media instead of hard-coded device paths. This
makes booting more reliable (and working at all on USB sticks). While here,
move responsibility for setting up fstab into the various platform mk-*.sh
scripts.

Suggested by: many


# 219584 12-Mar-2011 nwhitehorn

Add generation of memstick images to the bsdinstall release makefile for
i386 and amd64. This involved moving the memstick generation script to
the arch directories from scripts/, in analogy to mkisoimages.sh. This
script was never called from /usr/src/release/Makefile, so that hasn't
been updated.


# 204044 18-Feb-2010 kensmith

Provide a script that can be used to create the memstick images. For now
it isn't being integrated into 'make release' because for the forseeable
future the memstick images will be identical to what's on the DVD except
for which package set is provided. If/when what's on the memstick diverges
from what's on the DVD it would make more sense to generate a "memstick"
directory in $CHROOT/R/cdrom and build the memstick image along with the
ISO images.

Reviewed by: jhb, ru, Garrett Cooper (yanefbsd at gmail dot com)