oneohthree / bootify

Bash script to make USB drives bootables with Windows 7/8/8.1/10 installation files
GNU General Public License v2.0
32 stars 4 forks source link

Feature : Add an option to prevent reformatting the USB drive #5

Open sebma opened 6 years ago

sebma commented 6 years ago

Hi,

Can you add an option to prevent reformatting the USB drive ?

oneohthree commented 6 years ago

I'm sorry, but, what do you mean by this? In my opinion it is always better to reformat the drive to ensure everything runs OK.

sebma commented 6 years ago

Why erase all the data on the pen-drive every time ?

I'd like to have an option that does the job without re-formatting the pen-drive.

The mount or the df -T command tells us in what filesystem the pen drive is already formatted with.

And even if the pen-drive could not be mounted, the user just as to do an fsck before running bootify

oneohthree commented 6 years ago

Too much hassle, a lot of checks to do. Don't you think?

sebma commented 6 years ago

You don't have to add any checks, maybe just precise in your README.md that :

UEFI needs a FAT32 formated pen-drive and boot mode does not care if FAT32 or NTFS.

But if you really want to do the checks, you can do that (but I think you already know how to do it) :

If $SCH = uefi => df -T | grep "${DEV}1" | egrep "vfat|fat32" (you can replace df -T by mount if df -T is not portable enough)

oneohthree commented 6 years ago

I will think about this over.