9

I want to format my USB stick to ext2. I have following tools installed. But don't know how to use them for my case:

  • Cygwin – I'm just a starter and not surely know how to use. (mkfs is also not included.)
  • Ext2Fsd – Don't know how to format Ext2. I found Change Partition Type and there are many types which I don't know.

Can anyone please guide me with steps on any of above tools (or) are there any other solutions?

studiohack
  • 13,490
4lvin
  • 175

2 Answers2

10

Install the e2fsprogs package from the installer and then you get the mke2fs (mke2fs.exe) command. Then, read this starting at the section "POSIX devices" to learn what device to tell it to format.

I've never done this. Be careful.

LawrenceC
  • 73,957
  • Now i have installed e2fsprogs. (But there is no e2fsprogs inside Cygwin call, by pressing "Tab" also. Is is normal?) Then how can i get mke2fs ? Please guide me on further steps. – 4lvin Jul 25 '11 at 23:24
  • 1
    @4lvin: mke2fs is part of e2fsprogs. Like Word is part of MS Office. There is no program called e2fsprogs. – Aluísio A. S. G. Jul 25 '11 at 23:42
  • So you mean, now i should have called and seen mke2fs inside Cygwin, right? But there, "no" mke2fs is up inside my Cygwin. Why? (or) What should i do next? – 4lvin Jul 26 '11 at 00:10
  • Does /sbin/mke2fs works? – Aluísio A. S. G. Jul 26 '11 at 00:14
  • /sbin/??? From which location you mean? There is no folder inside my default location i'm reaching at the starting of Cygwin. – 4lvin Jul 26 '11 at 00:27
  • Ah.. there is no mke2fs under /usr/sbin/ – 4lvin Jul 26 '11 at 00:28
  • 3
    According to this - http://cygwin.com/packages/e2fsprogs/e2fsprogs-1.35-3 - it's /usr/sbin/mke2fs.exe. – LawrenceC Jul 26 '11 at 03:09
  • 2
    e2fsprogs puts mke2fs in /usr/sbin, which is not in the default path. –  Jun 14 '12 at 15:58
-1

sorry - formatting on answer is nasty

    echo -e "\nFormatting USB Key ${usbKey}"
    yy=`date +'%d%m%y'`
    echo "usbPath=${usbPath}"
    dosUSBPath_=`echo ${usbPath}|cut -d "/" -f3`; 
    dosUSBPath=`echo "${dosUSBPath_}:"`
    /cygdrive/c/Windows/System32/format.com ${dosUSBPath} /fs:fat32 /v:${yy} /q /x /y 
    echo -e "\nDrive contents now are :"; ls -lrt ${usbPath}

Will format the MicroSD card

/cygdrive/c/Windows/System32/format.com d: /fs:fat32 /v:210115 /q /x /y

The type of the file system is FAT32. QuickFormatting 7600M Initializing the File Allocation Table (FAT)... Format complete. 7.4 GB total disk space. 7.4 GB are available.

    4,096 bytes in each allocation unit.
1,941,503 allocation units available on disk.

       32 bits in each FAT entry.

Volume Serial Number is 2068-BD0A

Darren
  • 7