aguslr / multibootusb

A collection of GRUB files and scripts that will allow you to create a pendrive capable of booting different ISO files
https://mbusb.aguslr.com
GNU General Public License v3.0
574 stars 153 forks source link

Problem with ISO location in other partition #211

Open jabarea opened 6 years ago

jabarea commented 6 years ago

If we change the ISO location to other USB partition: set isopath='(hd0,msdos2)/isos'

There is a problem showing the name of the system at boot time in GRUB's menu. I think is a problem with this line in the scripts: regexp --set=isoname "$isopath/(.*)" "$isofile" I suppose that is because of the round brackets "()" of the path. I don't know which is the best solution for this issue, I have fixed it replacing the line with this one: regexp --set=isoname "[$isopath]/(.*)" "$isofile" But I don't know if this could be a problem in other situations.

Thank you very much.

aguslr commented 5 years ago

Hi @jabarea!

That's an interesting issue. It does seem that the parenthesis mess up the regexp. You could try something like regexp --set=isoname ".*/([A-Za-z0-9_\-\.]*)" "$isofile".

This regular expression should cover most of the characters used in ISO names although it'd take a bit of work to replace it in all configuration files. :thinking:

Edit: Actually, it seems that regexp --set=isoname ".*/(.*)" "$isofile" should suffice.