Differences

This shows you the differences between the selected revision and the current version of the page.

howto:chroot_debian 2015/11/29 04:23 howto:chroot_debian 2017/09/06 17:34 current
Line 1: Line 1:
-what do u mean building a web<a href="http://omuoju.com"> sverer</a>? have you bought a<a href="http://omuoju.com"> sverer</a> (the hardware) or did you rent one? what's your OS? i highly recommend renting a vps from a provider because it's a lot cheaper than having to take care of it by yourself and you need to have a&lt;a href=&quot;http://omuoju.com"> sverer</a>s room, with 20 degree C and so one and you need to take care of it, that's not a job for a newbie, even experienced people have hard time doing what they do.with that in mind, I'll assume that you have a linux unmaneged vps or&lt;a href=&quot;http://omuoju.com"&gt; sverer&lt;/a&gt;, and I'll assume that you have the basic knowledge, and I'll assume that you want to host a php website on it, that doesn't need ffmpeg or whatever to run, just a typical website.the fist thing you need to install nano, which is an editor, if you're using centos it comes with yum , I'm not gonna give you commands because it depends on the OS that you are using, you can google the commands and you'll findyou need to install wget if not installed, it allows you to download packages from the links, you need to install a Cpanel, or a free alternative like kloxo, it will install php, apache and everything, it's pretty much all you need and update the packages in centos it's yum update i believe, and in ubunto it's either sudo update or apt-get update something like that you can google it, i haven't use my vps for a while so i forgot anyway you need to install tar if not installed, you'll use it a lot and it's allfrom there all of your work will be done from the hosting panel that you install+====== How-to chroot into Debian ====== 
 + 
 +===== Files needed ===== 
 + 
 +  * [[http://dns323.kood.org/downloads/bzip2-1.0.3.tar.bz2|bzip2]] 
 +  * [[http://dns323.kood.org/downloads/tar-1.15.92.tar.bz2|tar]] 
 +  * [[http://dns323.kood.org/downloads/busybox-1.00.tgz|busybox binary to replace missing tools]] 
 +  * [[http://dns323.kood.org/downloads/people/sala/debootstrap-0.3.3.1_uclibc_powerpc.tar.bz2|debootstrap-0.3.3.1 uclibc powerpc version]] 
 + 
 +===== Installing steps ===== 
 + 
 +  - Copy  the ''bzip'' and ''tar'' utilities to ''/mnt/HD_a2''.  E.g., on a linux machine, extract the utilities with ''tar xjf bzip2-1.0.3.tar.bz2'' and ''tar xjf tar-1.15.92.tar.bz2'', and then use ftp to transfer the extracted binaries and set executable permissions on them. 
 +  - ''mkdir /mnt/HD_a2/work &amp;&amp; cd /mnt/HD_a2/work'' 
 +  - Copy ''debootstrap-0.3.3.1_uclibc_powerpc.tar.bz2'' to ''/mnt/HD_a2/work/'' 
 +  - ''ln -s /mnt/HD_a2/bzip2 /mnt/HD_a2/bzcat'' 
 +  - ''/mnt/HD_a2/bzcat debootstrap-0.3.3.1_uclibc_powerpc.tar.bz2 | /mnt/HD_a2/tar -xvf -'' 
 +  - ''export DEBOOTSTRAP_DIR=`pwd`/usr/lib/debootstrap'' 
 +  - Copy and extract ''busybox-1.00.tgz'' and add extracted ''bin'' and ''sbin'' directory to a PATH. For example, use ftp to copy the file to ''/mnt/HD_a2'', and then:  
 +    - ''cd /mnt/HD_a2 &amp;&amp; gunzip -c busybox-1.00.tgz | /mnt/HD_a2/tar -xvf -'' 
 +    - ''export PATH=/mnt/HD_a2/bin:/mnt/HD_a2/sbin:$PATH'' 
 +   
 + **Note: Before proceeding to the next step, you must have internet access from the DSM-G600.** If the next step fails, ''%%rm -rf /mnt/HD_a2/debian%%'' and try replacing "etch&quot; with &quot;sarge&quot; in the command below.  
 +  - ''%%/mnt/HD_a2/bin/sh /mnt/HD_a2/work/usr/sbin/debootstrap --arch powerpc etch /mnt/HD_a2/debian http://archive.debian.org/debian%%''. Use [[http://www.debian.org/mirror/list|an appropriate Debian mirror]] or (preferably) an apt proxy.  See [[http://www.debian-administration.org/articles/426|this article]] on using ''debootstrap''.  
 +  - ''cp /etc/resolv.conf /mnt/HD_a2/debian/etc/resolv.conf'' 
 +  - ''cd /'' 
 +  - ''mount -t proc proc /mnt/HD_a2/debian/proc'' 
 +  - ''chroot /mnt/HD_a2/debian /bin/bash'' 
 +  - ''apt-get update'' 
 +  - ''apt-get install locales'' 
 +  - ''dpkg-reconfigure locales'' 
 +  - ''passwd root'' 
 +  - ''apt-get install dropbear'' 
 +  - ''apt-get install hotplug'' 
 + 
 +Once Debian has been installed as per the above procedure, the next time the unit is restarted, just do the PATH export and the ''chroot'' to enter Debian. 
 + 
 +==== /etc/fstab ==== 
 +Needed only if you're going to hdd-boot or use loader.o 
 +<code> 
 +/dev/sda3              /              ext3            noatime                0 0 
 +/dev/sda1              none            swap            sw                      0 0 
 +none                    /proc          proc            defaults                0 0 
 +none                    /dev/shm        tmpfs          defaults                0 0 
 +</code> 
 + 
 +==== /etc/network/interfaces ==== 
 +Needed only if you're going to hdd-boot or use loader.o 
 +<code> 
 +mapping hotplug 
 +        script grep 
 +        map eth0 eth0 
 + 
 +auto eth0 
 +iface eth0 inet static 
 +        address 192.168.1.2 
 +        netmask 255.255.255.0 
 +        gateway 192.168.1.1 
 +        dns-nameservers 192.168.1.1 
 +</code> 
 + 
 +FIXME This wiki page is writing in progress - 90% done 8-) 
 + 
 +===== Links ===== 
 + 
 +  * [[http://dns323.kood.org/forum/t17-Debian-howto.html|Forum thread]] 

Personal Tools