LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-11-2010, 11:43 AM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 57
ubuntu/debian: how to : fsck.ext3 /dev/hda1 at the next reboot?


I would like to do :

badblocks from fsck for my / of ext3 type.

Code:
 fsck.ext3 -p -c /dev/hda1

Code:
# fdisk -l

Disk /dev/hda: 60 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/hda1   *           1        2804    22523098    7  HPFS/NTFS
/dev/hda2            2805        7108    34563847   83  Linux
/dev/hda3            7109        7296     1502077    5  Extended
/dev/hda5            7109        7296     1502077   82  Linux swap
Warning: Partition 5 does not end on cylinder boundary.

How can this be possible at reboot (badblocks) ?

(I cannot gparted nor usb because nothing is working)
it should fix itself linux (without usb live bootable)
 
Old 01-11-2010, 11:50 AM   #2
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Stretch Amd64
Posts: 1,477

Rep: Reputation: Disabled
Well,according to fdisk hda1 is an NTFS partition,however to answer your question you can force a fsck at next boot with:

Quote:
shutdown -F now
This has to be run as root of course.
 
Old 01-22-2010, 01:08 PM   #3
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by the trooper View Post
Well,according to fdisk hda1 is an NTFS partition,however to answer your question you can force a fsck at next boot with:



This has to be run as root of course.
that's cool. thank you. I learned that the 0 1 2 at the end of /etc/fstab are important:
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hdf1       /               ext3    errors=remount-ro 0       1
/dev/hdf2       none            swap    sw              0       0
/dev/sdb1       /home           ext3    defaults        0       2
0 for no checking
1 for the "/" root
2 for the /home or anythign else than "/" root

man shutdown. I should haved checked the man of shutdown. It is amazing. I never thought that linux had that too. Man, linux has everything of windows. Even more than it. we do more than linux, but windows xp users think only that windows is everything and can everything.
Quote:
-F Force fsck on reboot.

Last edited by frenchn00b; 01-22-2010 at 01:10 PM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fsck.ext3: Unable to resolve: UUID - during reboot after installation totalrookie Fedora - Installation 4 07-17-2008 01:37 AM
Move /dev/hda2 to end of disk and grow /dev/hda1 bcg121 Linux - Software 4 11-09-2007 10:51 PM
Rsync from say /dev/hda1 to /dev/sda1 backup DIRdiver Linux - General 6 10-09-2006 07:42 PM
Mount command says / is mounted from /dev/hda4, but I know its /dev/hda1 trewsfan Linux - Software 2 08-30-2006 11:01 PM
Grub Dual Boot /dev/sda1 /dev/hda1 jono268 Debian 4 01-14-2005 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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