Project

General

Profile

Bug #67071

Escape single quotes in media description of installer

Added by Matthew Peters 8 months ago. Updated 7 months ago.

Status:
Done
Priority:
No priority
Assignee:
Ryan Moeller
Category:
OS
Target version:
Seen in:
Severity:
Low
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

FreeNas 11.2 is not seeing my SanDisk Cruzer Fit. I have to put two of the same USB drives in before the Choose destination media menu shows up. I have attached a picture. I think there is something wrong with the install where it tries to figure out which drives the software can be installed. I already opened up a ticket but it was closed telling me to update the BIOS. I updated the BIOS and got the same issue. The original bug was #66324. If you need to run anything to help figure out the problem let me know.

Matt

IMG_0209.jpg (2.07 MB) IMG_0209.jpg Choose destination Media Matthew Peters, 01/02/2019 03:28 PM
47127

Related issues

Related to FreeNAS - Bug #66324: USB Drive not detected during installClosed

Associated revisions

Revision c3a2cf23 (diff)
Added by Ryan Moeller 7 months ago

[install.sh] Escape single-quotes in description

Single-quotes must be escaped in the media description to not break the
quoting of the argument list for the disk selection dialog.

Ticket: #67071

Revision 9ae7fba2 (diff)
Added by Ryan Moeller 7 months ago

[install.sh] Escape single-quotes in description

Single-quotes must be escaped in the media description to not break the
quoting of the argument list for the disk selection dialog.

Ticket: #67071

Revision 14f93989 (diff)
Added by Ryan Moeller 7 months ago

[install.sh] Escape single-quotes in description

Single-quotes must be escaped in the media description to not break the
quoting of the argument list for the disk selection dialog.

Ticket: #67071

History

#1 Updated by Sean Fagan 8 months ago

Are you booting off one of the SanDisk devices?

#2 Updated by Matthew Peters 8 months ago

No, I have one USB that I'm using to boot off of to do the install, and I have 2 of the Cruzer Fit to do the install too. When I only have one of the USB Cruzer Fit plugged in, I get get past the install menu. When I plug the 2rd Cruzer Fit in then I can get past the install screen, see the attachment of what I get. I'm guessing that there must be a weird char or something that is causing the parsing on the list USB drives to mess things up. Just a guess.

Matt

#3 Updated by Sean Fagan 8 months ago

Ah, I see it now, yes. The menu is being made incorrectly for some reason.

#4 Updated by Dru Lavigne 8 months ago

  • Related to Bug #66324: USB Drive not detected during install added

#5 Updated by Dru Lavigne 8 months ago

  • Assignee changed from Release Council to Alexander Motin

#6 Updated by Matthew Peters 8 months ago

I think that it is not detecting the USB when only one is inserted. It is very weird. And since the Menu is not being displayed right, I'm guessing there is a parsing issue.

#7 Updated by Sean Fagan 8 months ago

I suspect it's seeing it, but for some reason the formatting is breaking the menu-creation code in the installer. There's an easy way to find out: with only one attached, boot, go to the shell, and do "sysctl -n kern.disks". There should be a "da1" in the list and if so, "diskinfo -v da1" should show that it's the SanCruzer. If not, then something weird is indeed going on!

#8 Updated by Matthew Peters 8 months ago

"sysctl -n kern.disks".

With only one of the Cruzer Fit inserted: da1 da0 ada3 ada2 ada1 ada0

With both of the Cruzer Fit inserted: da2 da1 da0 ada3 ada2 ada1 ada0

So it is showing the USB as da1 which is correct, so what command do you do to get all the other info that is used to create the menu of which device to install too? Maybe that will shed more light on what is going on. I guessing since da1 is the last one that shows on the menu list that it is causing the failure.

If you go back to the picture that I uploaded you will see:
da1 SanDiskCruzer

It is missing the "Fit" and everything after that is on the next line. Looks like a parsing error to me. So if you can give me the command that you are running to get all the information on the da1 da2 maybe that will show us what is going wrong.

#9 Updated by Alexander Motin 7 months ago

  • Status changed from Unscreened to Blocked
  • Reason for Blocked set to Need additional information from Author

Matthew, please show output of `geom disk list daX` for each USB stick in your system. `dmesg` output would also not harm. Or if you finally managed to install FreeNAS there, attach its debug.

#10 Updated by Matthew Peters 7 months ago

