Go Back   maemo.org - Talk > Devices > Nokia N900
 
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
  #1  
Old 2010-02-07, 23:18
slender slender is offline
 
Join Date: Dec 2009
Location: Finland
Posts: 2,829
Thanks!: 2,124
Thanked 1,459 Times in 856 Posts
Default 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.
Reply With Quote
  #2  
Old 2010-02-08, 09:01
Rob1n Rob1n is offline
 
Join Date: Nov 2009
Location: Cambridge, UK
Posts: 3,617
Thanks!: 769
Thanked 2,412 Times in 1,382 Posts
Default 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).

Last edited by Rob1n; 2010-02-08 at 09:04.
Reply With Quote
  #3  
Old 2010-02-08, 11:07
slender slender is offline
 
Join Date: Dec 2009
Location: Finland
Posts: 2,829
Thanks!: 2,124
Thanked 1,459 Times in 856 Posts
Default 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?
Reply With Quote
  #4  
Old 2010-02-08, 11:10
Fargus's Avatar
Fargus Fargus is offline
 
Join Date: Oct 2009
Location: Bedfordshire, UK
Posts: 1,217
Thanks!: 1,401
Thanked 446 Times in 276 Posts
Default Re: How to check partitions (fsck)

Quote:
Originally Posted by slender View Post
Is it possible to turn off my device, connect to pc with some linux distro and do fsck to those ext3 filesystems from PC?
You need to run the OS to expose it to the PC. Thing is you only get part of the filesystem exposed.
Reply With Quote
  #5  
Old 2010-02-08, 11:26
gidoca gidoca is offline
 
Join Date: Oct 2009
Location: Switzerland
Posts: 67
Thanks!: 42
Thanked 28 Times in 20 Posts
Default Re: How to check partitions (fsck)

Just an idea: what about booting some kind of a rescue system off a microSD?
Reply With Quote
  #6  
Old 2010-02-08, 11:28
Rob1n Rob1n is offline
 
Join Date: Nov 2009
Location: Cambridge, UK
Posts: 3,617
Thanks!: 769
Thanked 2,412 Times in 1,382 Posts
Default 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).
Reply With Quote
  #7  
Old 2010-02-19, 10:44
beli beli is offline
 
Join Date: Dec 2009
Location: Belgium
Posts: 80
Thanks!: 18
Thanked 114 Times in 31 Posts
Default 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
Reply With Quote
The Following User Says Thank You to beli For This Useful Post:
  #8  
Old 2010-02-19, 12:53
floffe floffe is offline
 
Join Date: Oct 2009
Location: Sweden
Posts: 287
Thanks!: 185
Thanked 127 Times in 83 Posts
Default 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.
Reply With Quote
  #9  
Old 2010-02-19, 13:09
beli beli is offline
 
Join Date: Dec 2009
Location: Belgium
Posts: 80
Thanks!: 18
Thanked 114 Times in 31 Posts
Default 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
Reply With Quote
  #10  
Old 2010-03-29, 00:19
Artemio Artemio is offline
 
Join Date: Mar 2010
Location: Mexico
Posts: 9
Thanks!: 1
Thanked 2 Times in 2 Posts
Default 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.

Last edited by Artemio; 2010-03-29 at 02:05.
Reply With Quote
The Following User Says Thank You to Artemio For This Useful Post:
Reply


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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 21:19.