ValdikSS/windows2usb

`isolabel` should be sanitized

b0ch3nski opened this issue · 5 comments

isolabel can contain chars that mkfs.vfat cannot accept

mkfs.vfat -n "${isolabel:0:11}" "$(get_dev_partition_num "${dev}" "1")"

mkfs.vfat: Labels with characters *?.,;:/\|+=<>[]" are not allowed

I assume you have a custom ISO file. Custom ISO files are generally not supported as they may contain many modifications as Windows installer system is pretty flexible, which are not handled by windows2usb.

Agreed, but replacing the not allowed chars would be pretty much simple and protect from at least this kind of issue ;)

@b0ch3nski What did you end up using to create the USB?

EDIT: Ventoy worked for me.

@b0ch3nski What did you end up using to create the USB?

@Manouchehri Monkey-patch the code - remove these lines:

    isolabel="$(get_iso_name "$isopath")"
    if [ $? -ne 0 ]
    then
        isolabel=""
    fi

It will create the empty ISO label which will avoid the FAT32 limitations.

Fixed in 0.2.2