As discussed in the engineering meeting today, I believe the underlying
issue is that the filesystem is being mounted read-write, and I can see from
your diff that this is explicitly the case.

By changing the appropriate '-o rw' to '-o ro', you should be able to fix
this without changing to an ext3 filesystem.

On Thu, Jan 10, 2008 at 09:58:31AM -0500, Michael Frey wrote:
> Attached is a patch against the latest moblin-image-creator git tree to 
> change all partitions to be formatted as ext3 and mounted as such.
>
> Thanks,
> Michael
>
>
>
> Rhoads, Rob wrote:
>> Michael Frey wrote:
>>   
>>> Yes,  That is exactly what I did.
>>>
>>>     
>>
>> Right. What I was trying to say is that we now need to commit these
>> changes to the source repos on moblin. Do you have a patch of your
>> changes?
>>
>> -RobR
>>
>>   
>>> Michael
>>>
>>> On Jan 9, 2008, at 4:43 PM, Rhoads, Rob wrote:
>>>
>>>     
>>>> Michael Frey wrote:
>>>>       
>>>>> Rob,
>>>>>
>>>>> Dave Mandala asked me to inform you of the following.
>>>>>
>>>>> After some investigation, I found that changing Moblin Image Creator
>>>>> to format all partitions as ext3 fixes the "disk corruption" issue.
>>>>>
>>>>> It turns out that the partition that holds the squashfs image  was
>>>>> formated as ext2 not ext3 therefore making it prone to
>>>>> corruption since
>>>>> there is no journaling on ext2.
>>>>>
>>>>>         
>>>> In that case we'll need to modify Moblin image-creator's install.sh
>>>> script and the platform initramfs to use the ext3 for all partitions
>>>> created on the target platform.
>>>>
>>>> -RobR
>>>>       

> diff --git a/platforms/common-apt/initramfs/disk 
> b/platforms/common-apt/initramfs/disk
> index d85fb24..a0e680d 100755
> --- a/platforms/common-apt/initramfs/disk
> +++ b/platforms/common-apt/initramfs/disk
> @@ -51,30 +51,30 @@ mountroot ()
>      then
>       # We are using squashfs
>       echo "Setting up our squashfs and ext3fs unionfs system..."
> -     mount -o rw /dev/${device}1 /container
> +     mount -t ext3 -o rw /dev/${device}1 /container
>       while [ ! -e "/container/rootfs.img" ]
>       do
>           echo "Did not find /container/rootfs.img"
>           echo "sleeping for 0.5 seconds..."
>           /bin/sleep 0.5
>           echo "Mounting: mount -o rw /dev/${device}1 /container"
> -         mount -o rw /dev/${device}1 /container
> +         mount -t ext3 -o rw /dev/${device}1 /container
>       done
>       mount -o ro,loop -t squashfs /container/rootfs.img /squashmnt
> -     mount -o rw,noatime,nodiratime /dev/${device}2 /persistmnt
> +     mount -t ext3 -o rw,noatime,nodiratime /dev/${device}2 /persistmnt
>       mount -t unionfs -o dirs=/persistmnt=rw:/squashmnt=ro none ${rootmnt}
>      else
>       # We are NOT using squashfs
>       echo "mounting root partition, NOT using squashfs"   
> -     mount -o rw,noatime,nodiratime /dev/${device}2 ${rootmnt}
> +     mount -t ext3 -o rw,noatime,nodiratime /dev/${device}2 ${rootmnt}
>       while [ ! -e "${rootmnt}/bin" ]
>       do
>           echo "Did not find ${rootmnt}/bin"
>           echo "sleeping for 2 seconds..."
>           /bin/sleep 2
>           echo "Mounting: mount -o rw,noatime,nodiratime /dev/${device}2 
> ${rootmnt}"
> -         mount -o rw,noatime,nodiratime /dev/${device}2 ${rootmnt}
> +         mount -t ext3 -o rw,noatime,nodiratime /dev/${device}2 ${rootmnt}
>       done
> -     mount -o rw,noatime,nodiratime /dev/${device}1 ${rootmnt}/boot 
> +     mount -t ext3 -o rw,noatime,nodiratime /dev/${device}1 ${rootmnt}/boot 
>      fi
>  }
> diff --git a/platforms/common-apt/install.sh b/platforms/common-apt/install.sh
> index 5f4547b..dacbb95 100644
> --- a/platforms/common-apt/install.sh
> +++ b/platforms/common-apt/install.sh
> @@ -154,9 +154,9 @@ sync
>  splash_progress 10
>  splash_delay 10
>  
> -splash_display "Formatting /dev/${device}1 w/ ext2..."
> +splash_display "Formatting /dev/${device}1 w/ ext3..."
>  splash_delay 200
> -mkfs.ext2 /dev/${device}1
> +mkfs.ext3 /dev/${device}1
>  sync
>  splash_progress 20
>  splash_delay 10

> -- 
> Ubuntu-mobile mailing list
> [email protected]
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile


-- 
 - mdz

-- 
Ubuntu-mobile mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile

Reply via email to