LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-19-2004, 04:54 AM   #1
wrongman
Member
 
Registered: May 2004
Location: Italy
Distribution: Debian Unstable 64bit
Posts: 99

Rep: Reputation: 15
badblocks check...


hi, i would like to make a badblocks check on my root partition,
am i right executing these commands?

init 1
umount /dev/hda1 (my root partition)
e2fsck -c /dev/hda1

is this right? i was wondering how can linux store the badblocks list if the partition is not mounted....
 
Old 05-19-2004, 06:34 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"is this right?"

Yes. Except that you cannot umount your / partition. A better way to run e2fsck against / is to boot a rescue cd and then do:

umount /dev/hda1
fsck -c /dev/hda1

from the rescue CD.

"i was wondering how can linux store the badblocks list if the partition is not mounted...."

e2fsck has no trouble reading and writing to an umounted device. The reason that you have to umount the partition is because a mounted file sustem may have unwritten buffers in the cache so that the information e2fsck find on the hard drive is not up to date.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 05-20-2004, 03:26 AM   #3
wrongman
Member
 
Registered: May 2004
Location: Italy
Distribution: Debian Unstable 64bit
Posts: 99

Original Poster
Rep: Reputation: 15
thanks! i was losing my hopes to have an answer :-)

but it worked for me, it unmounted the / partition in the way i wrote... maybe e2fsck didn't checked well in this way? it didn't give me any error messages... if i try to umount the / with runlevel 2 obviously it says to me that i can't umount that, but with "init 1" it worked
 
Old 05-20-2004, 10:38 AM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"if i try to umount the / with runlevel 2 obviously it says to me that i can't umount that, but with "init 1" it worked"

Right. umount / will work when you are in failsafe mode (init 1).

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
  


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
RAM badblocks check. bruse Linux - Newbie 2 07-11-2005 03:45 PM
Badblocks check in Linux ssampurna Red Hat 5 02-28-2005 01:27 AM
Badblocks odd Linux - Software 1 06-03-2004 01:54 PM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 02:10 AM
Badblocks and using dd? sthemage Linux - General 1 12-26-2003 02:52 PM

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

All times are GMT -5. The time now is 04:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration