How to rescue a Raspbian SD card without free disk space due to large log files?
本帖最後由 角色 於 2019-1-28 21:25 編輯
When I used tcpdump to carry out V2Ray experiments without too much attention, the file size of the system became full. When I rebooted the system, it stopped after a while. Is there any way to remote the large log files (I guessed)?
After having searched on the Internet, I found that I have to install the same Linux Raspbian as I have one on hand on another new SD card.
I downloaded a lite version of Raspbian of size 3xxMB. I was able to install on a new SD card and made it run on my Rasberry Pi 3b box. I put it on a USB reader and plugged into the USB slot before powering up the Raspberry Pi.
After powering up, I got three files /dev/sda, /dev/sda1 and /dev/sda2
/dev/sda1 is vfat filesystem
/dev/sda2 is ext4 filesystem
using the command mount -t ext4 /dev/sda2 /media/usb (where usb has to be created before the mount command)
went to /var/log and checked the file size
removed the large files such as /var/log/daemon.log and other large-sized logs.
After the above steps, I was able to rescue the Raspbian SD card. |