Reply
Thread Tools
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#21
@biketool,

s/fdisk/fsck/g

BTW, what's the "-f" option for?
 
Posts: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#22
Originally Posted by biketool View Post
What would the ideal way be to repair a problematic /home/user/MyDocs partition if you have broken the USB porto on your N900?

I did

sudo umount /dev/mmcblk0p1
sudo fdisk -af /dev/mmcblk0p1
sudo fdisk -r /dev/mmcblk0p1
sudo reboot

This did the trick on todays problem but I would like to know if there are further fsck or dosfsck tricks to clean out a file system when I cant use another machine for whatever reason. I know I have had better results with the Ubuntu disk utility than either my laptops fsck or gparted.
You might want to edit your post to have the correct command as it is fsck.
This might explain some of the differences in the fsck success rate(note the date!)
Nokia-N900:~# fsck -v
fsck 1.41.3.maemo0 (12-Oct-2008)
versus
root@siductionbox:/home/micha# fsck -v
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
 

The Following User Says Thank You to michaaa62 For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#23
Originally Posted by reinob View Post
BTW, what's the "-f" option for?
I think this:
Code:
       -f     
Salvage unused cluster chains  to  files.  By  default,  unused clusters  are  added to the free disk space except in auto mode  (-a).
But. btw. what is your 'g' for?
Originally Posted by reinob View Post
s/fdisk/fsck/g
 
misterc's Avatar
Posts: 1,625 | Thanked: 998 times | Joined on Aug 2010
#24
Originally Posted by peterleinchen View Post
I think this:
Code:
       -f     
Salvage unused cluster chains  to  files.  By  default,  unused clusters  are  added to the free disk space except in auto mode  (-a).
-f option forces fsck to do its work, whether it likes it or not
the fdisk -f function (for experts only) fixes partition order; doubt that's the intended effect here

Originally Posted by peterleinchen View Post
But. btw. what is your 'g' for?
this is vi terminology to replace any instance of fdisk with fsck

EDIT: well, the whole line searches for fdisk and replaces it with fsck and g does that
__________________
information is a necessary though no sufficient condition to rationality...

Last edited by misterc; 2012-09-21 at 22:00. Reason: explicit s//g
 
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#25
Yep, you are also right about fsck -f, depending on which flavour you use (fsck.vfat for MyDocs or fsck.ext*).

vi terminology? Another unsolved mystery
 
misterc's Avatar
Posts: 1,625 | Thanked: 998 times | Joined on Aug 2010
#26
Originally Posted by peterleinchen View Post
Yep, you are also right about fsck -f, depending on which flavour you use (fsck.vfat for MyDocs or fsck.ext*).
i think fsck is fsck.ext
fsck.vfat? that's a funny one
don't even have vfat partition on my lappy anymore ¦-))))
not in a mood to mess with MyDocs right now, sorry

Originally Posted by peterleinchen View Post
vi terminology? Another unsolved mystery
Code:
vi
try it

hint: : (colon) gets you in command mode
:q! bails you out
__________________
information is a necessary though no sufficient condition to rationality...
 
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#27
But you forgot to mention the ESC
It's not that I do not know the surface , but in detail it is just too much keyboard shortcuts to remember for my old head

fsck is probably fsck.ext
But fsck.vfat or fsck.dos are symlinked to dosfsck.
And as I still prefer to be compatible with the Windows world, my MyDocs is still FAT.

But I think we are drifting into OT, or?
 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#28
Originally Posted by peterleinchen View Post
vi terminology? Another unsolved mystery
(off-topic)
vi, ed and sed, which are essentially the same thing anyway.
 

The Following User Says Thank You to reinob For This Useful Post:
Posts: 1,417 | Thanked: 2,619 times | Joined on Jan 2011 @ Touring
#29
woops, I mean (fsck not fdisk!)

sudo umount /dev/mmcblk0p1
sudo fsck -af /dev/mmcblk0p1
sudo fsck -r /dev/mmcblk0p1
sudo reboot

Curious if dosfsck does anything more, with my old Zaurus(with ~2002 era OpenZaurus3.2 OS) I remember using e2fsck for ext2 and it being more powerful than straight fsck if my ext2 formatted SD card got hosed by a broken transfer or something
 
Posts: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#30
From the manpage:
In actuality, fsck is simply a front-end for the various file system checkers (fsck.fstype) available under Linux. The file system-specific checker is searched for in /sbin first, then in /etc/fs and /etc, and finally in
the directories listed in the PATH environment variable. Please see the file system-specific checker manual pages for further details.
Thus fsck has just the common options of all the fsck.*** checkers, but there are more options available for each specific commands.
 

The Following User Says Thank You to michaaa62 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 09:08.