conf/187161: FreeBSD memstick Images Fail to Boot from Read-Only Media

A.J. Kehoe IV (Nanoman) 3LmB4Mvj at nanoman.ca
Sat Mar 1 06:40:02 UTC 2014


>Number:         187161
>Category:       conf
>Synopsis:       FreeBSD memstick Images Fail to Boot from Read-Only Media
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 01 06:40:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     A.J. Kehoe IV (Nanoman)
>Release:        10.0-RELEASE
>Organization:
Nanoman's Company
>Environment:
FreeBSD localhost 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
By default, /etc/rc.d/root tries to mount the root filesystem as read-write, which causes startup to abort when booting from read-only media that was created using the official memstick images.
>How-To-Repeat:
1. Get a USB flash drive that has a write protection switch.
2. Disable write protection on the USB flash drive.
3. Connect the USB flash drive to your system.
4. dd if=/path/to/FreeBSD-10.0-RELEASE-amd64-memstick.img of=/dev/usbflashdrive
5. Enable write protection on the USB flash drive.
6. Boot your system from the USB flash drive.
>Fix:
On the system that creates the official FreeBSD memstick images:

echo 'root_rw_mount="NO"' >> /path/to/memstick/etc/rc.conf

To patch your current memstick image before creating your read-only media:

1. mdconfig -a -t vnode -u 0 -f /path/to/FreeBSD-10.0-RELEASE-amd64-memstick.img
2. mount -t ufs /dev/md0 /mnt
3. echo 'root_rw_mount="NO"' >> /mnt/etc/rc.conf
4. umount /mnt
5. mdconfig -d -u 0

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list