7 # Marking some block devices as read-only to ensure that nothing
8 # gets written as linux still writes to 'only' read-only mounted filesystems.
9 _DEVICES="/dev/sd* /dev/vd*"
11 for _DEVICE in ${_DEVICES}
13 if [ ! -b "${_DEVICE}" ]
18 echo -n "live-boot: Setting ${_DEVICE} read-only..." > /dev/console
20 blockdev --setro ${_DEVICE}
25 echo " done, use 'blockdev --setrw ${_DEVICE}' to set read-write." > /dev/console
29 echo " failed." > /dev/console