LinuxQuestions.org
Visit Jeremy's Blog.
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 12-06-2007, 08:28 AM   #1
ungua
Member
 
Registered: Oct 2004
Location: bergen, norway
Distribution: OpenSuSe (SuSe 10.1), Win XP Pro
Posts: 539

Rep: Reputation: 30
>20% of my usbdisc is used regardless of no files on it


when empty, my mp3-player is recognised as having available 390.2 of 496.9mb (512mb). that seems strange to me, since there are no files on the disc at all! to illustrate the problem, a screenshot. how do i format a usbdisc in suse? i have only formated disc in linux with a knoppix-live-cd before.

thank you very much & best regards
ungua
 
Old 12-06-2007, 11:09 AM   #2
v00d00101
Member
 
Registered: Jun 2003
Location: UK
Distribution: Devuan Beowulf
Posts: 514
Blog Entries: 1

Rep: Reputation: 37
Try something like.

Code:
mke2fs -m 0 -j /dev/someDevice
The -m flag allows you to change how much space is reserved for the root user (and his daemons). So set it to 0, and you should now have the majority of the space available. Also you do not necessarily need the -j (journal) flag if you arent bothered by the partition being ext2.
 
Old 12-06-2007, 11:27 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I would be a bit careful before formatting the usbdisc.

The screenshot you posted shows this:

/dev/sdc ? 496,9 MB /media/usbdisk 390,2 MB .....

/dev/sdc => a device is found, but no partition layout.
? => no filesystem is detected. That could mean 2 things, there is no FS present or there is one but it is not recognized!

Are you sure your mp3-player is still going to work if you format the disk with ext2 or ext3 or reiserfs or etc. ??

Just a heads up.
 
Old 12-06-2007, 11:55 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
What kind of a player is it? Note that most USB players have somekind of software on them, to be able to play songs. It usually means that they have a certain kind of filesystem (sometimes it's luckily FAT, but not always), maybe a database (but in that case special software is usually needed to transfer music to and from the player, to write the changes to the database too) and so on. So disk space can be needed by the player, even if there are no media files on it. And like druuna pointed, even if this was not the case, the player might not recognize ext2 (or other filesystems for that matter), and simply stop working after the format. The usual filesystem is FAT (because it's recognized/supported by a lot of operating systems), and I haven't seen any commercial mp3 player till today that would use or understand ext filesystems (if there are some, tell me; of course I know about iPodLinux, but I mean 'official' Linux players here). Apple iPods may use HFS (was it right?), some of them use FAT, but they don't work if you just go about formatting the player to ext (you'd then need to replace the firmware too, with one that understood ext filesystem).

So better leave it alone, or at least first study how to rever the changes and have the player 100% back to factory settings including filesystem and firmware, so that it works, before you start. Because if you don't, and it stops working, you can forget every warranty you might have - they all state somewhere (maybe small print) that any usermade changes void warranty.

Last edited by b0uncer; 12-06-2007 at 11:56 AM.
 
Old 12-07-2007, 04:18 AM   #5
ungua
Member
 
Registered: Oct 2004
Location: bergen, norway
Distribution: OpenSuSe (SuSe 10.1), Win XP Pro
Posts: 539

Original Poster
Rep: Reputation: 30
it's this player and i am very sure that it's filesystem is fat. furthermore, it was not such that that much space was reserved when the player was new for two years ago - i then had the full space of just below 500mb available. i wouldn't dare to format it with a non-windows compatible file system ...

best regards
ungua
 
Old 12-07-2007, 04:39 AM   #6
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Have you checked that there aren't some hidden files/directories on it that are taking up all the space? To do this, in a terminal, type:
Code:
cd /media/usbdisk
la -alh
That should at least show if there are some hidden directories (files/directories whose names are preceded by a .)

If there are some hidden directories/files, then you should be able to delete them and reclaim the used space.
 
Old 12-07-2007, 04:39 AM   #7
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Ok, seems like a "regular" mp3 player to me (using either FAT16 which is very commonly used with this kind of players, or FAT32) - it works by just copying the audio files there, right? Without any special programs to do that?

You could try to format it as FAT if you liked, it would probably work then. You can of course first take an image of the player disk, so you could later put it back if you wanted, to revert the changes. The image sould be easy to take and put back with dd (there's a very good thread about dd usage here at LQ). You can create FAT filesystem with mkfs.vfat I think:
Quote:
mkfs.vfat (8) - create an MS-DOS file system under Linux
But like I said, first dd an image of the player as a backup. You could also check the partition table of the disk with fdisk -l, just to make sure.

EDIT: one thing that came to my mind from pwc101:s post is that it's possible there is a trash directory on the drive (called .trash or .Trash - so it's usually hidden in Linux's file manager view). When deleting songs from the device they should usually be removed right away, but I've (once or twice) bumped into a situation myself where the file manager I used didn't remove the file, but instead put it into the "trash bin". And not into a trash bin on my harddisk, but it created a trash directory onto the device itself, and stored the files there - so instead of removing them (and freeing up space) it just moved the files into a usually-not-shown directory. Check if .trash or .Trash exists, and if it does, remove it.

Last edited by b0uncer; 12-07-2007 at 04:42 AM.
 
Old 12-07-2007, 01:29 PM   #8
ungua
Member
 
Registered: Oct 2004
Location: bergen, norway
Distribution: OpenSuSe (SuSe 10.1), Win XP Pro
Posts: 539

Original Poster
Rep: Reputation: 30
wow, thank you for a very comprehensive post, or i might even call it a "guide"! i have checked if there are any hidden files by going to "show" > "show hidden files" in konqueror, i assume that's same like using these shell commands? (i'm a gui-guy )

best regards
ungua
 
Old 12-14-2007, 05:25 AM   #9
ungua
Member
 
Registered: Oct 2004
Location: bergen, norway
Distribution: OpenSuSe (SuSe 10.1), Win XP Pro
Posts: 539

Original Poster
Rep: Reputation: 30
it seems there are no hidden files on the disc? i tried the "la -alh"-command (result). running dd creates a 0b-image, so it doesn't seem to recognize what's in the "lost" section either (screenshot)!? i don't really dare to format if i'm not 100% sure it will work afterwards...

thank you & regards
ungua
 
Old 01-13-2008, 08:08 AM   #10
ungua
Member
 
Registered: Oct 2004
Location: bergen, norway
Distribution: OpenSuSe (SuSe 10.1), Win XP Pro
Posts: 539

Original Poster
Rep: Reputation: 30
very strange: i just copied zappa's "absolutely free" to my mp3-player. in its menue i couldn't see the album, so i connected it to the notebook again. the folder "zappa" then was completely empty, but the disc space in use. so i deleted the folder, but that didn't free these 80,3mb of disc space!! how weird is that?? that leaves 309 out of 512mb.
the mkfs-command is not recognised in the shell, but i will format the drive in windows later today. i just wanted to post this strange happening, it's really not understandable.

regards
ungua
 
  


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
gnu make recompiles the source files fully even though the files are not modified yasothamani Linux - Software 4 02-07-2007 06:36 AM
Doom 3: Using native installer and can't locate saved game files or config files JBailey742 Linux - Games 11 08-14-2006 06:09 PM
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 03:07 PM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 02:38 AM

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

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