LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 07-05-2009, 05:15 AM   #1
WillingToLikeLinux
Member
 
Registered: Sep 2008
Posts: 90

Rep: Reputation: 16
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.
 
Old 07-05-2009, 05:22 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
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
 
Old 07-05-2009, 05:29 AM   #3
WillingToLikeLinux
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by repo View Post
try man badblocks
Code:
badblocks -v /dev/hdx
It says:

Code:
badblocks: No such file or directory while trying to determine device size
 
Old 07-05-2009, 05:32 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
You need to know the partition you want to scan
As root
Code:
fdsik -l
Then
Code:
badblocks -v /dev/xxxx
depending on the output from fdisk -l
 
Old 07-05-2009, 05:36 AM   #5
WillingToLikeLinux
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by repo View Post
You need to know the partition you want to scan
As root
Code:
fdsik -l
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.
 
Old 07-05-2009, 05:41 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
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
Quote:
/dev/sdc
 
Old 07-05-2009, 05:45 AM   #7
WillingToLikeLinux
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 16
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.
 
Old 07-05-2009, 05:48 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Seems to me the usb has problems :-)

try
Code:
badblocks -v /dev/sdb1
 
Old 07-05-2009, 05:57 AM   #9
WillingToLikeLinux
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by repo View Post
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.
 
Old 07-05-2009, 06:00 AM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
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 ?
 
Old 07-05-2009, 06:02 AM   #11
WillingToLikeLinux
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by repo View Post
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?
 
Old 07-05-2009, 06:05 AM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Take a look at testdisk
http://www.cgsecurity.org/wiki/Main_Page
 
Old 07-05-2009, 06:07 AM   #13
WillingToLikeLinux
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by repo View Post
Does this happen to also recover corrupted files as well? In case if my files are corrupted after the recovery, what should I do?
 
Old 07-05-2009, 06:10 AM   #14
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
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.
 
Old 07-05-2009, 06:12 AM   #15
WillingToLikeLinux
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 16
Sorry about that. I'm just paranoid of the fear that I will lose my crucial files related to my university.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Lan Scaning Help!!!! dreamerchawla Linux - Software 5 03-24-2008 03:02 PM
Script for scaning files bhandu Linux - Newbie 1 06-17-2007 04:25 PM
Scaning devices on the network GSalah Linux - Networking 7 07-02-2006 08:13 AM
Scaning disk mp4-10 Linux - Software 3 03-22-2005 10:40 AM
I think someone is scaning me Joey.Dale Linux - Networking 6 01-02-2004 05:20 PM


All times are GMT -5. The time now is 02:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration