|
FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
|
Thread Tools | Display Modes |
|
|||
Got my ports tree deleted after attempting ports update
Hello,
The following happened on my FreeBSD 9.1 virtual machine which had the full ports tree in place under /usr/ports: Code:
[root@virtbsd91 ~]# portsnap fetch && portsnap update && portmaster -ad Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found. Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done. Fetching snapshot metadata... done. Updating from Mon May 12 14:22:54 CEST 2014 to Fri May 16 01:08:12 CEST 2014. Fetching 4 metadata patches... done. Applying metadata patches... done. Fetching 0 metadata files... done. Fetching 402 patches.....10....20....30....40....50....60....70....80....90....100....110....120....130....140....150....160....170....180....190....200....210....220....230....240....250....260....270....280....290....300....310....320....330....340....350....360....370....380....390....400. done. Applying patches... done. Fetching 18 new ports or files... done. Removing old files and directories... done. Extracting new files: comm: /usr/ports/.portsnap.INDEX: No such file or directory /usr/sbin/portsnap: cannot create /usr/ports/.portsnap.INDEX: No such file or directory Building new INDEX files... /usr/sbin/portsnap: cannot create /usr/ports/INDEX-7: No such file or directory [root@virtbsd91 ~]# [root@virtbsd91 ~]# [root@virtbsd91 ~]# portsnap fetch && portsnap update && portmaster -ad Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found. Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done. Ports tree hasn't changed since last snapshot. No updates needed. /usr/ports was not created by portsnap. You must run 'portsnap extract' before running 'portsnap update'. [root@virtbsd91 ~]# ls /usr/ bin/ games/ home/ include/ lib/ lib32/ libdata/ libexec/ local/ obj/ sbin/ share/ src/ [root@virtbsd91 ~]# ls /usr/ports/ ls: /usr/ports/: No such file or directory [root@virtbsd91 ~]# uname -a Code:
FreeBSD virtbsd91 9.1-RELEASE-p11 FreeBSD 9.1-RELEASE-p11 #0: Tue Apr 8 20:54:56 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 Code:
[root@virtbsd91 ~]# history |grep rm |grep port |grep -v grep [root@virtbsd91 ~]# Anyone experienced similar situation? If yes, please reply. I'm trying to understand what went wrong there. Regards. |
|
|||
I think the solution can be found in these error messages that you got:
Code:
No updates needed. /usr/ports was not created by portsnap. You must run 'portsnap extract' before running 'portsnap update'. # df -h ?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Hello,
Thanks for the reply first of all. All ended up well in the end. Indeed "mkdir /usr/ports && cd /usr/ports && portsnap extract" fixed the issue. Disk space is not a problem, this is the status after(!) extracting ports tree: Code:
[root@virtbsd91 ~]# df -m Filesystem 1M-blocks Used Avail Capacity Mounted on /dev/ada0p2 9905 5740 3372 63% / devfs 0 0 0 100% /dev I think the main problem (root cause) was a / filesystem corruption I had 1 week ago, that prevented me to boot. I fixed it with fsck /dev/ada0p2 but without using journal. After fsck fix, system booted up, but it seems some index files required by portsnap were deleted. With regards to the error messages that I've posted in the first post of this thread, this is the relevant section which seems to be the stopper for extracting the ports tree: Code:
Extracting new files: comm: /usr/ports/.portsnap.INDEX: No such file or directory /usr/sbin/portsnap: cannot create /usr/ports/.portsnap.INDEX: No such file or directory And yes, again with regards to the errors, and as a final proof that a missing file was the issue, this is the current status: Code:
[root@virtbsd91 ~]# ls -al /usr/ports/.portsnap.INDEX -rw-r--r-- 1 root wheel 2107349 May 18 13:29 /usr/ports/.portsnap.INDEX Last edited by bsdnotbdsm; 18th May 2014 at 06:07 PM. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenBSD ports tree now locked | ocicat | News | 0 | 21st January 2011 03:30 PM |
OpenBSD 4.8 ports tree locked! | ocicat | News | 0 | 2nd August 2010 07:31 PM |
Is my ports tree corrupt or sth? | TerryP | FreeBSD Ports and Packages | 1 | 29th June 2010 09:51 PM |
return of the -stable ports tree | ocicat | OpenBSD Packages and Ports | 3 | 24th October 2009 04:11 AM |
STABLE ports tree has returned.. | BSDfan666 | OpenBSD Packages and Ports | 2 | 26th July 2009 07:36 PM |