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 06-05-2021, 09:46 AM   #1
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Rep: Reputation: Disabled
fsck 1) Drop file 2) Rename file 3) Auto-rename 4) Keep it


I tried to reburn win iso from this external HDD , but having minor hiccup.

I saw this dmesg error prompt:


Code:
$ sudo dmesg | grep fsck
[  515.679956] FAT-fs (sdd1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[manjaro@manjaro ~]$ ^Cdo dmesg | grep fsck

Hence do a fsck on the partition:



Code:
$sudo fsck /dev/sdd1

/2016 DEC 1 BACKUP/gardening/GRAFTING/すいか接ぎ 熊本 植木すいか.mp4
  Bad short file name ( 9A32~1.MP4).
1) Drop file
2) Rename file
3) Auto-rename
4) Keep it
What does this fsck prompt means by 1 to4 ?
1. "drop file" means what ? delete the file ?
2. rename file ? rename file name from "すいか接ぎ 熊本 植木すいか.mp4" to 9A32~1.MP4 ?
3. auto rename ? auto rename from "すいか接ぎ 熊本 植木すいか.mp4" to 9A32~1.MP4" without prompting ?
4. keep it ? does it means no change to file name ?

Does above means i got corrupted file name ? or is it just that linux does not recognize long windows filename as "proper" ?


should i do fsck in this case or i can simply ignore fsck saying that need to check with fsck (simply because linux does like long filename of windows) ?
 
Old 06-05-2021, 10:07 AM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,619

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555

Putting error messages into search engines is a good way of figuring out what they're about.

The error message is "Bad short file name".

https://duckduckgo.com/?q=fsck+"Bad+short+file+name"

First result is a Fedora bug, second result is:
Quote:
Originally Posted by https://www.raspberrypi.org/forums/viewtopic.php?p=551855
But, when I run ./fsck.fat -V /dev/mmcblk0p1 it says bad short file name ( ) with these options below:
1) Drop file
2) Rename file
3) Auto-remove
4) Keep it
?

I don't have a clue which to select. I will be very happy for some advice!
----
First Response:
Option 2 looks good. The short filename is a feature that is hanging around since the days of DOS when a filename was a maximum of 8 characters long plus a 3 character extension (.txt) - I don't think it's doing much harm
----
Second Response:
Faster, easier, safer way is shutdown the RPi, pull the card, mount on your Windows system and let Windows checkdisk repair the filesystem.
The general consensus is that FAT/NTFS filesystems are best fixed by Windows, hence the second response there.

The first response highlights that it probably doesn't matter (unless you're going to interact with that file using old software).


Last edited by boughtonp; 06-05-2021 at 10:08 AM.
 
Old 06-05-2021, 10:23 AM   #3
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post
Putting error messages into search engines is a good way of figuring out what they're about.

The error message is "Bad short file name".

https://duckduckgo.com/?q=fsck+"Bad+short+file+name"

First result is a Fedora bug, second result is:


The general consensus is that FAT/NTFS filesystems are best fixed by Windows, hence the second response there.

The first response highlights that it probably doesn't matter (unless you're going to interact with that file using old software).

I suppose you meant there is nothing wrong with the hdd.. just long file name length that linux jealous of. :-)

I didn't know what to search for , hence i plugged in the whole chunk of "$sudo fsck /dev/sdd1

/2016 DEC 1 BACKUP/gardening/GRAFTING/すいか接ぎ 熊本 植木すいか.mp4
Bad short file name ( 9A32~1.MP4).
1) Drop file
2) Rename file
3) Auto-rename
4) Keep it"
into google to search and came out with all unrelated result, hence i asked here.

Can you tell me "drop file" means what ? delete the file (the programmer just like to use funny words )? I believe "keep it" simply means keep the original long file name.

Anyway, glad to know there is nothing wrong with the hdd partition.
 
Old 06-05-2021, 10:50 AM   #4
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,619

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by andrewysk View Post
I didn't know what to search for , hence i plugged in the whole chunk ... into google to search and came out with all unrelated result, hence i asked here.
Well there's three lessons:

1) You need to learn how to identify error messages, and how to reduce what you're putting into a search engine to keywords.

2) If your opening post says "I searched for X in search engine Y but got no results", people can provide you with better terms to search for.

