Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: How to format removable devices

  1. #1
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Thumbs down How to format removable devices

    How to format removable devices

    Introduction

    This script is for: CujoQuarrel and tedrogers

    1. This is a bash script that will unmount, format, and re-mount a removable device.
    2. You can add a menu item/desktop icon/launcher if you like.
    3. Although this is a bash script IT RUNS AS A GUI.
    4. Dependency : The only absolute dependency is zenity which is installed with a default Ubuntu (gnome) installation.


    Not to state the obvious, but,

    Caution: If you format a device/partition you will lose all the data in that partition. You have been warned....

    How to install this script

    1. Download the attached file (Ubuntu_format.txt).
    2. Save it to /usr/bin as /usr/bin/format (you must sudo to do this).
    3. Alternately, as suggested by sebastjanp, you may save the script to your scripts directory.
    4. Make it executable.
      Code:
      sudo chmod a+x /usr/bin/format


    How to use this script
    1. IMO this script is best run in a terminal:
      Code:
      gksudo format
    2. Start the script with your device attached and mounted in /media
    3. You can also manually add a menu item, desktop icon, or launcher.
      command: gksudo /usr/bin/format
    4. At the end of the script your newly formatted device will be mounted, rw, at /media/new_format
    5. You should be able to umount as a user (from the desktop -> eject or in a terminal with pumount pumount /media/new_format/), but if you have problems,
      Code:
      sudo pumount /media/new_format
      Or, if all else fails:
      Code:
      sudo umount /media/new_format
      sudo rm -r /media/new_format




    Enjoy

    bodhi.zazen
    Attached Files Attached Files
    Last edited by bodhi.zazen; November 20th, 2006 at 06:44 AM.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  2. #2
    Join Date
    Aug 2006
    Location
    UK
    Beans
    441
    Distro
    Ubuntu

    Re: How to format removable devices

    Great Howto bodhi.zazen. And thanks for adding my name!

    Worked great for me.
    "My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention." - Hedley Lamarr
    Lenovo T500 2243-4EG

  3. #3
    Join Date
    May 2005
    Beans
    23

    Re: How to format removable devices

    Great job bodhi.zazen. I have inputed your script into scripts folder and now when I right click on anything I get a menu which includes format option. And I have tested it and it works.
    Just for a record I have Acer Travelmate 2423 with Edgy on it.

    P.S. Ofcourse I had to make it executable.

  4. #4
    Join Date
    Sep 2005
    Location
    The American Empire
    Beans
    340

    Question Re: How to format removable devices

    Everything seemed to work for me except....it gets mounted with read-only permissions. I can't write anything to it.
    Registered Linux User # 437006
    http://sidux.com/ - K Desktop Environment (Debian Sid)
    MasterShaper - Network traffic under control

    Currently listening to

  5. #5
    Join Date
    Dec 2006
    Beans
    12
    Distro
    Ubuntu 6.06 Dapper

    Re: How to format removable devices

    Well, THAT was helpful. =D> Thanks, Bodhi.zazen, for that very useful script! Totally worked for me.

  6. #6
    Join Date
    Sep 2005
    Location
    The American Empire
    Beans
    340

    Talking Re: How to format removable devices

    It worked fine for me on an external hard drive.

    The USB memory stick I was having problems with is some junk Microsoft model that has a locking mechanism that will not let me format it with anything other than Fat or NTFS.

    BTW...great script.
    Registered Linux User # 437006
    http://sidux.com/ - K Desktop Environment (Debian Sid)
    MasterShaper - Network traffic under control

    Currently listening to

  7. #7
    Join Date
    Nov 2007
    Beans
    1

    Smile Re: How to format removable devices

    Thank bodhi.zazen it work well for me

  8. #8
    Join Date
    Apr 2007
    Beans
    1

    Re: How to format removable devices

    Thanks - that is exactly what I was looking for! Great job.

  9. #9
    Join Date
    Oct 2007
    Beans
    234
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: How to format removable devices

    don't we have any graphical interface for formating USB devices?

  10. #10
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: How to format removable devices

    Quote Originally Posted by gytis View Post
    Thanks - that is exactly what I was looking for! Great job.
    This is an old thread and I had all but forgotten about it.

    I am glad the script worked for you, you are most welcome.

    Quote Originally Posted by bharadwaj View Post
    don't we have any graphical interface for formating USB devices?
    But my script is a graphical
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •