Click here to Skip to main content
16,016,425 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.

 
GeneralOh, yeah, that was why... Pin
PIEBALDconsult12mins ago
mvePIEBALDconsult12mins ago 
Generalhow to unzip .7z file programmatically? Pin
Southmountain17mins ago
Southmountain17mins ago 
GeneralMessage currently under review Pin
19mins ago
Karim Atal19mins ago 
JokeThe squirrels must be expecting a cold winter as they seem to be gathering more nuts than usual. Pin
honey the codewitch1 hr 38mins ago
mvahoney the codewitch1 hr 38mins ago 
JokeRe: The squirrels must be expecting a cold winter as they seem to be gathering more nuts than usual. Pin
Daniel Pfeffer1 hr 1 min ago
professionalDaniel Pfeffer1 hr 1 min ago 
QuestionWould it work? Pin
Joan M4hrs 46mins ago
professionalJoan M4hrs 46mins ago 
AnswerRe: Would it work? Pin
charlieg4hrs 30mins ago
charlieg4hrs 30mins ago 
AnswerRe: Would it work? Pin
charlieg4hrs 20mins ago
charlieg4hrs 20mins 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
Jacquers2hrs 30mins ago
Jacquers2hrs 30mins ago 
GeneralWordle 1,204 Pin
GKP199212hrs 10mins ago
professionalGKP199212hrs 10mins ago 
GeneralRe: Wordle 1,204 - 4 4 me Pin
pkfox11hrs 24mins ago
professionalpkfox11hrs 24mins ago 
GeneralRe: Wordle 1,204 Pin
OriginalGriff11hrs 2mins ago
mveOriginalGriff11hrs 2mins ago 
GeneralRe: Wordle 1,204 Pin
StarNamer@work7hrs 38mins ago
professionalStarNamer@work7hrs 38mins ago 
GeneralRe: Wordle 1,204 Pin
Cp-Coder6hrs 5mins ago
Cp-Coder6hrs 5mins ago 
GeneralAh the joys of late stage optimization Pin
honey the codewitch22hrs 3mins ago
mvahoney the codewitch22hrs 3mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
obermd19hrs 58mins ago
obermd19hrs 58mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
honey the codewitch19hrs 7mins ago
mvahoney the codewitch19hrs 7mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
PIEBALDconsult17hrs 22mins ago
mvePIEBALDconsult17hrs 22mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
trønderen17hrs 1 min ago
trønderen17hrs 1 min ago 
GeneralRe: Ah the joys of late stage optimization Pin
obermd15hrs 51mins ago
obermd15hrs 51mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
charlieg6hrs 32mins ago
charlieg6hrs 32mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
honey the codewitch4hrs 59mins ago
mvahoney the codewitch4hrs 59mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
charlieg3hrs 54mins ago
charlieg3hrs 54mins ago 
GeneralRe: Ah the joys of late stage optimization Pin
honey the codewitch3hrs 40mins ago
mvahoney the codewitch3hrs 40mins ago 
GeneralOpening up the web to embedded (CSS post thoughts ctd) Pin
honey the codewitch4-Oct-24 8:16
mvahoney the codewitch4-Oct-24 8:16 

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.