21 March 2009

Format USB Flash Drive with ext3

Using Ubuntu 8.04 Hardy Heron, I figured it would be easy to format a thumb drive to ext3. Seems for me that nutin is easy. My plans for the USB stick is to use it with an embedded Linux box that could expectantly shutdown.

Wikipedia says this about ext3:
The ext3 or third extended filesystem is a journaled file system that is commonly used by the Linux kernel. It is the default file system for many popular Linux distributions.
...
Its main advantage over ext2 is journaling which improves reliability and eliminates the need to check the file system after an unclean shutdown.
After a few struggles with attempting to use the Partition Editior, I ended up reformatting the stick by following these instructions:
  • mount your USB stick. With Ubuntu, most automount so this is as simple as sticking it in
  • do a "$ df" and determine your drive's partition name. Mine is /dev/sdb1
  • unmount the drive
  • Be very careful and double-dog sure that you have the right partition name.
  • Use your USB's partition name in-place of my example/dev/sdb1
  • Don't ruin your hard drive by using the wrong partition. Be careful !
  • $ sudo mkfs.ext3 /dev/sdb1
  • Give your drive a name
  • $ sudo e2label /dev/sdb1 usb-mydrive

What do you think? Leave a comment.

1 comment:

  1. actually i was googling for ext3 images and came accros ur blog.....i usually format my usb drive like this:

    1. stick it into usb
    2. unmount it.
    3. format it with mkfs.ext3
    4. chmod everything to user
    5. done

    ReplyDelete