LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 01: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 06:56 AM.
 
Old 07-19-2013, 01:46 PM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

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, 01:49 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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 01:52 PM.
 
Old 07-19-2013, 02: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, 03:21 PM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

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, 03:24 PM   #6
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Debian like
Posts: 710
Blog Entries: 2

Rep: Reputation: 68
ext4?
forget it. ext2!
 
Old 07-19-2013, 04:36 PM   #7
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,165

Rep: Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223
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, 04:39 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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, 05:27 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:10 AM
Install Linux to SATA drive but GRUB2 on to USB thumb drive Quija Linux - General 2 11-22-2011 07:40 PM
Problems with ext4 on large drive GigaRoc Linux - Software 3 07-10-2009 03:01 PM
Ubuntu 8.10 Thumb Drive Problems - Live Sessions dffeitlstp Ubuntu 1 01-21-2009 08:11 AM
Problems with new kernel (2.6.3) and USB thumb drive kenji1903 Linux - General 8 05-15-2004 02:20 AM


All times are GMT -5. The time now is 02:33 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration