This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

New to jails, need to perform stripdown?

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
pompelogpilt
Starter
Starter
Posts: 21
Joined: 01 Sep 2012 13:39
Status: Offline

New to jails, need to perform stripdown?

Post by pompelogpilt »

Hi
I wanna try the serviio jail install, so i followed the initial guide for installing jails -> http://wiki.nas4free.org/doku.php?id=do ... owto:jails
Everything works fine except for the buildworld command, i keep getting errors in this after only a few minutes.
Is it important to do this part? From what i understood in the tutorial this is more to make the jail smaller? Can i just use the jail as it is without stripping it down and customizing it??

And a folder that have been created when i tryed to use the make installworld command is impossible to delete?
I´ve tryed lots of solutions found online, but nothing helps.. Its owned by root and the wheel group, but even as root i cant delete it!

Code: Select all

yggdrasil:/mnt/Pool/jail/serviio/var# ls -l
total 2
dr-xr-xr-x  2 root  wheel  2 Jan 17 23:41 empty

i cant change any permissions, everything is denied..

Code: Select all

yggdrasil:/mnt/Pool/jail/serviio/var# ls
empty
yggdrasil:/mnt/Pool/jail/serviio/var# chmod -R u+w empty
chmod: empty: Operation not permitted
All this is done as root..

Any suggestions on this will be greatly appreciated!

K

pompelogpilt
Starter
Starter
Posts: 21
Joined: 01 Sep 2012 13:39
Status: Offline

Re: New to jails, need to perform stripdown?

Post by pompelogpilt »

found a solution for the undeletable folders,

Code: Select all

chflags -R noschg "DIRECTORY_NAME"
rm -rf "DIRECTORY_NAME"
Of course i had to use freebsd code, not unix code...

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: New to jails, need to perform stripdown?

Post by raulfg3 »

pompelogpilt wrote:Everything works fine except for the buildworld command
not needed to install buildworld, in fact you need to stop once jail proto is working and you can do a jls and a reboot and your jail work as expected.

PD: I suggest when you have this first working jail that create a second one named serviio.

once you are in shell:

ls -l to be sure you ar in /jail.

Code: Select all

mkdir serviio
tar xvf /jail/work/base.txz -C /jail/serviio/
tar xvf /jail/work/lib32.txz -C /jail/serviio/
cp /etc/resolv.conf /jail/serviio/etc/
cp /jail/serviio/usr/share/zoneinfo/Europe/Madrid /jail/serviio/etc/localtime  # Replace Madrid by your local time zone
touch /jail/conf/fstab.serviio   # edit file using ee editor to desired value

done, you only need to edit /jailconf/rc.conf.local I use Nas4Free embeded file editor for comodity and add needed files eg:
### EXAMPLE - MODIFY TO FIT YOUR NEEDS ###
jail_enable="YES" # enable jails YES|NO
jail_list="proto serviio" # name of the jails to start "proto http://www...
jail_proto_rootdir="/jail/proto" # path to our jail
jail_proto_hostname="proto.domain.local" # hostname
jail_proto_ip="192.168.1.201" # ip of the jail
jail_proto_interface="em0" # Network Interface to use, replace on your NAS interface name
jail_proto_devfs_enable="YES" # use devfs
jail_proto_mount_enable="YES" # mount YES|NO
jail_proto_fstab="/jail/conf/fstab.proto" # File with Filesystems to mount### EXAMPLE - MODIFY TO FIT YOUR NEEDS ###
#
jail_serviio_rootdir="/jail/serviio" # path to our jail
jail_serviio_hostname="serviio" # hostname
jail_serviio_ip="192.168.1.202" # ip of the jail
jail_serviio_interface="em0" # Network Interface to use, replace on your NAS interface name
jail_serviio_devfs_enable="YES" # use devfs
jail_serviio_mount_enable="YES" # mount YES|NO
jail_serviio_fstab="/jail/conf/fstab.serviio" # File with Filesystems to mount
once saved you can test that new jail start:

Code: Select all

/etc/rc.d/jail start serviio
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: New to jails, need to perform stripdown?

Post by raulfg3 »

pompelogpilt wrote:found a solution for the undeletable folders,

Code: Select all

chflags -R noschg "DIRECTORY_NAME"
rm -rf "DIRECTORY_NAME"
Of course i had to use freebsd code, not unix code...

sollution in last lines of wiki jails.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

thermion
NewUser
NewUser
Posts: 13
Joined: 18 Jan 2013 11:28
Status: Offline

Re: New to jails, need to perform stripdown?

Post by thermion »

.......not needed to install buildworld, in fact you need to stop once jail proto is working ...........
PD: I suggest when you have this first working jail that create a second one named serviio.
Thanks Raul, that is helpful. I have just got to the same point, and was trying to decide best way from here.
FreeBSD 12 RootOnZFS Mirror, MB Asus Prime X470-Pro, AMD Ryzen 7 2700 (65W), 2x16GB Kingston KSM26ED8/16ME DDR4 ECC unbuffered, 2x500GB WD Blue M2 NVMe SSD, 3x2TB WD20EFRX RAIDZ1

pompelogpilt
Starter
Starter
Posts: 21
Joined: 01 Sep 2012 13:39
Status: Offline

Re: New to jails, need to perform stripdown?

Post by pompelogpilt »

thank you for your quick answers!
what is the purpose of the buildworld if it isnt needed?

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: New to jails, need to perform stripdown?

Post by raulfg3 »

pompelogpilt wrote:thank you for your quick answers!
what is the purpose of the buildworld if it isnt needed?
Is needed if you want to install a new jail that use less space in Disk (usefull for some install).

The purpouse is the same that all in the jail wiki, learn how to do things , and that you can do things in differents ways or ussing diferrents aproachs, but you need to understand what you do, to avoid problems of copy/paste without think what you do.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: New to jails, need to perform stripdown?

Post by fsbruva »

The Jail wiki wrote:Our current jail ( proto ) includes many applications from the FreeBSD base system. Many of them we don't need inside a jail.

pompelogpilt
Starter
Starter
Posts: 21
Joined: 01 Sep 2012 13:39
Status: Offline

Re: New to jails, need to perform stripdown?

Post by pompelogpilt »

Thank u for all your help! Much appreciated :-)

DrMule
NewUser
NewUser
Posts: 1
Joined: 28 Mar 2013 03:33
Status: Offline

Re: New to jails, need to perform stripdown?

Post by DrMule »

Beware typo in example /jailconf/rc.conf.local last line:

Code: Select all

jail_seriio_fstab="/jail/conf/fstab.serviio"	# File with Filesystems to mount
should read:

Code: Select all

jail_serviio_fstab="/jail/conf/fstab.serviio"	# File with Filesystems to mount
(Missing 'v')

Took me an hour this evening to discover after blindly cutting and pasting.

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: New to jails, need to perform stripdown?

Post by raulfg3 »

Thanks, corrected.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

Post Reply

Return to “Jails”