LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-21-2006, 01:50 PM   #1
KirkCuth
LQ Newbie
 
Registered: May 2006
Location: Kuala Lumpur MALAYSIA (SE Asia)
Distribution: currently SimplyMepis
Posts: 1

Rep: Reputation: 0
Question Write to USB Drive from Linux then Reading from MS Windows


Hello,
I've been trying Linux Redhat and Mandrake/Mandriva over past 5 years, but never starting using as I could never get them to read and use my USB peripherals.

Recently I got the SimplyMepis bootable CD from Linux Format magazine and was happy that it booted properly and could read my
512Mb USB pen drive that I wrote to from MS Windows XP.

I just tried dragging and dropping a file to the pen drive and it didn't seem to want to write to the pen drive. I'm doing this in Mepis as an ordinary user demo.

1) Do I have to have root privileges to write to a USB drive?

2) If I do manage to write to the USB drive, will I still be able to read from it in WinXP?

Thanks for helping me to clarify this. This is one of the issues
that has kept me from using Linux as my main OS.

Have a great day,
 
Old 05-21-2006, 02:08 PM   #2
ninjabob7
Member
 
Registered: Nov 2005
Distribution: Ubuntu 9.10 and Slackware 13.1
Posts: 78

Rep: Reputation: 15
One thing you should know about Linux and WinXP is filesystems. Linux uses the ext2 and ext3 filesystems natively, and also supports reiserfs and some others. None of these can be read by Windows without some extra tools.

Windows XP can read several filesystems:
FAT12 (also called MSDOS, readable and writable on Linux)
FAT16 (r/w on Linux)
FAT32 (r/w on Linux)
NTFS (read-only on Linux)

FAT16 and 32 are called VFAT on Linux.

Windows XP is normally installed on NTFS. Windows 95, 98, and ME use FAT32. Most USB drives and flash cards are formatted with FAT16.

Most livecd's (such as Knoppix) won't let you write to any Windows-format drive normally. In KDE, you can right-click the drive icon, click Properties, find the Read Only option (I think on the last tab) and uncheck it. Make sure the drive is unmounted when you do this. After that, you shouldn't need root priveleges.

And yes, Windows will be able to read the files.
 
Old 05-21-2006, 02:27 PM   #3
monty_2487
Member
 
Registered: Dec 2005
Posts: 46

Rep: Reputation: 15
I too have tried to use a usb drive in linux and windows. I have found that on my sys (Mandriva) I have to unmount, go into the config program and id the drive under the partition manager. Then I have to go into properties and tell the drive that all users have read/write privilages. This is painstaking to do everytime, and it is easier (for me) to re-format the jump drive to FAT32 so I can use it in both XP and linux
 
Old 05-21-2006, 02:37 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Most LiveCD's only mount filesystem devices as read-only by default. You'll have to change this to read-write. I don't know if Mepis has a simple way to do this, but Knoppix provides a right-click menu item on the desktop icon for it, so look there first.

If there isn't anything like that, then you'll have to run the mount command as root:

mount -o remount,rw /dev/sda1

where...

"-o" indicates mount options.

"remount" changes the status of a mounted disk without unmounting first (omit this if you're mounting for the first time).

"rw" is read-write (change to ro for read-only).

"/dev/sda1" is either the device name or the mount point of your usb drive. You could substitute /mnt/sda1 or /media/sda1, depending on where it's mounted. Check the drive properties for the actual device name.

You should now be able to write files to the drive. If it's anything like Knoppix, you should even be able to do it as a normal user. But you'll still need to have root priveleges to change the mount options.

Nearly all flash drive use the FAT32 file system, so there should be no problem accessing it from Windows. You may have some trouble though if you use non-English filenames. Most Linux distributions these days use UTF8 encoding, but Windows mostly still uses older country-specific encodings. To work with them you'd have to add two more options to mount: "iocharset=utf8" (assuming Mepis is UTF8, type "locale" to check), and "codepage=1234", with the number being that of your language's codepage. A more detailed explanation can be found here. Since you indicate that you are in Malasyia though, you shouldn't have to do this, since Malay uses the same codepage as English (1252).

If you ever install Linux permanently, then you'll be able to set the options permanently through the /etc/fstab file. You might even give it a try on the liveCD, since many of them allow you to save such changes to your hard drive or a removable disk.
 
Old 05-21-2006, 03:49 PM   #5
ninjabob7
Member
 
Registered: Nov 2005
Distribution: Ubuntu 9.10 and Slackware 13.1
Posts: 78

Rep: Reputation: 15
Quote:
Originally Posted by David the H.
If there isn't anything like that, then you'll have to run the mount command as root:

mount -o remount,rw /dev/sda1
Actually, I don't think that works on Knoppix. At least not mounting it from scratch. I've never tried the remount option (I only found out about it a few days ago.) And I thought I was an experienced user...
 
Old 05-21-2006, 04:50 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Yes, it does work on Knoppix. I have a second computer running it now, and I tested it before I posted.
 
  


Reply

Tags
drive, pen, share, usb, win, xp



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
Linux having trouble reading mounted Windows drive trentr Linux - General 1 11-11-2005 05:49 AM
nagging problem --sharing USB drive with Windows for read/write 1kyle SUSE / openSUSE 2 09-25-2005 03:35 AM
Reading windows drive under Fedora 3 MagusYilie Linux - Newbie 3 04-20-2005 08:43 AM
USB external drive very slow when reading file neranjana Linux - Hardware 8 03-07-2005 10:27 PM
USB drive hangs while reading on Linux DoubleLetter Linux - Hardware 7 10-26-2004 07:00 AM

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

All times are GMT -5. The time now is 03:59 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
Open Source Consulting | Domain Registration