Hello,
I am using this hardware:
- rasp. B ;
- cellular line 1.0a 5v charger ;
- sandisk 4gb class 6 extreme III and sandisk 16gb micro sdHC ;
- old funky 1366x768 tv ;
- hdmi.
Xbian installs fine (using the xbian image copying tool) and runs great. But upon reboot I get corrupted block and logs shows it can't find /root.
Raspbian installs, runs, reboot and restarts without problems so I am inclined to believe it's not an SD card compatibility problem.
On the first three occasions xbian shutdowns and was working upon restart but now it never seems to work.
Here is how I shutdown my set-up:
- Choose shutdown in xbmc menu ;
- wait 2~3 minutes ;
- unplug usb charger from wall outlet.
I disabled CEC in xbmc after googling a bit about the problem but it didn't change anything.
What else can I try ?
I was thinking, once I have xbmc configured to my taste, to slide the ro-lock to prevent any writing to the SD card (and thus preventing block corruption) but I suppose xbmc wouldn't like it.
Code:
pi@raspberrypi ~ $ vcgencmd version
Oct 25 2012 16:37:21
Copyright (c) 2012 Broadcom
version 346337 (release)
Did you do any overclocking?
Quote:Did you do any overclocking?
I did not. I am not planning to do any overclocking until I really have a good reason to do so.
Here is what the screen outputs upon reboot:
same information for block 585, 584, etc..
Code:
JBD2: bad block at offset 586
IO error -5 recovering block 586 in log
EXT4-fs error (device mmcblk0p2): ext4_map_blocks:577: inode #8: block 10926: comm swapper: lblock 587 mapped to illegal pblock (lenght 1)
jbd2_journal_bmap: journal block not found at offset 587 on mmcblk0p2-8
JBD2: bad block at offset 587
JBD2: recovery failed
EXT4-fs (mmcblk0p2): error loading journal
List of all partitions:
b300 3872256 mmcblk0 driver: mmcblk
b301 34816 mmcblk0p1 00000000-0000-0000-0000-000000000000
b302 3836416 mmcblk0p2 00000000-0000-0000-0000-000000000000
No filesystem could mount root, tried: ext4
Kernel panic ) not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[mambo-jumbo]
Code:
[<c050e90c>] (kernel_init+0x ... kernel thread
... and then the screen is frozen.
If the SD card is faulty, shouldn't there be problems with raspbian as well ? I know it could be random but xbian is corrupted every time I reboot it.
Now that I think about the tests I performed earlier I seem to recall that logging through ssh, rebooting and relogging on xbian seemed to work (although it took some time for the rasp to be visible on the network).
I have other cards lying around and I think I had the same results. Will try again later in the evening.
I'll try this and 'll report later:
- ssh'ing into xbian and rebooting to see if corruption occurs ;
- just booting xbian, not changing any settings and see if it reboots ;
- erasing SD cards with
https://www.sdcard.org/downloads/formatter_3/ http://elinux.org/R-Pi_Troubleshooting#SD_cards ;
- trying other SD cards.
It just booted and rebooted three times (with xbmc settings changed to make sure something is written on the card) without any problems.
I think "- erasing SD cards with
https://www.sdcard.org/downloads/formatter_3/ http://elinux.org/R-Pi_Troubleshooting#SD_cards ;" did it. My understanding is that partitions alignement (or something related) was messed up by my successive install/reinstall of xbian and raspbian.
Note: I still had the corruption problem before formating with the sdcard.org utility (wether or not I change settings in xbmc) so I have high hope my reasonning is correct.
It doesn't look like a xbian problem although I don't understand yet why installing raspbian on those cards and rebooting, writing on it, etc. didn't trigger the problem.
So it looks like it's fixed but I am not 100% sure.
keep in mind xbian is overclocked by default, try changing core_freq=200, arm_freq=700
I changed so much settings in my current setup that I can't remember it:
Is the sync parameter already set for the SD card in the default xbian installation? This could be an method to prevent such corruption.
@
johnchristopher
You could try to add this sync parameter to your /etc/fstab for the SD card so that all data is immediately written to the disk. It should look something like this:
Terminal
/dev/mmcblk0p2 / ext4 defaults,noatime,nodiratime,sync 0 1
I also use a Class10 SD card and I'm running the Pi with overclocking since several weeks without any data corruption. So if the sync parameter doesn't help and you perhaps see a nice deal perhaps give a Class 10 card a try.
I think I figured the problem(s) out:
- PSU wasn't delivering enough power (cheap dual usb charger 5v-1.0A) ;
- unplugging the pi too many times without properly shutting it down.
Somehow I managed to fix the "freeze after shutting down" problem by ssh'ing into the pi and shutting down manually a few times. Now the shutdown button seems to always work.
I tried another USB charger that I found in my stash. 5V-1.5A. The LEDs are much brighter now
Haven't noticed any corruption since then. I will have to wait a few days to confirm it now works.
@
Koenkk:
Will try that if corruption still occurs in few days.
@
namtih:
Nice trick there. I didn't know anything about ext4 syncing. At some point I thought of disabling journaling. Will try that if corruption happens again in a few days.
Thank you all!
@Namith, we already sync twice automatically at shutdown/reboot
Installed Xbian on 3 different SD cards even on the same SD card where Raspbmc was working fine. But this one shows-
Code:
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
after turning off and back on.
Error:
Any Solution?
@
omiazad
1) What is your setup? As requested in "read before you post".
2) How are you installing? Xbian installer, win32diskimager or DD
3) Are you reformatting the SD card before installing?
Also if you access to another machine can you pastebin the cmdline.txt and config.txt
(18th Dec, 2013 03:42 AM)IriDium Wrote: [ -> ]@omiazad
1) What is your setup? As requested in "read before you post".
2) How are you installing? Xbian installer, win32diskimager or DD
3) Are you reformatting the SD card before installing?
Also if you access to another machine can you pastebin the cmdline.txt and config.txt
I have installed XBian 1.0 Beta 2 with OS X installer. The installer downloaded the image itself. And I did nothing with the SD cards before installation. Everything was done by the installer application.
Just now I used win32diskimager and found the application partitioned the disk itself as needed. But result is same. Attached the files you have asked for. They were from OS X installer.
I've used XBian once before. Did not have this sort of problem. This time I boot, mount the NFS, update all the add-ons and reboot, everything gone. I did not change anything like overclocking.
If you'd posted the information in "please read before you post" I wouldn't have to keep asking questions
1) What model RPi are you using?
2) What is your power supply amperage?
Something is amiss.
gpu_mem_512=128 should read gpu_mem_512=256
Your cmdline.txt file looks corrupted.
It should read something like this:
Code:
sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcbl
k0p2 rootflags=subvol=root/@,autodefrag,compress=lzo rootfstype=btrfs rootwait s
msc95xx.turbo_mode=Y elevator=cfq logo.nologo quiet noswap loglevel=0 mod_scsi.s
can=sync partswap startevent=mountall splash nohdparm --startup-event mountall
If you have access to a windoze machine can you try the installer there. If not, check cmdline.txt and if it is garbage, change it to the code above, also change config.txt to 256 and report back.
If that works, then it's a problem with the Mac OSX installer.
(18th Dec, 2013 05:03 AM)IriDium Wrote: [ -> ]If you'd posted the information in "please read before you post" I wouldn't have to keep asking questions
1) What model RPi are you using?
2) What is your power supply amperage?
Something is amiss.
gpu_mem_512=128 should read gpu_mem_512=256
Your cmdline.txt file looks corrupted.
It should read something like this:
Code:
sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcbl
k0p2 rootflags=subvol=root/@,autodefrag,compress=lzo rootfstype=btrfs rootwait s
msc95xx.turbo_mode=Y elevator=cfq logo.nologo quiet noswap loglevel=0 mod_scsi.s
can=sync partswap startevent=mountall splash nohdparm --startup-event mountall
If you have access to a windoze machine can you try the installer there. If not, check cmdline.txt and if it is garbage, change it to the code above, also change config.txt to 256 and report back.
If that works, then it's a problem with the Mac OSX installer.
I'm using the Model B and powering directly from my TV's 1amp USB port.
I don't buy that the problem is from Mac's installer. I've been using the same thing for a very long time. Never had such problem. If the installed had this problem, then why it booted at the very first place? I think some update is eating this up. I've changed the cmdline file according to your code above. Didn't help. Also installed with win32diskimager, same problem.
Please accept my apologies as I'm not very good with understanding all these.
@
omiazad
the screenshot really looks like corrupted (missing) cmdline.txt in /boot
just a note, the code IriDium sent you should be in one line, all the text