Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Banana Pi SD Card Crashed - now not booting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Sat Feb 13, 2016 4:12 pm    Post subject: Banana Pi SD Card Crashed - now not booting Reply with quote

Hi there, i have a few Problems with my Banana Pi. A vew days ago, my SD Card filesystem crashed. I used my Gentoo Desktop Computer to fix the Problem successful (fsck.ext4 and fsck.vfat). A few Days later my MySQL server stopped. I try to restart, but the whole System crashed. Now the Server doesn't boot anymore. Is it possible to activate some kind of logging? Here is my uEnv.txt:
Code:
bootargs=console=ttyS0,115200 disp.screen0_output_mode=EDID:1024x768p50 hdmi.audio=EDID:0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
aload_script=fatload mmc 0 0x43000000 script.bin;
aload_kernel=fatload mmc 0 0x48000000 uImage;bootm 0x48000000;
uenvcmd=run aload_script aload_kernel


The Monitor is still black. With another SD Card the Banana Pi is booting. But i need this SD with the files! If its working again i will copy all files to my new SD card.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Sat Feb 13, 2016 4:36 pm    Post subject: Reply with quote

Gladdle,

Get the files you need off the SD card with your PC.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Sat Feb 13, 2016 4:41 pm    Post subject: Reply with quote

Okay, but then i didn't have a bootable SD Card anymore. Or is it easyer to move all needed files to a fresh installed gentoo? Can i move "/etc/", "home" and "/var" to the new SD Card whitout problems?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Sat Feb 13, 2016 4:48 pm    Post subject: Reply with quote

Gladdle,

That all depends on what you can salvage from the SD card ... if anything.
Make an image of the card before you even consider using fsck.

fsck makes the filesystem meta data self consistent. It does this by making some guesses about whats wrong.
When its done, the iflesystem meta data is self consistent, so mount works. However, it may well have trashed your data in the process.
That is, fsck often makes a bad situation worse. You image is your 'undo' facility.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Sat Feb 13, 2016 7:43 pm    Post subject: Reply with quote

I think you should move the root file system to a real hard disk. I Have very bad experience with sd-cards ext4 and my raspberry pi:s. :evil:

Nowadays I keep important data and system on external usb-disk. And sd-cards are only read during boot process. :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Sat Feb 13, 2016 9:00 pm    Post subject: Reply with quote

Irre,

I was trying to avoid saying that yet. With Pi 1s, its a power supply issue.
Pi 2's are supposed to be better but I've not tested that yet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gladdle
Guru
Guru


Joined: 27 Jul 2008
Posts: 313
Location: Cleebronn, Germany

PostPosted: Thu Feb 18, 2016 4:50 pm    Post subject: Reply with quote

Okay, currently i am installing Gentoo on a new System (With the world file and the make.conf), and there are only 91 packages left ...

But now my next question, HOW can i make a effective backup? If i use "dd" all bits will be stored in the Backup file, also the empty space of the disk and the System have to be shut down for a while. The other option is to make a tar.gz file. Is it possible to make a backup while running the system (not realy neccessary)? Also can i make full backup (except "proc", "tmp" and "dev")? Or is there a third option i didnt know? I search for backup tools, specially for Linux Gentoo, but the only thing i found is a depreaced backup script from 2004.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Thu Feb 18, 2016 6:04 pm    Post subject: Reply with quote

Gladdle,

You want a stage4.
When you know that, google is your friend.

If you don't want to shut down for a backup, you need something that supports snapshots.
Logical Volume Manager comes to mind but there are other solutions too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Thu Feb 18, 2016 6:42 pm    Post subject: Reply with quote

Gladdle wrote:
HOW can i make a effective backup? If i use "dd" all bits will be stored in the Backup file, also the empty space of the disk and the System have to be shut down for a while.

I use nothing but dd for compressed backups. To backup /sdax:
Code:
mount /dev/sdax /mnt
dd if=/dev/zero of=/mnt/zerofile
rm /mnt/zerofile
umount /dev/sdax
dd if=/dev/sdax | gzip > yourbackup.gz

And to restore:
Code:
zcat yourbackup.gz | dd of=/dev/sdax

You can also backup a running system this way (not recommended). Filesystem will get errors on open files, but fsck will probably repair most of the filesystem.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Fri Feb 19, 2016 7:56 pm    Post subject: Reply with quote

Irre,

Irre wrote:
Filesystem will get errors on open files, but fsck will probably repair most of the filesystem.

Don't count on it.

Also, a backup is only useful if its validated.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum