Project

General

Profile

Actions

Todo #2953

closed

Track down root cause for necessary rc.firmware adjustments for USB flash media

Added by ky41083 - about 11 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
ky41083 -
Category:
Upgrade
Target version:
-
Start date:
04/17/2013
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

My commit:

Previous USB patch to add 4MB to partition size calculation was not only not working, but worse, causing dev's to close all related tickets as duplicates when it clearly still needed fixing.

Also, some dev's cited that "the CF install base is so much larger it's not worth breaking". Well, you've already broken it by adding a 4MB buffer for USB, which doesn't work. Either patch it right at 6MB, or completely take out the buffer all together to "fix" CF upgrades again. Why sit on a double broken patch?

PoC: EVERY USB flash based install in place upgrade was failing by exactly 2MB. Added this patch to my 2.0.2 system after a failed 2.0.3 upgrade and boom, upgraded to 2.0.3 without issue.

Commit accept response from jim-p:

Except it was off by exactly 2mb before and the previous fix did, in fact, fix it for everyone having problems at that time. Adding another 2mb to the fix may correct it again, but it also makes one wonder if it will break for someone else at 8mb in the future because the previous fix, and this one, are both missing the actual root cause.

Finally, the resulting question:

"the previous fix, and this one, are both missing the actual root cause."

Do you, or anyone else, have any idea what the root cause is?

fdisk and gpart both reported the 2 partition sizes correctly, as the amount in MB the error message said the script was looking for and not finding.

If no one really has a good idea I will be more than happy to read through the rc.firmware script and possibly adjust the actual method used for pulling the partition size value. It would seem that simply finding a better way to parse fdisk or gpart output is needed.

Should I assume using gpart to get partition size moving forward, as this would keep the script compatible with MBR and GPT tables should pfSense decide to use either one.....

Also, quite possibly, could this be a change to the way FreeBSD itself handles USB flash media? As this would cause an adjustment to be required every single time the base code for handling USB flash media changes, and explain our "difficult to explain at best" issue ;-p

So, who's up for some idea bouncing?


Files

rc.firmware (17 KB) rc.firmware ky41083 -, 04/17/2013 09:40 PM
Actions #1

Updated by ky41083 - about 11 years ago

Raw command on console - /sbin/fdisk da0 | /usr/bin/grep Meg | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d"(" -f2 - reports correct sizes, 923.

Upgrade was failing, saying I had only 921 sized partitions..... more digging to do....

Actions #2

Updated by Renato Botelho over 10 years ago

  • Status changed from New to Rejected

Please discuss the ideas on forum or mailing lists, which are more appropriate places for technical discussions, and open a ticket when the issue is confirmed and is reproducible.

Actions #3

Updated by Chris Buechler over 8 years ago

  • Target version deleted (2.1)
Actions

Also available in: Atom PDF