root@nas2:~ # geom disk list da1
Geom name: da1
Providers:
1. Name: da1
Mediasize: 15791554560 (15G)
Sectorsize: 512
Mode: r1w1e2
descr: SanDisk'Cruzer Fit
lunname: SanDisk'Cruzer Fit 4C530000241111123021
lunid: SanDisk'Cruzer Fit 4C530000241111123021
ident: 4C530000241111123021
rotationrate: unknown
fwsectors: 63
fwheads: 255

root@nas2:~ # geom disk list da0
Geom name: da0
Providers:
1. Name: da0
Mediasize: 15791554560 (15G)
Sectorsize: 512
Mode: r1w1e2
descr: SanDisk'Cruzer Fit
lunname: SanDisk'Cruzer Fit 4C530000221111123100
lunid: SanDisk'Cruzer Fit 4C530000221111123100
ident: 4C530000221111123100
rotationrate: unknown
fwsectors: 63
fwheads: 255

Do you see the ' in the lunname and desc, I'm sure that is causing the issue. Leave it to SanDisk to put a weird char it the desc.

Matt

#11 Updated by Alexander Motin 7 months ago

  • Status changed from Blocked to Unscreened
  • Assignee changed from Alexander Motin to Ryan Moeller

Ryan, could you please look on string quoting in the installer. I doubt that T10 identifier of SanDisk really supposed to include the quote mark, but it does not violate SCSI SPC-5 specification, which allows all printable ASCII characters.

#12 Updated by Ryan Moeller 7 months ago

  • Status changed from Unscreened to Screened
  • Severity changed from New to Low
  • Reason for Blocked deleted (Need additional information from Author)

#13 Updated by Sean Fagan 7 months ago

We may need to filter the output so that the only characters are [A-Za-z0-9 \t].

#14 Updated by Alexander Motin 7 months ago

Sean Fagan wrote:

We may need to filter the output so that the only characters are [A-Za-z0-9 \t].

As I have told, SCSI does not require it. Modification of identifiers creates chance that they won't match somewhere else.

#15 Updated by Sean Fagan 7 months ago

No, but dialog(1) is horrible with trying to deal with such things. And that's the only reason we need the identifiers.

#16 Updated by Alexander Motin 7 months ago

OK. Whatever works there.

#17 Updated by Ryan Moeller 7 months ago

  • Status changed from Screened to In Progress

The dialog command is invoked using eval, in order to evaluate the quoting of the checklist items. The descriptions are single-quoted, so a single-quote in a description messes up the evaluation of the argument list. Any other characters in the description should be quoted properly by the single-quoted string.

I have escaped single-quotes in the description.

master PR: https://github.com/freenas/freenas/pull/2410

#18 Updated by Ryan Moeller 7 months ago

  • Target version changed from Backlog to 11.2-U2

Matthew, can you confirm the issue is fixed with this build of 11.3? If it's then good I'll submit the PR for 11.2 as well. Thanks!

https://builds.ixsystems.com/jenkins/job/FreeNAS%20-%20Master%20-%20Incremental%20Build/4132/artifact/artifacts/iso/FreeNAS-11.3-MASTER-201901120154-142d4d493.iso

#19 Updated by Matthew Peters 7 months ago

Ryan,
I booted up the new ISO and it detected the SanDisk. It did not work when I only had one installed before. I also put in with both of the SanDisk USB drives and that worked as well. I only went as far as the Choose menu where to install. I did not do a full install because I did not want to mess up my current insulation. Thanks for the quick turn around on this. I hope it benefits others.

Matt

#20 Updated by Ryan Moeller 7 months ago

Matthew Peters wrote:

I booted up the new ISO and it detected the SanDisk.
I also put in with both of the SanDisk USB drives and that worked as well.

Great, thanks!

#21 Updated by Ryan Moeller 7 months ago

#22 Updated by Ryan Moeller 7 months ago

  • Status changed from In Progress to Ready for Testing
  • Needs Merging changed from Yes to No

#23 Updated by Ryan Moeller 7 months ago

  • Subject changed from FreeNAS not seeing USB driver during install to Escape single-quotes in media description in installer

#24 Updated by Dru Lavigne 7 months ago

  • Subject changed from Escape single-quotes in media description in installer to Escape single quotes in media description of installer
  • Needs Doc changed from Yes to No

#25 Updated by Ryan Moeller 7 months ago

  • Needs QA changed from Yes to No

#27 Updated by Dru Lavigne 7 months ago

  • Status changed from Ready for Testing to Done

Also available in: Atom PDF