LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-06-2007, 07:49 AM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Rep: Reputation: 38
Need help doing a fsck


Have a dual boot system: Slackware on partitions hda1,3,5 and Debian on hda6,8

I want to do a fsck on my computer. Can someone help me with this? From what I understand I need to have the partitions unmounted. I tried using a live CD, but couldn't get it to read any of the partitions. I tried booting into single-user mode, but it mounts all the partitions as rw.
 
Old 08-06-2007, 08:56 AM   #2
nyloc
Member
 
Registered: Aug 2007
Location: Melbourne
Posts: 108

Rep: Reputation: 17
From a quick browse of man fsck it seems the partitions can be mounted.
You could always try the quick and dirty way.
turn the power off at the wall, count to 30, switch it back on.
the reboot will automaticallly run the disk checks.
cheers
 
Old 08-06-2007, 09:16 AM   #3
Road_map
Member
 
Registered: Jan 2007
Distribution: Slackware
Posts: 341

Rep: Reputation: 31
Quote:
Originally Posted by JosephS
Have a dual boot system: Slackware on partitions hda1,3,5 and Debian on hda6,8

I want to do a fsck on my computer. Can someone help me with this? From what I understand I need to have the partitions unmounted. I tried using a live CD, but couldn't get it to read any of the partitions. I tried booting into single-user mode, but it mounts all the partitions as rw.
1. fsck can not check rw mounted partition.
2. fsck can check:
- mounted read only partitions, but without journal replay;
- unmounted partitions, with journal replay.

If you see the message:
Quote:
Partition /dev/hdb4 is mounted with write permissions, cannot check it
you must first unmount that partition.
 
Old 08-06-2007, 10:32 AM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
Try doing a sudo touch /forcefsck and rebooting. Most systems will run a fsck if that file exists in the root file system.

Alternatively, add forcefsck to the kernel line in your boot menu and reboot. Again, most systems will run a full fsck when that command is found in the boot command line.
 
Old 08-06-2007, 11:12 AM   #5
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
make that a touch /etc/forcefsck (as root or with sudo, if you have set it up)

this will check all filesystems on the next reboot.

Last edited by erklaerbaer; 08-06-2007 at 11:15 AM.
 
Old 08-06-2007, 04:26 PM   #6
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
Thanks for help. I tried Touch /etc/forcefsck on Slackware and Debian. It worked on Slackware on Debian I'm not sure. It said something about checking the root file system, but it went too fast. I don't know how much it did or if it checked other partitions.

Is there a way to use fsck on the root partitions when they are unmounted? That way I could use the options I want. I tried a Live cd, but that didn't work. Maybe I didn't do it properly. Can I use the installation disk? I don't have a boot disk.
 
Old 08-06-2007, 09:00 PM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
Many installation disks (I don't know about Slackware or Debian) let you enter linux rescue at the first prompt or to press F1 for a list of options. Starting in "rescue" mode gets you a root session with your drives mounted ro, or, if not ro, you can umount them.

Perhaps Debian looks for the forcefsck file in / instead of /etc. You could try that, or just add the Debian partitions to /etc/fstab on your Slackware system with the usual fsck options at end of the line.

Oh, a "caution" if either of your systems use the logical volume management system: fsck cannot be run on a LVM partition as though it was a "standard" file system. Allowing fsck to write to a LVM partition will, almost always, destroy the contents of the logical volume. You can run fsck on the dev/mapper entries for the logical filesystems inside the LV.
 
Old 08-09-2007, 08:20 AM   #8
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
Installation disk for fsck

When I use the Slackware installation disk, I have the following file systems mounted:
Proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)

Is sysfs the file systems on the installation disk? Are the file systems on the hard drive mounted? I want to do a fsck on unmounted root partitions.

Does the install disk contain the boot disk or do I need to make one?

I have a dual install: Debian and Slackware. Could I use the fsck program (on the Slackware install disk) on both installations?
 
Old 08-09-2007, 12:18 PM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
Um, well, those "file systems" you list are Linux internal file systems, not ones you've mounted. They're created by the installation disk in a RAM-disk, not on any hard drive.

To see your mounted files systems, issue the mount command (with no arguments). (If you've just booted in rescue mode, nothing should be mounted except RAM-disk stuff and the CD/DVD. Which is a "good thing" if you want to run fsck.)

To see which physical devices are available, and what partitions are available on those devices, use the command fdisk -l. (Or, if that runs off your screen, pipe the output into less so you can move up and down in the output with the arrow keys. E.g., fdisk -l | less)

If the fdisk command shows you that you have "Linux" partitions, you can run fsck on any (or all) of those partitions. As I noted above, you can not run fsck on a LVM partition.
 
  


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
how to use fsck dsids Linux - Newbie 5 03-16-2006 07:30 AM
Need help with fsck Grill Master Linux - Newbie 2 07-05-2005 05:37 PM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 07:51 AM
fsck help afrodocter Linux - Software 6 04-29-2004 10:42 AM
Fsck scottpioso Linux - Newbie 7 06-01-2003 03:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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