Jim Cornette jim-cornette at sbcglobal.net
Sat Jun 19 03:07:47 UTC 2004

Pedro Fernandes Macedo wrote:
> Jim Cornette wrote:

>> The easiest way to force your computer to do a filecheck is to run the 
>> below command as root.
>> shutdown now -Fr
>> This will reboot your computer, then force a filecheck.
>> Dropping into maint. mode could be caused by trying to mount a volume 
>> in /etc/fstab as a type that it is not. I believe setting the last two 
>> numbers to anything but zeroes will drop you to the shell.
> You'll be only dropped to maintenance mode if there is a serious error , 
> like wrong filesystem type. The last two numbers are used by dump and 
> fsck. From the man pages:

Good catch about the last two numbers and thanks for the informative 
excerpt for these values.

I meant to say that setting these numbers on a hard disk which is 
attached through usb and included to be mounted through fstab will drop 
you to the maint. shell. I set the values to 1 for both values and kept 
being dropped to a shell. Someone from an earler list pointed out the 
errors in making the entries 1, since usb is loaded after the point that 
  fstab comes into play.


>> The fifth field, (fs_freq), is used for these filesystems by the 
>> dump(8) command to determine which filesystems need to be dumped.
>> If the fifth field is not present, a value of zero is returned and
>> dump will assume that the filesystem does not need to be dumped.
>> The sixth field, (fs_passno), is used by the fsck(8) program to
>> deter- mine the order in which filesystem checks are done at reboot
>>  time. The root filesystem should be specified with a fs_passno of
>> 1, and other filesystems should have a fs_passno of 2. Filesystems
>> within a drive will be checked sequentially, but filesystems on
>> different drives will be checked at the same time to utilize
>> parallelism available in the hardware. If the sixth field is not
>> present or zero, a value of zero is returned and fsck will assume
>> that the filesystem does not need to be checked.
>>        The proper way to read records from fstab is to use the 
>> routines getmn-
>>        tent(3).
>> Run the command mount. This will give you an output with the currently 
>> mounted filesystems. I unmount the filesystems that I try to check. I 
>> believe that you will be prompted to unmount the partition before 
>> fscking.
> Most filesystems require that the filesystem is not mounted before the 
> check. Others , like xfs , have the option to check the filesystem if it 
> is mounted read-only.

I haven't tried out xfs yet. I might try this on a later install to see 
if things are like with xfs. ... thanks for the additional info
>>> 3- can I find another software other  than fsck  to check and solve 
>>> hardware problem ?
>>> I found knoppix but dont have any experience with that .
> Probably you'll find none. If the problem is corrupted FS data , then 
> only fsck can fix it (or you can try debugfs , but it wont be a trivial 
> task). If the problem is in the disk itself , you can try to run the 
> software from the disk manufacturer. But , chances are that if there are 
> bad blocks , you may loose data , unless the program is smart enough to 
> move the data to another block.
>>> 4-what is the best way to transfer data from crashed hard to the new 
>>> one?
>>> fsdump ? or just cp ?I use fedora core one and need some thing that 
>>> untar or restore every thing
>>> on home directory .
> I dont like the idea of using dump (specially after using ufsdump and 
> now being unable to restore the files on any linux system). The idea of 
> dumping the whole filesystem contents bothers me. Specially when all you 
> need is the file , its permissions and any ACL that exists (if one 
> exists). The way I usually do is using tar -cfv --preserve-permissions  
> --same-owner file.tar inputfiles .
> -- 
> Pedro Macedo

Artistic ventures highlighted.  Rob a museum.

More information about the fedora-list mailing list