Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How to format an ext2/3 USB drive?


  • Please log in to reply
3 replies to this topic

#1 Alchemist

Alchemist

  • Members
  • 172 posts
  • OFFLINE
  •  
  • Local time:05:28 AM

Posted 08 February 2011 - 02:56 PM

It's really difficult to format a USB drive with a Linux OS, and even when you succeed it is owned by ROOT, not the user logged in when you connect it. This makes using it very difficult. But FAT16/32 drives are owned by the user actually logged in and easily used. How do you prepare a USB drive with ext2/3 for easy use just like a FAT32 USB stick?

BC AdBot (Login to Remove)

 


#2 BlackSpyder

BlackSpyder

    Bleeping Big Rig


  • BC Advisor
  • 2,456 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Huddleston, VA USA (Home Sweet Home)
  • Local time:05:28 AM

Posted 08 February 2011 - 07:53 PM

Formatting is a Root operation (in most cases you have to be Root to format something). By default the OS sets Root as the owner, you can change this by running the command "chown" [Change owner]

This will set the ownership to everyone. "mountpoint" is whatever the mount point is for the USB Drive on your system.
sudo chown 777 / "mountpoint"

Replace "username" with your user name to change ownership to just that user
sudo chown "username" / "mountpoint

see "man chown" for more options.

Posted Image




#3 raw

raw

    Bleeping Hacker


  • Members
  • 2,577 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Texas
  • Local time:04:28 AM

Posted 08 February 2011 - 10:14 PM

Not trying to step on toes,just offering "my" solution.
I do not allow sudo
Open a terminal, become root (su)<password>
Now type:
chmod 750 /media/myflash<--your device name,not mine. :wink:
Why 750? Because no one else needs read/write on my drive.
If you are the only person using the device you can use 777 (or 770)
Next type:
chown raw:raw /media/myflash<--again, your device,your user name
I own this device,if another user needs to use it i can add them to my
group with read/execute but not write so they don't add or delete anything.

Many different ways to do the same thing in Linux,this is just what i do. YMMV.

rawsig.png

 rawcreations.net          @raw_creations


Current systems: WHAT OS, BackTrack-raw, PCLinuxOS, Peppermint OS 6, Kali Linux

and a custom Linux From Scratch server hosting a bunch of top secret stuff.


#4 BlackSpyder

BlackSpyder

    Bleeping Big Rig


  • BC Advisor
  • 2,456 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Huddleston, VA USA (Home Sweet Home)
  • Local time:05:28 AM

Posted 09 February 2011 - 08:23 PM

That's true, over a dozen ways to fix 1 problem in Linux. I'm sure there's a GUI version of this floating around somewhere.

Posted Image







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users