I screwed up my FreeBSD system, so I'm going to fix it from a FreeBSD live CD.

First, I boot into the live CD, mount the partition where the broken system resides in with mount -t ufs /dev/ada0p5 /mnt, and used ls /mnt to verify everything went as expected.

Then I cd /mnt/usr/src, and make clean, but it told me sh: cc: not found.

Other compilers, such as gcc and clang, aren't available in live CD too. I tried to install them with pkg, but pkg isn't available either.

Please help me out.

  • Need more info, but this is my suggestion. Backup everything you need. Reinstall FreeBSD, restore from backup. – Tigger Jun 5 '17 at 5:54
  • @Tigger That sounds bad...but thanks! – nalzok Jun 5 '17 at 13:39
  • 3
    It may sound like a daunting task, but honestly it is a lot quicker than you think. If you have partitioned the drive to system and userland it is only the system that needs to be reinstall (but backup everything just in case). If you have physical access to your system, use another drive to backup (internal or external). If it is a remote box (does not sound like it) backup to a remote site or pull the backup down. Couple of hours at a best guess. – Tigger Jun 5 '17 at 23:07
  • Cc and such aren't in your path, as they're all at /mnt/ instead of their usual locations. – Jeff Schaller Jun 6 '17 at 21:59

Your Answer

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

Browse other questions tagged or ask your own question.