LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-20-2010, 03:26 AM   #1
DebianUser
Member
 
Registered: Apr 2010
Posts: 88

Rep: Reputation: 15
USB Flash


I've recently bought a new USB flash drive and would like to use it on my linux box running 2.6.26-2-686.

Please could someone help me to get it working and also how to format it as fat32. Also I assume it has some sort of kingston software pre installed on it but i'd like to get rid of this and have 1 partition.

When I plug it in I get..

usb 4-7.4: new high speed USB device using ehci_hcd and address 11
usb 4-7.4: configuration #1 chosen from 1 choice
usb 4-7.4: New USB device found, idVendor=0951, idProduct=1642
usb 4-7.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-7.4: Product: DT 101 G2
usb 4-7.4: Manufacturer: Kingston
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
scsi 2:0:0:0: Direct-Access Kingston DT 101 G2 1.00 PQ: 0 ANSI: 2
sd 2:0:0:0: [sdc] 7818184 512-byte hardware sectors (4003 MB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] 7818184 512-byte hardware sectors (4003 MB)
sd 2:0:0:0: [sdc] Write Protect is off
sdc: sdc1
sd 2:0:0:0: [sdc] Attached SCSI removable disk

Last edited by DebianUser; 06-20-2010 at 04:24 AM.
 
Old 06-20-2010, 04:25 AM   #2
yooy
Senior Member
 
Registered: Dec 2009
Posts: 1,387

Rep: Reputation: 174Reputation: 174
you can fat32 format it with gparted.
 
Old 06-20-2010, 04:53 AM   #3
DebianUser
Member
 
Registered: Apr 2010
Posts: 88

Original Poster
Rep: Reputation: 15
thanks, do I do that or mount first as it's showing as sdc & sdc1
 
Old 06-20-2010, 05:27 AM   #4
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
If you have the live cd of geparted format it first.
 
Old 06-20-2010, 02:21 PM   #5
DebianUser
Member
 
Registered: Apr 2010
Posts: 88

Original Poster
Rep: Reputation: 15
Alas I don't could you give me step by step guide?
 
Old 06-20-2010, 02:31 PM   #6
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Quote:
Originally Posted by DebianUser View Post
Alas I don't could you give me step by step guide?
Do you have the live cd yes or no ?
If not download it , and burn it as iso 9660, file .
It is freeware .
Start you computer with the live cd in you're cd or dvd drive .
And geparted will guide you
 
Old 06-20-2010, 04:47 PM   #7
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
If you're seeing sdc and sdc1, then you've already got a partition on the flash drive. To
see what you've got, enter the following in a terminal window:
Code:
df -t
 
Old 06-21-2010, 08:00 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by ronlau9 View Post
And geparted will guide you
Why use a Live CD?
 
Old 06-22-2010, 01:25 AM   #9
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Quote:
Originally Posted by MTK358 View Post
Why use a Live CD?
Why for me I find easy to use the live cd to format ore make some more partition on a drive when I am using my linux box.
But it is just my opinion .
 
Old 06-22-2010, 01:44 AM   #10
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,447
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
sdc is the device
sdc1 is the partition

To format it with FAT32, all you have to do is:
Code:
mkfs.vfat -F 32 /dev/sdc1

Last edited by rkelsen; 06-22-2010 at 01:45 AM.
 
Old 06-22-2010, 02:39 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by RockDoctor View Post
If you're seeing sdc and sdc1, then you've already got a partition on the flash drive. To
see what you've got, enter the following in a terminal window:
Code:
df -t
I believe that will only provide the required information if the file system is mounted.
 
Old 06-22-2010, 02:45 AM   #12
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
The device may already have a file system on it. You can find out with file -s /dev/sdc1. Here's an example with the useful info in green (scroll right to show it)
Code:
root@CW8:~# file -s /dev/sdc1
/dev/sdc1: x86 boot sector, SYSLINUX bootloader (3.11), code offset 0x58, OEM-ID " mkdosfs", sectors/cluster 8, Media descriptor 0xf8, heads 248, sectors 15683458 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 15286, serial number 0x4c0659b0, label: "USBSLACKINS"
EDIT:

Or the blkid command:
Code:
root@CW8:~# blkid
[snip]
/dev/sdc1: LABEL="USBSLACKINS" UUID="4C06-59B0" TYPE="vfat"

Last edited by catkin; 06-22-2010 at 02:47 AM.
 
Old 06-22-2010, 02:25 PM   #13
DebianUser
Member
 
Registered: Apr 2010
Posts: 88

Original Poster
Rep: Reputation: 15
Right I managed to format it using fdisk and it now shows

Disk /dev/sdc: 4002 MB, 4002910208 bytes
124 heads, 62 sectors/track, 1016 cylinders
Units = cylinders of 7688 * 512 = 3936256 bytes
Disk identifier: 0x274467ad

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 1016 3905473 b W95 FAT32

cd /mnt/
mkdir usbflash
mount /dev/sdc1 /mnt/usbflash

How to I now write files to the flash drive?
 
Old 06-22-2010, 02:38 PM   #14
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
fdisk doesn't format, it just partitions.
 
Old 06-22-2010, 02:53 PM   #15
DebianUser
Member
 
Registered: Apr 2010
Posts: 88

Original Poster
Rep: Reputation: 15
ok I unmounted it and did

mkdosfs -F 32 -I /dev/sdc1

is this right?
 
  


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
How to install to a USB flash drive as if it was a USB HDD? ddalley Linux - Software 15 09-16-2009 08:14 PM
may install from cdrom to USB FLASH DRIVE(to get it a USB stick bootable) the ubuntu lse123 Linux - Newbie 5 01-02-2009 04:56 PM
USB Flash Drive, write protect, and flash file system questions storkus Linux - Hardware 4 12-01-2008 04:32 AM
create program and turn usb flash to usb token kpachopoulos Programming 8 10-23-2007 05:30 PM
udev, USB Flash Drives, and usb-mount talkingwires Debian 13 11-07-2004 12:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:35 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