Hi Andy,

to make things more clear. This is what I want to do:

I am using bootcdwrite, which writes its cdimage.iso to a mounted (because of 
to few disk space) to a mounted external harddrive. 

This one got a UUID, which never changes, so I can mount it automatically. All 
this is working perfectly.

After the image is created, I want automatically install this image to an USB-
stick using dd. Manually this is working well with this shell script, if in 
this shell script the device is correctly defined. 

The line is just:

dd if=/var/spool/bootcd/cdimage.iso of=/dev/sdc

Nothing special! But if I maybe put in two USB-sticks then the wrong one might 
be /dev/sdc and the script would overwrite the wrong device.

Thus my idea, just use UUID for identification, define the correct UUID in the 
script and the script will always write to the correct USB-stick, regardless, 
how many or in which order I put them in.

As any overwrites changes the UUID of the partition of the partitions, I was 
asking myself, if it would overwrite the device UUID. 

blkid /dev/sdb1 or /dev/sdb is showing me a PTUUID, a PARTUUID and a UUID, 
whic is the same for /dev/sdb and /dev/sdb1, and I am asking myself, if I 
could use this in my script or if these would change everytime I am using dd.

I dunno if my thoughts are working at all, if this, what I intend to do, is 
not possible at all, then I will find another solution. Or doing just manually 
as before.

Hope, this helps.

Best regards

Hans




Reply via email to