LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-19-2013, 12:31 PM   #1
AndyInMokum
Member
 
Registered: Jun 2013
Location: Amsterdam, The Netherlands
Distribution: Peppermint Six 32-bit & 64-bi
Posts: 53

Rep: Reputation: Disabled
Problems formating a thumb drive to ext4. {SOLVED}


Greetings from Amsterdam

How do I format a 16GB USB stick to ext4 or 3, so that it is read and write and I am recognised as the owner? I 've tried formating it via the terminal. In this case my stick is /dev/sdd1. To unmount I run: umount /dev/sdd1. I then run: mkfs.ext4 /dev/sdd1. The stick is formatted but it is read only and I'm not recognised as the owner. It is the same when I use GParted. I want to use it for Porteus 2. I just can't do anything with it because I don't have permissions and I can't change the permissions. What am I missing? Help please.

Last edited by AndyInMokum; 07-21-2013 at 05:56 AM.
 
Old 07-19-2013, 12:46 PM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Mount the thumb drive as usual and then, as root or using pseudo you can give this command:
Code:
chown yourusername:yourusername /media/usb0
Replace "usb0" by the name given to the thumb drive by your system (if it's not called usb0).
jdk
 
Old 07-19-2013, 12:49 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
the formatting to ext3 or 4 has nothing to do with how it is mounted

the OS will "automount" it as READ ONLY for normal users and "Read/Write" for root
this is normal system security


likely you will need to mount it in /etc/fstab using "uuid" of the thumbdrive , and mount it a rw for the normal users
-- but this is bypassing the normal system security ,so use caution !
something like this
FRIST make the folder
"/mnt/USB.Thumb1"
Code:
/dev/disk/by-uuid/????????-????-????-????-????????????      /mnt/USB.Thumb1  ext4	rw,users 0 0
replace "/????????-????-????-????-???????????? " with the real number

folders in /media are temporary
you will need to use chown on it EVERY time you boot the computer
that folder is set aside for auto-mounting drives

Last edited by John VV; 07-19-2013 at 12:52 PM.
 
Old 07-19-2013, 01:27 PM   #4
AndyInMokum
Member
 
Registered: Jun 2013
Location: Amsterdam, The Netherlands
Distribution: Peppermint Six 32-bit & 64-bi
Posts: 53

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jdkaye View Post
Mount the thumb drive as usual and then, as root or using pseudo you can give this command:
Code:
chown yourusername:yourusername /media/usb0
Replace "usb0" by the name given to the thumb drive by your system (if it's not called usb0).
jdk
Thanks for getting back to me. I just tried your suggestion and it didn't work unfortunately:

Disk /dev/sde: 16.0 GB, 16008609792 bytes
255 heads, 63 sectors/track, 1946 cylinders, total 31266816 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00039f54

Device Boot Start End Blocks Id System
/dev/sde1 2048 31266815 15632384 83 Linux
andy1960@debimint-li-3710 ~ $

andy1960@debimint-li-3710 ~ $ sudo chown andy1960:andy1960 /media/sde1
chown: cannot access `/media/sde1': No such file or directory
andy1960@debimint-li-3710 ~ $

It beats me!
 
Old 07-19-2013, 02:21 PM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
/media/sde1 sounds like something belonging in /dev, a device name. What was the mount command you used to mount /dev/sde1?
jdk
 
Old 07-19-2013, 02:24 PM   #6
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,155
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
ext4?
forget it. ext2!
 
Old 07-19-2013, 03:36 PM   #7
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,143

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Is this /dev/sde1 or /dev/sdd1? You've quoted both, and if you get the muddled ther's obviously going to be trouble.

You've got it formated, although ext2 would be less wearing on a USB stick. Plug it in and see if it automounts. Then, for an easy approach, start your file manager (nautilus, caja?) from a terminal with sudo, navigate to the folder in media, and reset the permissions using the file manager.
 
Old 07-19-2013, 03:39 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
What exactly are you trying to do? You say you want to use it for Porteus 2, do you want to install it on that drive? Is there any data on it now? As indicated above, formatting isn't going to give ownership for any user/group. If you are not recognized as the owner, who is? What system are you using to get this information?


Quote:
chown: cannot access `/media/sde1': No such file or directory
You got the above error because you did not create the directory mount point 'sde1' in the /media directory before trying to change owner.
 
Old 07-19-2013, 04:27 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
what is wrong with using fstab to mount it read write
-- this is one of the reasons for having that file

the folders in /media are a TEMP file system
and are removed on logout and shutdown

the automount will by default mount it READ ONLY for normal users
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Create a Bootable Live USB Thumb Drive or Rescue Drive Using UNetbootin LXer Syndicated Linux News 0 08-06-2012 03:10 AM
Install Linux to SATA drive but GRUB2 on to USB thumb drive Quija Linux - General 2 11-22-2011 06:40 PM
Problems with ext4 on large drive GigaRoc Linux - Software 3 07-10-2009 02:01 PM
Ubuntu 8.10 Thumb Drive Problems - Live Sessions dffeitlstp Ubuntu 1 01-21-2009 07:11 AM
Problems with new kernel (2.6.3) and USB thumb drive kenji1903 Linux - General 8 05-15-2004 01:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration