Results 1 to 1 of 1

Thread: Filesystem corruption on RPi 3 B+ when filling expanded SD card

  1. #1
    Join Date

    Unhappy Filesystem corruption on RPi 3 B+ when filling expanded SD card

    I have an RPi 3 B+ that I have been trying for weeks to get a full install of Kali on. The install always goes fine, I get the system up and running, I expand the storage to fill the SD card, but as soon as I start to fill the SD card, I get rampant file corruption and bork the entire system.

    All of this was performed on a Raspberry Pi 3 B+ using on of two SD cards:

    General Process:
    1. I always start by imaging the SD card from my Mac with
    sudo dd if=/path/to/img of=/dev/rdisk2 bs=2m
    2. Then I boot up the pi, wait a few minutes (for any initial disk writes to finish), then reboot.
    3. On the second boot, I expand the storage, then reboot again.
    4. Finally I do something that uses up significant disk space, which eventually kills the system.

    Images Used:
    These are the different Kali images I have attempted these procedures with, in case it was just an issue with just one or a few versions.

    • kali-linux-light-2018-W16-armhf
    • kali-linux-2018.1a-rpi3b+-re4son
    • StickyFingers-Kali-Pi-armhf-180405
    • kali-linux-2018.1a-rpi3-re4son (didn't boot because the kernel wasn't updated for the 3 B+)
    • kali-linux-2018.2-rpi3-nexmon

    Each of these images (which booted) experienced the same issue.

    Expanding Storage:
    I have tried several different methods of expanding storage, in case the one I was using was wrong or had an issue. All of these were performed live on the pi.

    1. parted

    • I tried using parted to delete and recreate (bigger) the primary partition in place.
    • The general procedure can be found here

    2. raspi-config

    • I tried cloning raspi-config from here
    • I ran through the gui to expand the root filesystem and rebooted

    3. gparted

    • I found this answer saying to try gparted
    • I followed the method laid out in that post

    All of these methods resulted in the same corruption.

    Using the Disk:
    For each of these methods, the corruption occurred after a significant portion of the disk was used. Because it killed the system, it is difficult to tell exactly when it starts happening, but one attempt after the corruption I was able to run a `df -h` and see it had used about 10 GB (notably, more than the 8 GB in the original partition). On most attempts, I used this much space through `apt-get install kali-linux-full`, leading me to believe that the issue was related to the installation of that meta-package. However, on my most recent attempts, I refrained from doing that particular install and instead used the space by downloading a large wordlist, to the same end result.

    The Corruption:
    The corruption occurred at different points each time, but all with similar results. Sometimes the install broke partway through, and others it finished seemingly successfully. The wordlist (here) would never finish fully expanding. In any case, the symptoms remained the same:

    • Whatever commands I was using at the time started spitting out some strange characters in the output
    • Commands for installed tools were about 50-50 whether they would run
    • Built in commands like `ls ` and `shutdown` would start to say either `illegal instruction` or throw a `segmentation fault`
    • Unable to shut down the pi, I’d eventually pull the power (making sure the SD Card access light was off). Then the pi would not reboot

    The Conclusion:
    I’m completely out of ideas for what could be causing the issue or how to proceed from here. I very much want a full Kali install which is small and portable, and limiting it to 8 GB is not an option. Any suggestions would be much appreciated.
    Last edited by garrett; 2018-05-10 at 16:47. Reason: Formatting

Similar Threads

  1. !Possible Download Link Corruption!
    By Captain Redbeard in forum Installing Archive
    Replies: 1
    Last Post: 2017-04-26, 03:59
  2. Root partition filling up
    By silicate in forum TroubleShooting Archive
    Replies: 4
    Last Post: 2015-12-30, 21:10
  3. Replies: 1
    Last Post: 2015-08-12, 11:08

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts