[Arm-dev] Problems with Re: Works - Re: UUID for partitions - now add resize

Robert Moskowitz rgm at htt-consult.com
Mon Dec 28 17:48:31 UTC 2015


My system (F22) started developing problems and I finally had to 
reboot.  I run the script a number of times and strangeness was 
occuring, ending with /dev/sdb not disapearing after removing one mSD 
card, and then could no longer dd to new cards that were trying to mount 
as /dev/sdb.  I don't know if the script was at fault or something, 
else.  But things definitely went south.

One clear problem with this script is that the [INFO] messages report 
the old UUID wrong after the first time run.  Each time it lists the old 
UUIDs as the last UUIDs.  Not the UUIDs on the device.

I will hold off on using this script again until I hear back.

On 12/28/2015 08:58 AM, Robert Moskowitz wrote:
>
>
> On 12/25/2015 03:30 PM, Mandar Joshi wrote:
>>>>> So every installation from an image will have the same UUIDs.
>>>> Yes
>>> this is a bad idea, it means you cant ( or will haveto do some work )
>>> if you ever intend to share media. onprem, lesser issue ( likely only
>>> when disaster recovery is involved ), but this is a much bigger issue
>>> in offprem, where block device mobility is part of the larger picture
>>> and taken for granted.
>>>
>>> so, we should fix it.
>>>
>>> - - KB
>> I just finished writing a script to change UUIDs and LABELs.
>> It's changeuuid.py in 
>> https://github.com/mndar/rbf/tree/master/commonscripts
>> It doesn't depend on anything else in the repo, so you can just
>> download that script.
>>
>> Sample Usage:
>>
>> # just show what is going to change
>> ./changeuuid.py pretend /dev/sdb /tmp/temp/
>>
>> # actually change
>> ./changeuuid.py change /dev/sdb /tmp/temp/
>>
>> Refer the README for more details. Let me know if you have any issues.
>
> Worked fine after I figured out a way to get the script.  I clicked on 
> 'raw' and saved, then chmod +x.
>
> I see you tested this on the Fedora23 image.  Are you going to take 
> this issue and script over to the Fedora-arm list, or may I?
>
> Next on to resizing the rootfs as part of the same script.  See the 
> Fedora-arm-installer script that has:
>
> if [ "$RESIZEFS" != "" ] ; then
>     echo "= Resizing $MEDIA ...."
>     sync
>     echo ", +" | sudo sfdisk -N 3 "$MEDIA"
>     sudo fsck.ext4 -fy "$ROOTPART"
>     sudo partprobe "$MEDIA"
>     sudo resize2fs "$ROOTPART"
> fi
>
>
> Where $MEDIA is where mSD card is (e.g. /dev/sdb) and $ROOTPART is the 
> rootfs partition (e.g. /dev/sdb3).
>
> Very fast compared to other methods.
>
>
> _______________________________________________
> Arm-dev mailing list
> Arm-dev at centos.org
> https://lists.centos.org/mailman/listinfo/arm-dev
>



More information about the Arm-dev mailing list