Raspberry Pi becomes a read-only file system

Source: Internet
Author: User

Today when I tried to connect the Raspberry Pi with SSH, I found that the Raspberry Pi did not open the SSH service.

I don't have a monitor, I don't have an external keyboard.

So, I pulled the Raspberry Pi hard drive (memory card) and plugged it into the computer, and I added it in the/etc/rc.local exit 0.

/etc/init.0/ssh start

Then the memory card plugs back into the Raspberry Pi, restarts the Raspberry Pi, ssh can connect the

But the Raspberry Pi has become a read-only file system.

Baidu a bit, according to the method of Baidu, and no eggs with

The following is the method of Baidu, for future reference

a1, Mount: Used to see which module input is read-only, typically shown as:/DEV/HDA1 on/type ext3 (rw) None on/proc type proc (rw) Usbdevfs on/proc/bus/USB Type USBDEVFS (rw) None on/dev/pts type devpts (rw,gid=5, mode=620)/dev/hda5 on/Home type ext3 (rw) None on/dev/SHM type TMPFS (rw)/dev/hda2 on/usr/Local type ext3 (rw)/DEV/NB1 on/earthview/RAW type ext3 (RO) (changed to read-only)2, if you find Ro, re-mount, or Umount later remount3, umount/dev/NB1 If you find a prompt "device isbusy ", to find out what process made him busy fuser-m/mnt/data will show the PID fuser using this module-mk/mnt/data will kill the PID directly and then mount it again. 4, there is also a way to direct remount, the command for Mount-O rw,remount/mnt/data two specific in-depth approach, the situation can be selected by oneself: Server/var/log/messages Error: End_request:i/O error, dev SDA, Sector122194293Buffer I/O error on device sda1, logical block446493Lost page write due to i/O error on sda1 below is the whole process of processing [[email protected]~]# fdisk-Lu #第一步: Find the partition where the local slice is located. Disk/DEV/SDA:73.4GB,73407868928bytes255Heads theSectors/track,8924Cylinders, Total143374744sectorsunits= Sectors of1* += +bytesdevice Boot Start End Blocks Id System/DEV/SDA1 * the 4096574 2048256  theLinux/dev/sda24096575 75778604 35841015  theLinux/dev/sda375778605 129034079 26627737+ theLinux/dev/sda4129034080 143364059 7164990 5Extended/dev/sda5129034143 139267484 5116671  theLinux/dev/sda6139267548 143364059 2048256  theLinux Swap[[email protected]~]# tune2fs-l/dev/sda3 |grep"Block Size"#找到block大小. Block Size:4096(122194293-75778605)* +/4096=528691Calculate logical block address B with a formula= (int) ((l-s) * +/B) [[Email protected]~]# Debugfsdebugfs1.35( --feb-2004) Debugfs:open/deb/Sda3/deb/sda3:no such file or directory whileopening Filesystemdebugfs:open/dev/Sda3debugfs:icheck582391Block Inode number582391 277584Debugfs:ncheck277584Inode Pathname277584/users/inn.net.cn/data/upload/download/Innshow004.rardebugfs:quit[[email protected]~] #ddif=/dev/zero of=/dev/sda1 bs=4096Count=1seek=582391#找到这个快的文件之后, we need to do a backup, we force it to be set to 0 bytes. [[Email protected]~]# Sync

But from his method, I suddenly remembered that I was in the memory card inserted into the computer when the memory card was removed and then pulled out, and did not directly hard to pull

I just can't figure out why, I put the memory card into the computer to mount it, uninstall it with the command

And then plug it back in to the Raspberry Pi.

The reason is not known

Raspberry Pi becomes a read-only file system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.