Power out mid-installation form ports directory; what next? reddit / freebsd ---------------------------------------------------------------------- AdbekunkusMX · 2021-06-08 23:10 Hi, all. While installing Xorg from the ports directory the laptop battery died; it did because I hadn't noticed that the charger had a bad contact problem within the cable. My question is: can I continue the installation or should I try to clear the "debris"? I ask because I've been reading about clearing the ports directory, so perhaps it applies in this case. Thanks! ---------------------------------------------------------------------- meatmechdriver · 2021-06-08 23:14 you should be able to just pick up where you left off. if a particular port fails, you may need to “make clean” for it. ---------------------------------------------------------------------- FUZxxl · 2021-06-08 23:25 You should be able to just type `make install` again and finish the installation. ---------------------------------------------------------------------- AdbekunkusMX · 2021-06-08 23:29 Thank you both! ---------------------------------------------------------------------- grahamperrin · 2021-06-09 00:29 > should I try to clear the "debris"? When you installed FreeBSD: did you choose UFS, or ZFS? ---------------------------------------------------------------------- AdbekunkusMX · 2021-06-09 00:45 ZFS, stripe no redundancy. ---------------------------------------------------------------------- reviewmynotes · 2021-06-09 00:47 You should be able to pick up where you left off with a "make install". If you really feel safer starting over, try "make clean" to get rid of any left-overs and then "make install" again. In either case, any dependencies that completed their installation won't need to compile and install again, so it should be shorter this time. ---------------------------------------------------------------------- grahamperrin · 2021-06-09 00:51 > ZFS OK, that's good. With UFS there's a risk of inconsistencies, inconsistencies that might be not resolved (not detected) through use of a `make` command. I never found this type of inconsistency with ZFS. ---------------------------------------------------------------------- jamfour · 2021-06-09 02:17 Just because there are no inconsistencies in the file system itself does not mean there are no semantic inconsistencies in the set of files. Sure, it helps, but it’s not magic. ---------------------------------------------------------------------- edthesmokebeard · 2021-06-09 04:04 THIS. All ZFS does is make sure your filesystem is solid. If you have something half-configured, you're boned. People don't focus on this part enough. ---------------------------------------------------------------------- grahamperrin · 2021-06-09 05:49 I know, ZFS is a storage system, not magic. I never found semantic inconsistencies in sets of files with ZFS. This is not to say that it can't happen. ---------------------------------------------------------------------- abmrk1010 · 2021-06-09 09:14 🍥 ---------------------------------------------------------------------- abmrk1010 · 2021-06-09 09:14 😈 ---------------------------------------------------------------------- Catsssssssss · 2021-06-09 09:50 Try 'make clean' first, then try again. ---------------------------------------------------------------------- AdbekunkusMX · 2021-06-09 12:17 I did that before starting. It is still runninh after almost 11 hours. 😓 ---------------------------------------------------------------------- Catsssssssss · 2021-06-09 14:22 Any reason why you build from ports rather than pkg add? ---------------------------------------------------------------------- AdbekunkusMX · 2021-06-09 14:30 No, just seemed like a good idea; I figured it would be quicker, but now I'm not sure. ---------------------------------------------------------------------- grahamperrin · 2021-06-09 16:42 Probably never quicker. Installation from ports involves packaging. ---------------------------------------------------------------------- [deleted] · 2021-06-09 17:00 [deleted] ---------------------------------------------------------------------- Catsssssssss · 2021-06-09 19:21 Compiling from source is slower by orders of magnitude and offers no particular benefit unless you are doing something of custom nature. My friendly advice is to go with pkg ---------------------------------------------------------------------- AdbekunkusMX · 2021-06-09 20:29 Yeah! I noticed something really strange. First, it took a long time (I made [a post about it](https://www.reddit.com/r/freebsd/comments/nv o5mo/making_xorg_from_ports_running_for_4_hours/h14e5yz/?context=3)); finally it failed (I'll give a full report on the other post), but I noticed that it was trying to compile *every port!* I noticed because the process started calling ports from the directory, dowloading the packages, extracting, etc. I followed [these instructions](https://freebsdfoundation.org/freebsd- project/resources/installing-a-desktop-environment-on-freebsd/) but perhaps I'm missing something, or did something wrong, because as I said: the `make install clean` instruction tried to compile everything in the `/usr/ports` directory, and finally failed. ---------------------------------------------------------------------- Catsssssssss · 2021-06-09 20:39 It shouldn't start compiling everything unless you ran make from /usr/ports.. X11 has an insane number of dependencies, however, so it might very well have felt like it was trying to compile everything. In any event, maybe you should delete your entire /usr/ports and download a fresh copy from ftp.freebsd.org or some such if you still feel like trying ---------------------------------------------------------------------- AdbekunkusMX · 2021-06-09 21:26 Can I delete the ports directory just like that? I've read elsewhere that it is needed whenever I install something. I don't think reinstalling will be what I do; rather I am still waiting for `make clean` to finish and then I'll install using `pkg`. ---------------------------------------------------------------------- Catsssssssss · 2021-06-09 22:07 Yes. You can safely delete it. Unless you plan to compile from source, it's of no use to you. If you need it again for any reason, just 'portsnap fetch' or download manually from ftp.freebsd.org ---------------------------------------------------------------------- grahamperrin · 2021-06-09 23:52 > … waiting for `make clean` to finish and then I'll install using `pkg`. You need not wait for `make clean` to finish before using `pkg`. `make clean` should be a fast operation. Did you mean `make install clean`? ---------------------------------------------------------------------- jamfour · 2021-06-10 11:56 I’d say you’re either 1) lucky 2) not looking or 3) don’t know what a semantic inconsistency is. Ever stop a program half-way through it writing some set of data? Or have it crash? Semantic inconsistency. Everything that was instructed to be written to disk was, so the filesystem is correct, but *what* was instructed didn’t wholly make sense. This is the sort of scenario the OP describes: running `make`, it dies partway through, now the filesystem is in a semantically inconsistent state. Fortunately, `make` is half-decent at recovering from this state (as is `pkg` with `pkg check`), but not all software is. ---------------------------------------------------------------------- grahamperrin · 2021-06-10 16:58 Thanks for the explanation. Maybe (3). > … Ever stop a program half-way through it writing some set of data? … Yes. Also, recently I tested the effects of computer resets, on file systems, whilst installing devel/gdb. Most often resetting during extraction of the twelfth package (gdb). Less often: immediately after completion of the pkg command.