Technical Discussion
  >> Linux Issues


Register (or login) on our website and you will not see this ad.


These posts have been archived and can no longer be replied to or modified.
  Print Thread
Standard User think26872
(member) Tue 30-Dec-08 21:39:20
Print Post

Tell Ubuntu To Do A Disk Check At Boot Up?


[link to this post]
 
Does anyone know how to tell Ubuntu to do a disk check at the next boot up?

It does a check every so often but I want to force a one off check at the next boot.

I just want a one off check nothing permanent.

TIA
Standard User john2007
(eat-sleep-adslguide) Tue 30-Dec-08 21:46:59
Print Post

Re: Tell Ubuntu To Do A Disk Check At Boot Up?


[re: think26872] [link to this post]
 
If the file system in use is ext2 or ext3 you could use tune2fs -C with a large value to force a recheck.
Standard User Uilebheist
(legend) Tue 30-Dec-08 22:58:37
Print Post

Re: Tell Ubuntu To Do A Disk Check At Boot Up?


[re: think26872] [link to this post]
 
In reply to:


Does anyone know how to tell Ubuntu to do a disk check at the next boot up?




Just before reboot type:
sudo touch /forcefsck

edit = to fix messed up layout. Don't use [code]!

Edited by Uilebheist (Tue 30-Dec-08 22:59:45)


Register (or login) on our website and you will not see this ad.

Standard User Kronos2001
(fountain of knowledge) Wed 31-Dec-08 17:28:28
Print Post

Re: Tell Ubuntu To Do A Disk Check At Boot Up?


[re: Uilebheist] [link to this post]
 
You can also add the -F switch to the shutdown command. Shutdown will then create /forcefsck for you and reboot the computer.

sudo shutdown -F -r now
Anonymous
(Unregistered)Mon 16-Feb-09 19:06:31
Print Post

Re: Tell Ubuntu To Do A Disk Check At Boot Up?


[re: think26872] [link to this post]
 
Create an empty file "forcefsck" on the root of your partition will force a filesystem check.

force fsck on root partition -> touch /forcefck

Or use the shutdown command: shutdown -rF now (will reboot and check the disk)
  Print Thread

Jump to