![]() |
How to check partitions (fsck)
Hi,
I have some suspicions about my file systems. I would like to check all or some of them so I would really need some step by step howtos? Only things I know is that sudo root is command for root user and fsck has something to do with filesystems checking and there should be some unmounting and also that i have at least these file systems: root / 256MB space for software installations etc. /home 2GB Nokia N900 /home/user/MyDocs 27GB Any help is appreciated. |
Re: How to check partitions (fsck)
The only one you can easily do is MyDocs, and the simplest way to do this is probably to connect to the PC in mass storage mode, then do a check on the virtual drive.
The other two you can't unmount in normal usage, so are difficult to check. You could probably insert a fsck statement into the startup scripts to check /home, but this risks locking up the device at boot time. The rootfs would be even trickier (assuming there is actually a fsck tool for ubifs). |
Re: How to check partitions (fsck)
Is it possible to turn off my device, connect to pc with some linux distro and do fsck to those ext3 filesystems from PC?
|
Re: How to check partitions (fsck)
Quote:
|
Re: How to check partitions (fsck)
Just an idea: what about booting some kind of a rescue system off a microSD?
|
Re: How to check partitions (fsck)
There's only /home which is ext3 (rootfs is ubifs), and I'm pretty sure that won't work - when you connect to the PC, it just makes the MyDocs folder available (and memory card, if installed).
|
Re: How to check partitions (fsck)
You can prevent your phone of mounting /home at boot time by commenting the "/bin/mount /home" rule in /etc/event.d/rcS-late
So to check your /home partition - comment the mount line in /etc/event.d/rcS-late - reboot - run fsck - uncomment the mount line again - reboot |
Re: How to check partitions (fsck)
Have you tested that it boots properly without this line? Remember that pretty much everything is run as the user "user", and all the config files for this user are on /home.
|
Re: How to check partitions (fsck)
You have to do it as root ... also be careful not to change any other lines since it could break your system
And it works, just did it today :) |
Re: How to check partitions (fsck)
A word of warning. I tried this and the phone reboots constantantly. I cannot ssh either. And yes, I am sure I just commented that line.
EDIT: fo rthis to work you have to enable r&d mode and have the reboot disabled. |
Re: How to check partitions (fsck)
hi guys, it's possible to schedule periodically fsck at boot time (eg: once a mounth) at start up, before maemo mounts partitions? like ubuntu..
it should be a great stuff!! |
Re: How to check partitions (fsck)
Please look into the options of tune2fs.
There is the -c for maximum mount count and there is -i for intervals between checks. |
Re: How to check partitions (fsck)
Thank you michaaa62 but I don't know if tune2fs works with ubifs (and, more general, if exists a tool for this filesystem!!).
I sought on internet about tune2fs and ubifs without success... I opened a new thread to know it. I hope no reflash one more time... :( |
Re: How to check partitions (fsck)
Quote:
|
Re: How to check partitions (fsck)
Backupmenu by RobbieThe1st has fsck of everything except rootfs, and can expose also the /opt fs in mass storage mode to an external computer to fsck it.
|
Re: How to check partitions (fsck)
Quote:
from terminal: root umount /dev/mmcblk0p1 fsck /dev/mmcblk0p1 problems are with /dev/mmcblk0p2 and p3 partitions... debernardis please, how to fsck /opt when n900 is connected to pc as mass storage? I can see only /Mydocs (/dev/mmcblk0p1) thank you edit: i read your reply to my thread how to check ubifs. about /opt/ i had to install and use backupmenu application. thank you :) |
Re: How to check partitions (fsck)
ok thanks to backupmenu I checked and corrected /opt/ but I'm sure I've to check rootfs too. since it seems impossible to check it, maybe I can backup /opt/ and /Mydocs/ partitions, reflash device and restore its (so in this case I should correct just rootfs). what do you thik about it? Can I do that or after reflash I loose links from rootfs and /opt/?
|
Re: How to check partitions (fsck)
Well you could as well reflash rootfs and reinstall your apps without restoring /opt, because /opt contains the majority of apps files. You lose only the contents of /home, but a recent backup (with the stock backup app) should contain most of it. so the only thing you should take care to backup is MyDocs - and this especially if you intend to flash also the emmc, which erases MyDocs.
|
Re: How to check partitions (fsck)
mmmhhh reflashing everytime there is a rootfs problem is too much a windows-like method! :D
I prefer use a tool like fsck using reflash mode just for extreme situations! ;) |
Re: How to check partitions (fsck)
Quote:
My N900 is with custom kernel, over-clocked, a bunch of apps (incl. RobbieThe1st - latest ver - i think its 0.62-1) and it was working fine, till today. When i was cropping the picture on the phone, it restarted. Few hours before that I fsck-ed all partitions with "RobbieThe1st" and they were OK. After crash, I checked them again and on "Checking the OptFS..." it gave me this prompt: "Errors may have been encountered: code:4 /dev/mmcblk0p2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY (i.e., without -a or -p options)" I think this is /home path, so many things on the phone are not working (obviously :( ) I tried to fsck on tablet, but I cant unmount /home. I was googling whole day, but just cant find a solution. Now here comes the question: How can I fsck /mmcblk0p2 via terminal on OSX? I am a noob, so please explain in details :rolleyes: A big thanks to one with an answer and I hope I would not need to reflash N900 again. |
Re: How to check partitions (fsck)
Boot to Backupmenu, enable USB-storage mode, then try to list all of the attached harddisks.
This would be the command in linux: Code:
ls -l /dev/disk/by-uuid But wait: Isn't there an app in Macland for that???:eek: |
Re: How to check partitions (fsck)
Thnx, michaaa62.
I tried with sudo su and i got this: sh-3.2# ls -l /dev/disk/by-uuid ls: /dev/disk/by-uuid: No such file or directory I dont know about that app, but I tried with Disk Utility on "Nokia N900" (I dont think its the right disk/folder w /home, /opt) and it shows that everything is OK, and I cant use DiskWarrior, because Nokia N900 is fat32. |
Re: How to check partitions (fsck)
Okay, my fault, i totally forgot the inability of Mac OS to handle Ext2,3,4-formatted disks.
There are some 'hacks' or tweaks to get something working via fuse and some third party drivers/modules, but i do not know, if this will expand toward diskutility or diskwarrior. May be some Linux-Live-CD would help you. |
Re: How to check partitions (fsck)
Now I am a little bit confused.
Is the main partition (I'm not speaking about the root partition) automatically checked or not? I thought that I had only to wait 30 reboots and then the file system was checked and repaired automatically? Is that true or not? |
Re: How to check partitions (fsck)
Mine is not checked at all, but this might be by some tweaks, i do not remember.
You could check with Code:
tune2fs -l /dev/mmcblk0p2 Quote:
|
Re: How to check partitions (fsck)
I don't think tune2fs has any effect on checking or not.
Basically, fsck reads the check interval when it's run, then it does a check if last check was longer ago than check interval. Or, if filesystem was not cleanly unmounted. However, fsck is never run in Maemo, so check interval does nothing. |
Re: How to check partitions (fsck)
doen't backupmenu has fsck all partions option?
|
Re: How to check partitions (fsck)
Quote:
Or, if anyone has better solution how to repair OptFS? It happend now the third time on my N900. :( |
Re: How to check partitions (fsck)
ffs noob.
1. boot backupmenu and use either serial console/USB networking to access the device then fsck. 2. boot some linux live cd like gparted, backup menu to enable USB mode. 3. boot the device in offline mode, leace it to settle for around 4 minutes, run fsck and ignore warnings about fsck'ing a mounted disk. As long as no programs are running, you can usually get away with it. 4. power kernel settings 'kernel-power-settings' has a run early fsck function in its boot up script. job. done. |
Re: How to check partitions (fsck)
thnx vi_!!
I managed to repair OptFS with GParted. |
Re: How to check partitions (fsck)
no problem bro.
|
Re: How to check partitions (fsck)
hi vi_ what happens if I do your code: sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf /* || echo "You live"
??? |
Re: How to check partitions (fsck)
It is like tossing a dice and, if you get six, your operating system gets erased; otherwise, you get a nice message. Russian roulette. Don't try it unless you are suicidal.
|
Re: How to check partitions (fsck)
Quote:
/dev/mmcblk0p2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) is this hardware or software related? if its software related, how can i found wich app is causing this? please, help me. |
All times are GMT. The time now is 23:23. |
vBulletin® Version 3.8.8