3) Use DuckDuckGo before asking for help, because it doesn't profile you and give different results (beyond the stupid regional crap, but that's one click to turn off), so you can know that others looking at the same time should be seeing the the same results.


Quote:
Can you tell me "drop file" means what ? delete the file (the programmer just like to use funny words )?
Drop is a relatively common synonym for delete, so that wouldn't surprise me.

If you feel it should be clearer, fsck is part of util-linux, which has an issue tracker where you can raise that (and highlight the lack of any clarification of the options in the man page).
(update: correcting the above, the "drop file" option comes from fsck.fat - part of dosfstools, which has its own issue tracker.)


Quote:
I believe "keep it" simply means keep the original long file name.
The error is not about the standard filename, it is the SHORT (DOS 8.3) filename where the issue is. This is why the error is "Bad short file name" (and likely because it appears to start with a space).


Quote:
Anyway, glad to know there is nothing wrong with the hdd partition.
I never said that - I am making no statements regarding whether the hdd partition is good or bad or anywhere in between.


Last edited by boughtonp; 06-05-2021 at 11:48 AM.
 
1 members found this post helpful.
Old 06-05-2021, 11:29 AM   #5
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post
Well there's three lessons:

1) You need to learn how to identify error messages, and how to reduce what you're putting into a search engine to keywords.

2) If your opening post says "I searched for X in search engine Y but got no results", people can provide you with better terms to search for.

3) Use DuckDuckGo before asking for help, because it doesn't profile you and give different results (beyond the stupid regional crap, but that's one click to turn off), so you can know that others looking at the same time should be seeing the the same results.



Drop is a relatively common synonym for delete, so that wouldn't surprise me.

If you feel it should be clearer, fsck is part of util-linux, which has an issue tracker where you can raise that (and highlight the lack of any clarification of the options in the man page).



The error is not about the standard filename, it is the SHORT (DOS 8.3) filename where the issue is. This is why the error is "Bad short file name" (and likely because it appears to start with a space).



I never said that - I am making no statements regarding whether the hdd partition is good or bad or anywhere in between.

I see, google do profiling on individual, hence each person can have different search result even when entering the same keyword. Good to realize this.

I can't check fsck on the partition, because it gave me "bad short file name" prompts.. i can't want to keep pressing "4. keep it" for hundred times (who know) before reaching other error which needed to be fix.
Hence in this case fsck is useless to me (in this particular situation)
 
Old 06-05-2021, 11:42 AM   #6
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,619

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555

It's very rare that software written for Linux cannot be automated/scripted.

Looking at man fsck shows there is a "-N" option:
Quote:
Originally Posted by man fsck
Don't execute, just show what would be done.
The same man page also highlights this important fact:
Quote:
Originally Posted by man fsck
In actuality, fsck is simply a front-end for the various filesystem checkers (fsck.fstype) available under Linux.
i.e. Running fsck against a FAT filesystem will use fsck.fat, and so checking man fsck.fat reveals a bunch more options, including "-a":
Quote:
Originally Posted by man fsck.fat
Automatically repair the filesystem. No user intervention is necessary. Whenever there is more than one method to solve a problem, the least destructive approach is used.
(This also highlights that the choice of "drop file" is part of fsck.fat, which is provided by dosfstools rather than util-linux, and thus should be the target of any issues created regarding lack of clarity/documentation.)


Last edited by boughtonp; 06-05-2021 at 11:46 AM.
 
Old 06-05-2021, 12:19 PM   #7
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post

i.e. Running fsck against a FAT filesystem will use fsck.fat, and so checking man fsck.fat reveals a bunch more options, including "-a":


Thanks.
I know now fsck, fsck.vfat, fsck.fat has got so many variance. I tried using "-n" (for no change) , but still it is a scary tool to use. Rather not check it, not looking for trouble.
 
  


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
Is it necessary to drop specific flags in IPTABLES with an INPUT DROP policy? rootaccess Linux - Networking 5 08-22-2012 08:10 PM
Drop connections to port 80 at firewall machine also drop at protected network? Niceman2005 Linux - Security 2 10-27-2005 08:21 AM
2 fsck or not 2 fsck? naps SUSE / openSUSE 4 03-18-2005 02:11 PM
iptables - drop all -> allow needed OR allow all -> drop specific lucastic Linux - Security 5 12-21-2004 02:07 AM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 07:51 AM

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

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