1

When turning on my Raspberry Pi, the boot fails after an error. It says: -bash: /usr/local/virtualenvwrapper.sh: No such file or directory

This happened after I changed the /etc/init.d/dphys-swapfile. I replaced CONF_SWAPSIZE=100 with CONF_SWAPSIZE=1024. I must have messed up somewhere along the line.

I tried fixing this by putting the SD card into a reader and editing it with a Windows computer, but it required a format. When I turn on the Pi I still have access to the terminal. Is there away I can fix the problem with this? When I try to open /etc/init.d/dphys-swapfile, it says there is no such directory. Is there anything I can do to fix this?

  • If you've formatted the SDCard using Windows you will have destroyed your Raspbian system. Get a new SDCard, a copy of Raspbian and a USB reader. Boot the new SDcard. Mount the broken card in the USB reader and use Raspbian to fix it. – Dougie Dec 19 '18 at 0:26
1

I guess you are using Raspbian. This operating system is installed on two partitions on the SD Card. partition 1 is the boot partition with the kernel to load and other files to start the RasPi and is formated with the fat filesystem. partition 2 is the root partition and contains the operating system Raspbian and is formated with the filesystem ext4. If you put the card into a card reader connected to a MS Windows PC then you can only access partition 1 with fat. MS Windows does not know ext4 and cannot read it. Instead it suggests to format this unknown partition. If you klick "Yes" then the partition will be formated. The partition is cleaned up with a new filesystem: nothing on it anymore and a wrong filesystem. You have to flash your SD Card again from the image and start over again.

If you do not format the second partition then you have to use an operating system that can access the ext4 filesystem. Any linux like OS can do this. So just boot the MS Win PC with a Debian or Ubuntu or any other linux Live CD and repair the setup on the second partition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.