fsck set to run every X number of mounts

Asked by michael

I used command: sudo tune2fs -l /dev/sda1 | grep -i mount
From question 216569, here is my answer.

mcpulley@GX:~$ sudo tune2fs -l /dev/sda1 | grep -i mount
[sudo] password for mcpulley:
tune2fs: Bad magic number in super-block while trying to open /dev/sda1
Couldn't find valid filesystem superblock.

What is bad magic number and how to repair it?
How to repair filesystem superblock?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubuntu-meta Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
michael (yellupcm-gmail) said :
#1

I am using Ubuntu 12.04.

Revision history for this message
michael (yellupcm-gmail) said :
#2

Not solved.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

What is the output of:

sudo lshw -C disk; sudo lshw -C drive; lsb_release -a; uname -a

Thanks

Revision history for this message
michael (yellupcm-gmail) said :
#4

mcpulley@GX:~$ sudo lshw -C disk; sudo lshw -C drive; lsb_release -a; uname -a
[sudo] password for mcpulley:
  *-cdrom
       description: DVD writer
       physical id: 0.0.0
       bus info: scsi@0:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/cdrw
       logical name: /dev/dvd
       logical name: /dev/dvdrw
       logical name: /dev/sr0
       capabilities: audio cd-r cd-rw dvd dvd-r
       configuration: status=nodisc
  *-disk:0
       description: ATA Disk
       product: Maxtor 7Y250M0
       vendor: Maxtor
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sda
       version: YAR5
       serial: Y690VVVE
       size: 233GiB (251GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=9b55e8bc
  *-disk:1
       description: ATA Disk
       product: ST500DM002-1BD14
       vendor: Seagate
       physical id: 0.1.0
       bus info: scsi@2:0.1.0
       logical name: /dev/sdb
       version: KC45
       serial: Z2ATHYZR
       size: 465GiB (500GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=00028eed
  *-disk
       description: SCSI Disk
       physical id: 0.0.0
       bus info: scsi@4:0.0.0
       logical name: /dev/sdc
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
Linux GX 3.2.0-34-generic-pae #53-Ubuntu SMP Thu Nov 15 11:11:12 UTC 2012 i686 i686 i386 GNU/Linux
mcpulley@GX:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Then use /dev/sdb in the command, instead of /dev/sda1

Read the output.....

Revision history for this message
michael (yellupcm-gmail) said :
#6

Then use /dev/sdb in the command

mcpulley@GX:~$ sudo tune2fs -l /dev/sdb | grep -i mount
[sudo] password for mcpulley:
tune2fs: Bad magic number in super-block while trying to open /dev/sdb
Couldn't find valid filesystem superblock.

/dev/sda

mcpulley@GX:~$ sudo tune2fs -l /dev/sda | grep -i mount
tune2fs: Bad magic number in super-block while trying to open /dev/sda
Couldn't find valid filesystem superblock.
mcpulley@GX:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Look at the command in your initial question, then compare it to your last update...you'll see where it went wrong.

Think about it.....

Revision history for this message
michael (yellupcm-gmail) said :
#8

Have though about it. Still missing something.
Here is same commands in Ubuntu 10.04. (Did break one long command in to two commands)

mcpulley@mcpulley-desktop:~$ sudo tune2fs -l /dev/sda1 | grep -i mount
[sudo] password for mcpulley:
Last mounted on: /
Default mount options: (none)
Last mount time: Thu Dec 13 18:53:09 2012
Mount count: 1
Maximum mount count: 35
mcpulley@mcpulley-desktop:~$ sudo lshw -c disk
  *-disk
       description: ATA Disk
       product: WDC WD1600AAJB-0
       vendor: Western Digital
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 01.0
       serial: WD-WCAV37751566
       size: 149GiB (160GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=0006d245
  *-cdrom:0
       description: DVD-RAM writer
       product: DRW-2014S1
       vendor: ASUS
       physical id: 1
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/cdrw
       logical name: /dev/scd0
       logical name: /dev/sr0
       version: 1.00
       capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5 status=nodisc
  *-cdrom:1
       description: CD-R/CD-RW writer
       product: CD-RW CRX160E
       vendor: SONY
       physical id: 0.1.0
       bus info: scsi@1:0.1.0
       logical name: /dev/cdrom1
       logical name: /dev/cdrw1
       logical name: /dev/dvd1
       logical name: /dev/dvdrw1
       logical name: /dev/scd1
       logical name: /dev/sr1
       version: 1.0g
       serial: [SONY CD-RW CRX160E 1.0g Aug21 ,2000
       capabilities: removable audio cd-r cd-rw
       configuration: ansiversion=5 status=nodisc
mcpulley@mcpulley-desktop:~$ sudo lshw -C drive; lsb_release -a; uname -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid
Linux mcpulley-desktop 2.6.32-45-generic #100-Ubuntu SMP Wed Nov 14 10:41:11 UTC 2012 i686 GNU/Linux
mcpulley@mcpulley-desktop:~$

Revision history for this message
michael (yellupcm-gmail) said :
#9

Xubuntu 12.04

mcpulley@mcp-Dimension-8100:~$ sudo tune2fs -l /dev/sda1 | grep -i mount
[sudo] password for mcpulley:
Last mounted on: /
Default mount options: (none)
Last mount time: Thu Dec 13 19:50:43 2012
Mount count: 2
Maximum mount count: 35
mcpulley@mcp-Dimension-8100:~$

Why does same command work on Ubuntu 10.04 and Xubuntu 12.04, but not on Ubuntu 12.04? I quit copy and paste, and now typing them in.

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#10

Because your drive has a different name, this is why UUIDs are used in /etc/fstab.

Revision history for this message
michael (yellupcm-gmail) said :
#11

Thanks actionparsnip, that solved my question.

Revision history for this message
michael (yellupcm-gmail) said :
#12

mcpulley@GX:~$ sudo tune2fs -l /dev/sda5 | grep -i mount
Last mounted on: /
Default mount options: user_xattr acl
Last mount time: Fri Dec 14 19:03:24 2012
Mount count: 4
Maximum mount count: -1

Solved, Use the first Linux drive.