Click here to Skip to main content
16,016,391 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
QuestionWould it work? Pin
Joan M3hrs ago
professionalJoan M3hrs ago 
AnswerRe: Would it work? Pin
charlieg2hrs 44mins ago
charlieg2hrs 44mins ago 
AnswerRe: Would it work? Pin
charlieg2hrs 34mins ago
charlieg2hrs 34mins ago 
On one of my embedded projects, the controller OS could only handle DOS-16 - basically nothing larger than 2GB. Now this project started in 2003, it's still deployed. We started with 64MB compact flash. Obviously, over a couple of decades, you simply cannot find these small capacity cards. So, I dug around and came up with the information for resizing the drives.

I mainly used this on Compact Flash cards that were either 4 or 8GB. I have not used it on an SSD, but I cannot think of a reason why it would not work.

Hope this helps.

------------------------------------------------------------------

Before starting, please remember that you can seriously mess things up if you make a mistake using command line disk management. Please make 150% sure you are selecting the correct disk so you don’t format your hard drive. You are solely responsible for anything that happens as a result of using this code 🙂

Instructions for reducing the partition size of a compact flash (CF) card:

Open a command Window (Windows-> Start -> cmd)
Type diskpart
A new window will open up with a “diskpart>” prompt note: if there happen to be network drives, and you are not on the network, this command can take some time.
list disk
select disk n (where n is the number of your CF card)
list volume
select volume n (where n is the number of CF card volume)
clean all (this completely reformats the disk – it will take a while and appear to hang but be patient)
create partition primary (this gives the newly formated CF card a partition so it can be resized)
shrink querymax
This will tell you how much space is currently on available on your CF card. Subtract this from the filesize in MB you want for the final disk than add 1.
For my 4GB disk, shrink querymax returns:

“The maximum number of reclaimable bytes is: 3824MB”
I wanted a final disk size of 2GB which a google search told me is 1954MB so 3824 – 1954 + 1= 1871
shrink desired = 1871 (This tells diskpart to try and shrink the disk by 1871 MB)
Now that the disk is the right size, you can format the partition…
format fs=fat label=”volumelabel”
That’s all it takes.

More info on diskpart commands here:
http://technet.microsoft.com/en-us/library/cc766465(WS.10).aspx
Charlie Gilley

“Microsoft is the virus..."

"the problem with socialism is that eventually you run out of other people's money"

AnswerRe: Would it work? Pin
Jacquers44mins ago
Jacquers44mins ago 
GeneralWordle 1,204 Pin
GKP199210hrs 24mins ago
professionalGKP199210hrs 24mins ago 
GeneralRe: Wordle 1,204 - 4 4 me Pin
pkfox9hrs 38mins ago
professionalpkfox9hrs 38mins ago 
GeneralRe: Wordle 1,204 Pin
OriginalGriff9hrs 16mins ago
mveOriginalGriff9hrs 16mins ago 
GeneralRe: Wordle 1,204 Pin
StarNamer@work5hrs 52mins ago
professionalStarNamer@work5hrs 52mins ago 
GeneralRe: Wordle 1,204 Pin
Cp-Coder4hrs 19mins ago
Cp-Coder4hrs 19mins ago 
GeneralAh the joys of late stage optimization Pin
honey the codewitch20hrs 17mins ago
mvahoney the codewitch20hrs 17mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
obermd18hrs 12mins ago
obermd18hrs 12mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
honey the codewitch17hrs 21mins ago
mvahoney the codewitch17hrs 21mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
PIEBALDconsult15hrs 36mins ago
mvePIEBALDconsult15hrs 36mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
trønderen15hrs 15mins ago
trønderen15hrs 15mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
obermd14hrs 5mins ago
obermd14hrs 5mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
charlieg4hrs 46mins ago
charlieg4hrs 46mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
honey the codewitch3hrs 13mins ago
mvahoney the codewitch3hrs 13mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
charlieg2hrs 8mins ago
charlieg2hrs 8mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
honey the codewitch1 hr 54mins ago
mvahoney the codewitch1 hr 54mins ago 
GeneralOpening up the web to embedded (CSS post thoughts ctd) Pin
honey the codewitch22hrs 21mins ago
mvahoney the codewitch22hrs 21mins ago 
GeneralRe: Opening up the web to embedded (CSS post thoughts ctd) Pin
Gary Stachelski 202120hrs 43mins ago
Gary Stachelski 202120hrs 43mins ago 
GeneralRe: Opening up the web to embedded (CSS post thoughts ctd) Pin
honey the codewitch20hrs 40mins ago
mvahoney the codewitch20hrs 40mins ago 
GeneralRe: Opening up the web to embedded (CSS post thoughts ctd) Pin
Gary Stachelski 202119hrs 32mins ago
Gary Stachelski 202119hrs 32mins ago 
GeneralRe: Opening up the web to embedded (CSS post thoughts ctd) Pin
honey the codewitch19hrs 30mins ago
mvahoney the codewitch19hrs 30mins ago 
GeneralRe: Opening up the web to embedded (CSS post thoughts ctd) Pin
Gary Stachelski 202119hrs 11mins ago
Gary Stachelski 202119hrs 11mins ago 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.