• Please review our updated Terms and Rules here

partition tools

Dwight Elvey

Veteran Member
Joined
Jun 21, 2003
Messages
4,991
Location
Santa Cruz
On a project I'm working on for one of my old computers, I have the need to partition a SD card. I'm hoping someone has a suggestion for a free tool that I might use that runs under Win7.
Thanks
Dwight
 
I use Active @ Partition Manager and the MiniTool partition wizard for partitioning CF and flash drives, grab the free version.
 
I'm not sure that is what I'm looking for, the machine was made in 1971. I just want to stay with a FAT16 and it is a 16GB card.
Dwight

I'm dense today and not following. :huh:

1971 was certainly pre-DOS, so getting a partition manager to run on that with an SD card is going to be a bit difficult. But if you have a Linux-capable PC, gparted will work a treat, including partitioning and formatting into 2GB FAT16 partitions. I did just that yesterday on an 8GB SDHC card.
 
I'm dense today and not following. :huh:

1971 was certainly pre-DOS, so getting a partition manager to run on that with an SD card is going to be a bit difficult. But if you have a Linux-capable PC, gparted will work a treat, including partitioning and formatting into 2GB FAT16 partitions. I did just that yesterday on an 8GB SDHC card.

I'm going to use the sd card on a small micro to replace the floppy disk ( actually to supplement the floppy ). It is just that I'm comfortable with FAT16. I suppose I could go to FAT32 with a few minor changes.
The micro is a 32 bit machine so the words size is not an issue, just that the code is written for FAT16.
Dwight
 
What does that (FAT32) have to do with gparted? Gparted will make partitions of any kind that suits your fancy. (I think that even FAT12 may be supported)
 
What does that (FAT32) have to do with gparted? Gparted will make partitions of any kind that suits your fancy. (I think that even FAT12 may be supported)

It is not the tool issue, it is the size of these SD cards. There is nothing wrong with Gparted other than it sounds like a need to be on a linux. I have no linux machine at home. I use a redhat machine at work but I'm not allowed to fiddle with the OS, there. Only IT supported applications are allowed.
I know I should break from the windows junk but it seems to still be the primary free tool source for hobbyist.
Dwight
 
What OS will be running on this SD card? I find it is usually best to create partitions using whatever OS's native partition tool. Or was there some special need here such as re-sizing an existing partition?

If the OS native partition tool gets confused, the drive may need to be wiped first. In that case, this Wipedisk tool might help: http://www.lo-tech.co.uk/wiki/WipeDisk just be sure the drive you want to wipe is the only one attached as it is too easy to backwards things get. An alternate method I find handy is to use Norton Utilities 4.5 to manually edit and clear physical sector zero - when something goes wrong it is easier to see what happened.

Anyway, with a Linux partition tool all you need to do use use a Linux "Live CD" (or USB stick). You don't need to install it or do anything, just pop a live CD in the drive and if it recognizes your hardware then you wind up at a desktop where you just run the partitioning tool. Although in the case of partitioning you might want to unplug any hard drives you don't want to alter first just in case.
 
What OS will be running on this SD card? I find it is usually best to create partitions using whatever OS's native partition tool. Or was there some special need here such as re-sizing an existing partition?

If the OS native partition tool gets confused, the drive may need to be wiped first. In that case, this Wipedisk tool might help: http://www.lo-tech.co.uk/wiki/WipeDisk just be sure the drive you want to wipe is the only one attached as it is too easy to backwards things get. An alternate method I find handy is to use Norton Utilities 4.5 to manually edit and clear physical sector zero - when something goes wrong it is easier to see what happened.

Anyway, with a Linux partition tool all you need to do use use a Linux "Live CD" (or USB stick). You don't need to install it or do anything, just pop a live CD in the drive and if it recognizes your hardware then you wind up at a desktop where you just run the partitioning tool. Although in the case of partitioning you might want to unplug any hard drives you don't want to alter first just in case.

The OS that will use it has no knowledge of what is on the SD. It will just be a number of files. Each file is seen as a disk to the OS. I hardly think that a machine made in 1971 would know anything about a FAT structure or will care. It surely won't be able to directly do anything to an SD card.
Dwight
 
Oh, I see. You are using something like a Gotek or HxC floppy emulator. I'm not sure if their firmwares even really support multiple partitions. I'm not too familiar with those, but I believe those just let you select between different floppy disk image files stored on a SD or USB drive. Really no need to partition anything, I would think. I'd expect those to work fine with either FAT16 or FAT32.

Since those are modern-ish devices they should follow partitioning conventions found in newer OSes such as Linux or Windows 7/10.

If you really need to just delete/create/modify partitions, even the built in administration tools in Windows should work fine. I think the only thing Windows wont do is non-destructively resize existing partitions with data on them.
 
Most of the STM32 FAT implementations that I've seen use elmchan's FATFS drivers, which do support multiple partitions as well as FAT32. I'm running it on a 16GB SDHC right now.

But I know that you're doing a "roll your own" in Forth, Dwight, so ignore what I've said.
 
Now I've got something funny on my other SD card. The code I'm using on my BluePill ( a STM32F105 ) is derived from some I located on Github. It is working relatively well so far but it has having minor issues with the SD card that I can fix later. I'm sure that these are related to the code I pulled but that isn't the issue. I have full control of that code so I know there is nothing hidden in it ( I've rewritten much of it ).
I'd copied a number of files from my lap top. You know, so I could verify file data, directory and FAT locations because the stuff I got wasn't working right ( not that I expected it to as I'm using the FAT16 beyond its normal use of a maximum of 32M, extended to 4G ). Again that isn't my issue, I can deal with that.
When I'm looking at the directory block, I have 2 entries that look like junk? These showed up between the last file that I'd written about a week ago and the one that I'd just written. I'm a little worried that the machine I'm getting it from may have acquired a virus, somehow. I don't allow it to be on the web except to load tools. I can't find any new data on the SD that isn't my files ( all text ), with the exception of the boot sector. I don't know if it has been altered. It looks like the typical DOS sector that would be on a non-booting disk and says to install a bootable disk and hit any key. I've not looked to see if it has been altered and not saved its contents to compare. These DIR entries have been marked unused but are still there and I don't know where they came from.
I may just reformat and see if the DIR entries come back. There are a number of unused sectors at the beginning that I may use to make a copy of the boot sector.
Anyway, it is curious at the least.
As most don't deal with things at this low a level, I was wondering if anyone that has has seen such spurious artifacts. All the files before the last one were only partial clusters ( 32K in my SD ). The last file used several clusters and the fat chain looks fine.
Dwight
 
Isn't the BluePill STM32F103?

I've seen similar effects on the 407 using my own SDCard I/O. But you're probably using SPI mode, where I'm using the builtin SDIO controller. Most of my issues were timing (I was using DMA for I/O) on multi sector writes.

If you don't mind reading C, I can pass you a copy of my SD SPI I/O for the 103.
 
Back
Top