There may be easier ways to do this, but I here is what I would do.
On a spare SD card install the full Raspbian OS.
Boot your Pi with the new OS.
Place your old SD card (the one with the problems) into an SD reader and then plug the reader into your Raspberry pi.
You will probably see an "Error Operation was cancelled" dialog box pop up. Just click OK to dismiss this window.
Open a terminal window and type
You should then see something similar to:
Code: Select all
pi@RPi3BP:~ $ df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 15G 3.9G 11G 28% /
devtmpfs devtmpfs 434M 0 434M 0% /dev
tmpfs tmpfs 438M 0 438M 0% /dev/shm
tmpfs tmpfs 438M 17M 421M 4% /run
tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs tmpfs 438M 0 438M 0% /sys/fs/cgroup
/dev/sda1 vfat 44M 23M 22M 52% /boot
tmpfs tmpfs 88M 0 88M 0% /run/user/1000
/dev/sda1 is the boot partition of your old sd card and /dev/sda2 is what we are interested in.
You will need to mount sda2. To do this, in a terminal window type:
Now cd to /media and do an ls. You should see something like this:
Code: Select all
pi@RPi3BP:~ $ cd /media
pi@RPi3BP:/media $ ls
bin debootstrap etc lib media opt root sbin sys usr
boot dev home lost+found mnt proc run srv tmp var
Now cd to home.
Your files should be there and you should be able to copy and/or edit your original files.
You can try removing xx.py and removing the autostart line.
You can then try your old sd card again. If it works, you are on your way. If not, you should still have access to your original files that you copied on to the new sd card.