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
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
07-05-2009, 05:15 AM
#1
Member
Registered: Sep 2008
Posts: 90
Rep:
How does scaning work?
This is from
http://ubuntuforums.org/showthread.php?t=1006328
I am still not familiar how the whole terminal thing goes for this. I don't know much on this.
Quote:
Directly after getting the error, check /var/log/syslog and see if there are any disk-related errors.
Also, I would scan both your USB drive and your laptop's hard drive with "badblocks -v".
How does
check /var/log/syslog and
badblocks -v work in the terminal step-by-step?
I don't know where to start when I am very clueless on command line; only know very basic.
07-05-2009, 05:22 AM
#2
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
open a terminal, login as root and type
Code:
tail -f /var/log/syslog
Then if the error appears, look at the output in the terminal.
So you can follow the logfile live.
Quote:
badblocks -v work in the terminal
try man badblocks
Code:
badblocks -v /dev/hdx
07-05-2009, 05:29 AM
#3
Member
Registered: Sep 2008
Posts: 90
Original Poster
Rep:
Quote:
Originally Posted by
repo
try man badblocks
Code:
badblocks -v /dev/hdx
It says:
Code:
badblocks: No such file or directory while trying to determine device size
07-05-2009, 05:32 AM
#4
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
You need to know the partition you want to scan
As root
Then
Code:
badblocks -v /dev/xxxx
depending on the output from fdisk -l
07-05-2009, 05:36 AM
#5
Member
Registered: Sep 2008
Posts: 90
Original Poster
Rep:
Quote:
Originally Posted by
repo
You need to know the partition you want to scan
As root
Then
Code:
badblocks -v /dev/xxxx
depending on the output from fdisk -l
which /dev/??? entry correspond to USB drive? sda1?
Edit: Wait, I got it. fdisk
Last edited by WillingToLikeLinux; 07-05-2009 at 05:39 AM .
07-05-2009, 05:41 AM
#6
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
In a terminal type
Code:
tail -f /var/log/syslog
Then plugin the usb, and look at the output.
It should read something like:
Quote:
Jul 5 12:37:47 cannabis kernel: [40399.425843] scsi 6:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
Jul 5 12:37:49 cannabis kernel: [40401.392915] sd 6:0:0:0: [sdc] 7936000 512-byte hardware sectors (4063 MB)
Jul 5 12:37:49 cannabis kernel: [40401.393298] sd 6:0:0:0: [sdc] Write Protect is off
Jul 5 12:37:49 cannabis kernel: [40401.393298] sd 6:0:0:0: [sdc] Mode Sense: 23 00 00 00
Jul 5 12:37:49 cannabis kernel: [40401.393298] sd 6:0:0:0: [sdc] Assuming drive cache: write through
Jul 5 12:37:49 cannabis kernel: [40401.396917] sd 6:0:0:0: [sdc] 7936000 512-byte hardware sectors (4063 MB)
Jul 5 12:37:49 cannabis kernel: [40401.397338] sd 6:0:0:0: [sdc] Write Protect is off
Jul 5 12:37:49 cannabis kernel: [40401.397338] sd 6:0:0:0: [sdc] Mode Sense: 23 00 00 00
Jul 5 12:37:49 cannabis kernel: [40401.397338] sd 6:0:0:0: [sdc] Assuming drive cache: write through
So in this case the usb is on
07-05-2009, 05:45 AM
#7
Member
Registered: Sep 2008
Posts: 90
Original Poster
Rep:
Mine says:
Jul 5 06:42:13 ??? kernel: [ 4230.597654] FAT: Filesystem panic (dev sdb1)
Jul 5 06:42:13 ??? kernel: [ 4230.597658] fat_get_cluster: invalid cluster chain (i_pos 116569480)
Jul 5 06:42:13 ??? kernel: [ 4230.597667] FAT: Filesystem panic (dev sdb1)
Jul 5 06:42:13 ??? kernel: [ 4230.597670] fat_get_cluster: invalid cluster chain (i_pos 116569480)
Jul 5 06:42:13 ??? kernel: [ 4230.597677] FAT: Filesystem panic (dev sdb1)
Jul 5 06:42:13 ??? kernel: [ 4230.597682] fat_get_cluster: invalid cluster chain (i_pos 116569480)
Jul 5 06:42:13 ??? kernel: [ 4230.597689] FAT: Filesystem panic (dev sdb1)
Jul 5 06:42:13 ??? kernel: [ 4230.597693] fat_get_cluster: invalid cluster chain (i_pos 116569480)
Jul 5 06:42:13 ??? kernel: [ 4230.597701] FAT: Filesystem panic (dev sdb1)
Jul 5 06:42:13 ??? kernel: [ 4230.597705] fat_get_cluster: invalid cluster chain (i_pos 116569480)
Edit: I believe something's wrong with my computer reading FAT.
Last edited by WillingToLikeLinux; 07-05-2009 at 05:46 AM .
07-05-2009, 05:48 AM
#8
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
Seems to me the usb has problems :-)
try
Code:
badblocks -v /dev/sdb1
07-05-2009, 05:57 AM
#9
Member
Registered: Sep 2008
Posts: 90
Original Poster
Rep:
Quote:
Originally Posted by
repo
Seems to me the usb has problems :-)
Or perhaps FAT isn't a good file system for USBs in the first place.
My USB's file system: W95 FAT32
Result from badblocks:
Code:
Checking blocks 0 to 3915203
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found.
Strange. This looks very odd.
07-05-2009, 06:00 AM
#10
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
fat32 on usb is no problem.
You could try to reformat the drive, unless you need to recover the data on the usb
Can you read the usb in windows ?
07-05-2009, 06:02 AM
#11
Member
Registered: Sep 2008
Posts: 90
Original Poster
Rep:
Quote:
Originally Posted by
repo
fat32 on usb is no problem.
You could try to reformat the drive, unless you need to recover the data on the usb
Can you read the usb in windows ?
I can't reformat this. It's has some of my crucial academic data for my university courses.
I don't have Windows.
Is there a way to fix the corrupted FAT system in the USB drive?
07-05-2009, 06:05 AM
#12
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
07-05-2009, 06:07 AM
#13
Member
Registered: Sep 2008
Posts: 90
Original Poster
Rep:
Quote:
Originally Posted by
repo
Does this happen to also recover corrupted files as well? In case if my files are corrupted after the recovery, what should I do?
07-05-2009, 06:10 AM
#14
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
Perhaps you should first focus on accessing the drive.
From the site:
Quote:
TestDisk can
* Fix partition table, recover deleted partition
* Recover FAT32 boot sector from its backup
* Rebuild FAT12/FAT16/FAT32 boot sector
* Fix FAT tables
* Rebuild NTFS boot sector
* Recover NTFS boot sector from its backup
* Fix MFT using MFT mirror
* Locate ext2/ext3 Backup SuperBlock
* Undelete files from FAT, NTFS and ext2 filesystem
* Copy files from deleted FAT, NTFS and ext2/ext3 partitions.
07-05-2009, 06:12 AM
#15
Member
Registered: Sep 2008
Posts: 90
Original Poster
Rep:
Sorry about that. I'm just paranoid of the fear that I will lose my crucial files related to my university.
All times are GMT -5. The time now is 03:47 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News