Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I used the command "mkfs -t ext2 /dev/sda " to use the pen drive with linux
now I cant use the pen drive in windows. It shows that it is connected (that is icon appears in the right lower corner of the task bar) but it doesnt show in the windows explorere as a drive.
1 How to format it back to ?
2 Is there a way to use it in both linux or windows without loosing data?
you can use explore2fs (see google etc.) to READ you files in windows, but this app has no write support.
There is a system driver that will show the ext2/3 partitions as drive letters in explorer, but DO NOT USE THIS ONE!
It may change your partition type to NTFS (but keep the data), this will result in unreadable data until you manually change it back later.
to format back to windows, you can use the disk manager found in administration in the system control panel. Or you can use the linux command mkfs.vfat (see manpage)
you can use it both in linux and in windows when you use FAT32 (vfat in linux), but then you will loose linux user rights (but for data files, this seems not as harmful)
you can use explore2fs (see google etc.) to READ you files in windows, but this app has no write support.
There is a system driver that will show the ext2/3 partitions as drive letters in explorer, but DO NOT USE THIS ONE!
It may change your partition type to NTFS (but keep the data), this will result in unreadable data until you manually change it back later.
to format back to windows, you can use the disk manager found in administration in the system control panel. Or you can use the linux command mkfs.vfat (see manpage)
you can use it both in linux and in windows when you use FAT32 (vfat in linux), but then you will loose linux user rights (but for data files, this seems not as harmful)
When I try "mkfs -t vfat /dev/sda" it say "mkfs.vfat : will not try to make file system on /dev/sda" .Whats thecommand to create a vfat file system on the usb pen drive?
I suppose your pen drive uses a partition, check this using
"fdisk /dev/sda" (press p to show partition table)
It will show you a single partition with type 83 (linux)
change it to the correct type using "t", "L", and then type in the correct number for windows fat32
after that you can use "mkfs.vfat -F 32 /dev/sda1" (i assume it will be the first (and only) partition)
to format the partition. /dev/sda would be the whole drive, not only a single partition!
Also there are several projects out there that have a ext2/3 drivers availible for windows. Only problem is you have strange permission issues so installing program on the ext3 parttion is problematic in windows with these drivers.
Only reason I bring that up is that its something that I attempted recently when bulding a system for a laptop and wanted my /home directory readable and writeable by both windows and linux. I ended up using fat32 as both can see it and splitting the drive into 2 parts one fat32 and one ext3.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.