Menu

autoname-* not working?

Help
2024-07-22
2024-08-06
  • Batiste DONDOGLIO

    I’m trying to create (savedisk) an image using the autoname-* feature following this naming scheme :

    "hostname_ddmmYYYY"
    Example: SRV-TST_22072024

    I followed the doc and came up with :

    autoname-SRV-TST_datefmt_%d%m%Y which should in theory give me what I want...

    However it doesn’t work and throws an error « You have to input a proper image name (containing only alphabet, digit, _, - and .) ! Please do it again ! »

    I even tried with the example given in the doc « autoname-fox-datefmt_%Y%m%d will create an image name like: fox-20210109. » it still doesn’t work and throws the same error.

    What am I doing wrong ? I’m using version 3.1.3-11 of CloneZilla.

    See the screenshots attached.

     
  • Batiste DONDOGLIO

    Edit: I tried with Clonezilla's latest version (3.1.3-16): Same issue.

     
  • Steven Shiau

    Steven Shiau - 2024-07-24

    Please use "-" to separate the name, i.e., in your case, you should use:
    autoname-SRV-TST-datefmt_%d%m%Y
    Then it will give you the image name like:
    SRV-TST-24072024

    Steven

     
  • Batiste DONDOGLIO

    Hi Steven,

    Thank you for your reply!

    I also tried with a dash instead of an underscore as you described, but I'm still facing the same issue unfortunately...

    As mentioned in my original post, I even tried using the very same example given in the documentation (autoname-fox-datefmt_%Y%m%d) which also uses a dash, but I still encountered the issue.

    I suspect it doesn't parse the "%" correctly, maybe?

     
  • Batiste DONDOGLIO

    Bump

     
  • Batiste DONDOGLIO

    Hello Steven,

    Thank you for your response!

    I just tried it as ocs_live_run parameters when booting Clonezilla through PXE, and while it didn't produce any error, it didn't name the image correctly. It literally interprets it as is and produces the image with the same name.

    I will try to use the command line manually and see how it behaves, and report my findings here.

    In the meantime, here are my command line arguments when using iPXE to boot Clonezilla and saving the image to a NFS share. Please note that everything works except the naming. No errors and the image is successfully saved and working properly. It's really just a naming issue.

    My iPXE entry:

    :clonez-ZBX
    kernel ${kernel}clonezilla/vmlinuz initrd=initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales=en_US.UTF-8 keyboard-layouts=fr ocs_live_run="ocs-sr -q2 -j2 -z9p -i 0 -fsck-y -gs -senc -p reboot savedisk autoname-SRV-ZBX_datefmt_%d%m%Y PTUUID=79707a6d-3d90-4315-a162-7e5ac550ac6f" ocs_repository="nfs4://${nfs_srv}/mnt/partimag/" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=${url}images/clonezilla/filesystem.squashfs
    initrd ${initrd}clonezilla/initrd.img
    boot || goto start
    

    On the NFS server, this produces the following image (see attached file)

     

    Last edit: Batiste DONDOGLIO 2024-08-14
  • Batiste DONDOGLIO

    Edit:

    From the command line, it indeed works properly, but only if I use a dash instead of an underscore as follows:

    autoname-SRV-ZBX-datefmt_%d%m%Y -> Gives: SRV-ZBX-06082024

    But this doesn't work and results in the issue stated in my previous post:

    autoname-SRV-ZBX_datefmt_%d%m%Y -> Gives SRV-ZBX_%d%m%Y (literally)
    Expected: SRV-ZBX_06082024

    Ideally, it would be nice to be able to use an underscore if possible, to give the user more flexibility in how they want to name their images.

    Thank you for this amazing software !

     
    👍
    1
  • Steven Shiau

    Steven Shiau - 2024-08-06

    Thanks for your feedback.
    "Ideally, it would be nice to be able to use an underscore if possible, to give the user more flexibility in how they want to name their images. " -> Well, basically we separate the words by "-". If "_" mixes with "-", it won't be easy to parse that. That's why.

    Steven

     
    👍
    1

Log in to post a comment.