Cannot use pkg install on new plugin jail FreeNAS 9.2.1

Status
Not open for further replies.

Pouper

Dabbler
Joined
Jan 15, 2014
Messages
43
I've created a new plugin jail on 9.2.1. When I try the following command, this is the only response I get:

Code:
root@downloaders:/ # pkg install nano
Updating repository catalogue
root@downloaders:/ #


Nothing happens after this. The pkg does not install. I'm not sure what I'm doing wrong.

Any advice?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
The command should be "pkg_add -r nano".
Give it a shot.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Interesting as I have never run into that problem. Thanks for pointing that out to me.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Hmm, the jail pkg config seems to be broken.
Try this in the jail:
Create file /usr/local/etc/pkg/repos/FreeBSD.conf with this content:
Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526

Pouper

Dabbler
Joined
Jan 15, 2014
Messages
43
Thanks Dusan. I will try this in a minute. Problem is now I cannot even create a jail. FreeNAS crashes whenever it tries to create one.
 

Pouper

Dabbler
Joined
Jan 15, 2014
Messages
43
I've used pkg install without a problem.. just look at my guide for Minecraft(http://forums.freenas.org/threads/how-to-install-minecraft-server-in-a-jail.18246/#post-100016). I did that just last week with 9.2.0. Not upgrading to 9.2.1 at the present time and currently don't even have it on the table.


I used it with no issues on 9.2.0. I upgraded to 9.2.1 and all hell has broke loose on new jails.

pkg install works on 9.2.0
pkg install does not work on 9.2.1

Creating a new jail also crashes FreeNAS.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
I've used pkg install without a problem.. just look at my guide for Minecraft(http://forums.freenas.org/threads/how-to-install-minecraft-server-in-a-jail.18246/#post-100016). I did that just last week with 9.2.0. Not upgrading to 9.2.1 at the present time and currently don't even have it on the table.
Of course it works in 9.2.0, this problem is 9.2.1 specific. Possibly a regression caused by: https://bugs.freenas.org/issues/4092, see https://bugs.freenas.org/issues/4157
pkg install works on 9.2.0
pkg install does not work on 9.2.1
This I can confirm.
Creating a new jail also crashes FreeNAS.
This works for me. I can create jails on a fresh 9.2.1 install.
 

Pouper

Dabbler
Joined
Jan 15, 2014
Messages
43
Thanks Dusan. I'm working on the upgrade from 9.2.0. I figured it would work on a fresh install of 9.2.1. I'm going to try a fresh install of 9.2.1 and then see if I can get your fix to work.
 

Pouper

Dabbler
Joined
Jan 15, 2014
Messages
43
Hmm, the jail pkg config seems to be broken.
Try this in the jail:
Create file /usr/local/etc/pkg/repos/FreeBSD.conf with this content:
Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}


Dusan, could you kindly explain how to create this file within a new jail? I only know how to do this with nano (fairly new) and I obviously cannot install nano.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Use vi:
  1. mkdir -p /usr/local/etc/pkg/repos
  2. vi /usr/local/etc/pkg/repos/FreeBSD.conf
  3. press i (this enters the input mode)
  4. paste the content of the file
  5. press Esc (exits the input mode)
  6. type :wq and press Enter (this saves the file and quits vi, do not forget to type the colon)
I just realized you can also edit/create the file from the host. Use the FreeNAS nano to create/edit the file in <jail_root>/usr/local/etc/pkg/repos, where <jail_root> is the directory/dataset that contains all your jails.
 

Pouper

Dabbler
Joined
Jan 15, 2014
Messages
43
Use vi:
  1. mkdir -p /usr/local/etc/pkg/repos
  2. vi /usr/local/etc/pkg/repos/FreeBSD.conf
  3. press i (this enters the input mode)
  4. paste the content of the file
  5. press Esc (exits the input mode)
  6. type :wq and press Enter (this saves the file and quits vi, do not forget to type the colon)
I just realized you can also edit/create the file from the host. Use the FreeNAS nano to create/edit the file in <jail_root>/usr/local/etc/pkg/repos, where <jail_root> is the directory/dataset that contains all your jails.

Perfect. Thank you for the help! Hopefully this can be fixed in the next revision of FreeNAS.
 

Mace

Cadet
Joined
Feb 10, 2014
Messages
7
Just throwing this out there... When I attempted to make a new jail and use pkg the above did not work. The solution:

make the url http:// only (not pkg+http)
after this pkg update
upgrade pkg
edit the FreeBSD.conf file again and re-add the pkg+http part

After I did this it all seemed to work for me. Hopefully it is fixed later.
 
  • Like
Reactions: TVo

Mace

Cadet
Joined
Feb 10, 2014
Messages
7
It works fine for me when you follow the instructions above about making a FreeBSD.Conf ... After a fresh jail install make the file stated earlier, use http:// instead of pkg+http:// .... update pkg.... then change it to pkg+http afterwards.
 

MarchHare

Dabbler
Joined
Oct 14, 2013
Messages
12
I seemed to have a broken networking because I could ping google sometimes and then it would stop working.

I deleted and recreated the jail using a portsjail not a pluginjail then followed Dusan's comments to create the repo file. That worked.
 

TVo

Cadet
Joined
Dec 7, 2012
Messages
4
Just throwing this out there... When I attempted to make a new jail and use pkg the above did not work. The solution:

make the url http:// only (not pkg+http)
after this pkg update
upgrade pkg
edit the FreeBSD.conf file again and re-add the pkg+http part

After I did this it all seemed to work for me. Hopefully it is fixed later.

That totally fixed it for me! Thanks so much for the info.
 
Status
Not open for further replies.
Top