On Saturday 07 April 2007 16:27, Alex Owen wrote: > OK here is the patch! We'll have to check if this approach is the correct way to go about this. I'm also not yet convinced that what os-prober did was the main cause of the data loss. However, not touching partitions not involved in the installation seems like a reasonable precaution in any case, so we'll certainly consider this option. One comment on the patch. I'd suggest to implement protect_dev as follows: +protect_dev(){ #$1=partition : stdout=dev_rw_flag +local dev_rw_flag=0 +if type blockdev >/dev/null 2>&1; then + if [ $(blockdev --getro $1) = 0 ] && + blockdev --setro $1; then + dev_rw_flag=1 + fi +fi +echo $dev_rw_flag
Attachment:
pgpXPDZg5ESo8.pgp
Description: PGP signature