Hi,
Dennisonline wrote:I had read already
viewtopic.php?f=230&t=44504 but I can't found if functions like the copy button still working? Or must I flash the QNAP and is the QNAP webinterface (change/add users) also gone. Can I see it as a fresh install of Debian?
Or do I have to install
Webmin discribed
Webmin_Installation_On_Debian_QNAPDennis
The
major avantage of a chroot (the one install by the QPKG)
is that YOU DON'T stop, modify, change ANY things inside the QNAP original firmware ...
So : copy button is active
administration is active ...
all stay the same and run without any change ...
A chroot (I don't know if you know the concept) is a folder with a different version of the Linux structur ... , before you enter in the chroot (jail) using the chroot command ... it's only a folder with data unknow by Qnap Linux application ...
when you enter the chroot command "chroot folder_where_new_linux_is" :
... you have a new " / " folder BUT with the same kernel ... so now, all is relative to the folder use in chroot command ...
for ex. /etc is not the /etc of the Qnap but is now the one relative to the folder use in chroot command.
IT'S A JAIL ... this method can be use in different usages :
... for ex. in openssh to hide the "real system" for user connected
... for ex. to test new librairie or version without changing the lib of the real system
... for running specific application (
use in the past (TS-x09 series)
by Qnap to run Ipkg server) and some integrated server but requiring different librairies ...
To be able to run
the chroot use :
the installed kernel (and if kernel module are required ...) this module must be compiled for the kernel ... not and nor for the chroot env.
some system mount ...
... so a special mount option exist ( bind ) to be able to mount some device or folder to another mount point (it's a pointer ... so contents are the same ... ( only in some very specific case access right can be change))
the minimum are for the chroot to mount
/dev /dev/pts and /proc with this you can run program in the chroot ...
In my QPKG I add the possibilty to mount some others folder to share data between the chroot and the real qnap system
/share/Web for ex.
The very important point is to understand that IF YOU RUN a server INSIDE the chroot ... the server ONLY know the chroot env. even if you see it as a "normal" executable program in the Qnap ...
it's the bigest source of misunderstanding ... if your server call another program for ex. /bin/xxxx ; the xxxx is search in the /bin of the chroot
NOT in the /bin of the system ...
SO BEFORE YOU START SOMETHINGS INSIDE THE CHROOT ... nothing run in the Qnap and absolutly NO CHANGE to ALL Qnap services ...for testing apache2 and new Php in chroot you need (if you want to keep the same TCPIP port)
stop apache in the Qnap env.
stop the Qthhtpd started by Qnap when you stop apache in the Qnap env.
suppress a cron job that restart Qthhtpd each night.
THEN
enter in the chroot :
chroot folder_of_the_chroot (done by dsh command provide with QPKG)
and
INSIDE the chroot configure and run the new apache2 and php server ...
for an external point of vue ... the apache2 seems to run as a "normal" Qnap services ...
BUT REMEMBER ALL others Qnap services still available ...
Webadmin,
filemanager,
download station ... etc.
ONLY appalication using the QNAP apache can be impacted ...
MSV2 and
plugmedia stop running because they call cgi-bin in the non chroot env.. (impossible when you are in the Jail (chroot) )
some applications required a small change (for ex.
Gallery want to know the Path to imagemagick ... and it's NOT the same in Qnap Linux and in Debian Linux ...
Lot of others can be run as is in the new server ...
Webmin is absolutly not required to manage the system (use the
Webadmin ... as usual), but it's true that you can use it in the chroot for some specific (not Qnap related) usage ... like managing Apache ...
Sorry to be soo long ... BUT CONCEPT are the first step to start with chroot .
Philippe.