Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
I couldn't quite get edge to work properly, but I got squeeze working just fine. Using the 323 instructions for configuring a chroot were a good roadmap. If anyone's interested in getting Debian squeeze going on the DNS-321, here's how to do it:
Install FFP.
Using a Debian Linux install (I used a Ubuntu 9.04 VM), perform the following:
# apt-get install cdebootstrap smbfs # mount -t cifs //nas01/Volume_1 /mnt -o username=admin
In the above, nas01 is the hostname (or IP) of your DNS-321.
# cdebootstrap -aarmel squeeze squeeze ftp://ftp.debian.org/debian # tar cf squeeze.tar squeeze # cp squeeze.tar /mnt
Reboot the DNS-321, and then open a telnet session into it.
# cd /mnt/HD_a2 # tar xf squeeze.tar # chroot /mnt/HD_a2/squeeze /bin/bash
At this point, you're now chrooted into the squeeze distribution you just loaded. Any commands from this point forward will be inside the chroot. To set things up proper, continue on.
# cd /var/cache/bootstrap # dpkg --force-all -i libc6*deb # dpkg --force-all -i dpkg*deb # dpkg -iGREB .
The dpkg commands are going to bomb out on certain packages. Keep running the -i GREB. command a couple of times, and any packages that seem stuck, run the --force-all -i flags on the individual packages. Your final dpkg -i GREB. command should indicate no errors.
Below, fill in a valid nameserver for your network:
# echo "nameserver 192.168.210.1" > /etc/resolv.conf # echo "deb http://ftp1.ca.debian.org/debian squeeze main contrib non-free" > /etc/apt/sources.list # apt-get update # apt-get install debian-archive-keyring # apt-get update # apt-get dist-upgrade # passwd root
At this point, your chroot environment is ready to roll. You can create a custom linuxrc to automatically chroot and start services that you install after the DNS-321 boots. If you don't want to bother rebooting, you can run the following to create devices:
# mknod /dev/null c 1 3 # mknod /dev/random c 1 8 # mknod /dev/ptmx c 2 5 # mount proc /proc -t proc # mount devpts /dev/pts -t devpts
A fun_plug script similar to http://dns323.kood.org/howto:chroot_debian:fun_plug will handle mounting special devices for you on reboot.
If there are any questions or issues with this let me know and I'll be happy to answer any questions I can. I looked in the archives but didn't see any instructions like this for chroot'ing the DNS-321 so... my apologies if everyone knew this already. Thanks!
Offline
I own a 321 myself and I was curious about this myself too, if it was possible to debian chroot into the box, thank you for assuring me its possible. However, I was wondering if everything works fine under debian and also I would like to know if I were to do that, would I need to format and lose data on the process?
Offline
That looks simpler than the "howto".
Do you know if the same basic procedure will work for getting Debian "lenny", the current stable released version, up and running on the 321 and/or 323?
Do you have debian up for fun, or are there things that you can't do with ffp or optware that you want to do with debian?
Offline
Bobby - you wouldn't need to format. The logic behind this is the same as the chroot instructions for the DNS-323 running sarge or etch, or even ffp. It utilizes a fun_plug script which the embedded version of Linux is running, and creating an rc script simply eases service startup if you chroot into another environment.
talkingRock - I haven't tried a build with lenny yet - I will give that a whirl tonight or this weekend and I can report back. But the process would be the same, yes. For now I just have Debian running for fun, until I decide what I want to have (and am able to have) the unit do without murdering the performance. You would use a chroot Debian if you wanted to run packages that are outside of the contributed packages for ffp. I'd say for 95% of people, the stuff in ffp is everything you'd need for tooling around with the DNS-321. With the Debian chroot environment, you can always run the latest available packages available from Debian, which may have a feature or something you want/need. Utilizing apt-get, you will also have the ability to update packages automatically... a big reason for this would be security updates.
Hope this helps.
Offline
Damn, when I tried to do the step by step guide just now I got stuck in the
chroot /mnt/HD_a2/squeeze /bin/bash
Any ideas on what I can do about it? Seems like I can't chroot just yet.
EDIT: YOU NEED AT LEAST THE FIRMWARE VERSION 1.01 TO BE ABLE TO CHROOT
Last edited by Bobby (2009-08-26 19:38:43)
Offline
What firmware version are you running?
Offline
I haven't updated it since I bought the device, should I? That'd be the version 1.00
Last edited by Bobby (2009-05-17 02:59:41)
Offline
Yeah, I would imagine that's why you're getting that message. Try a firmware update to 1.01 - it has a ton of enhancements anyways... eg. jumbo frame support. Try that and report back.
Offline
After installing the 1.01 firmware I was able to chroot with squeeze, but when I was done doing the "iGREB ." command there is one file that won't install no matter what (base-files_5.0.0_armel.deb).
I have no name!@NetworkStorage:/var/cache/bootstrap# dpkg --force-all -i base-files_5.0.0_armel.deb (Reading database ... 8098 files and directories currently installed.) Preparing to replace base-files 5.0.0 (using base-files_5.0.0_armel.deb) ... Unpacking replacement base-files ... Setting up base-files (5.0.0) ... mkdir: cannot create directory `/var/mail': File exists dpkg: error processing base-files (--install): subprocess post-installation script returned error exit status 1 Processing triggers for man-db ... perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). /usr/bin/mandb: can't set the locale; make sure $LC_* and $LANG are correct Errors were encountered while processing: base-files I have no name!@NetworkStorage:/var/cache/bootstrap#
EDIT: YOU CAN FIX THIS BY
rm -fr var/mail/
AND THEN
dpkg -iGREB .
TO INSTALL BASE-FILES AGAIN
Also, is there something odd with apt-get update? (I wonder if it has to do with base-files not being able to get installed)
I have no name!@NetworkStorage:/var/cache/bootstrap# apt-get update Err http://ftp1.ca.debian.org squeeze Release.gpg Could not resolve 'ftp1.ca.debian.org' Reading package lists... Done W: Failed to fetch http://ftp1.ca.debian.org/debian/dists/squeeze/Release.gpg Could not resolve 'ftp1.ca.debian.org' W: Some index files failed to download, they have been ignored, or old ones used instead. W: You may want to run apt-get update to correct these problems I have no name!@NetworkStorage:/var/cache/bootstrap#
EDIT: THE PROBLEM HERE WAS THAT THE NAMESERVER WAS INVALID, I MADE A MISTAKE
Last edited by Bobby (2009-08-26 19:44:44)
Offline
Do you have a nameserver in /etc/resolv.conf set up within your chroot jail?
For the dpkg error you might want to try a dpkg -r on that fileset... and then re-try a dpkg -i on it.
Offline
Yeah, I do have it.
echo "NETWORKSTORAGE 192.168.0.19" > /etc/resolv.conf
That's okay, right?
This happens when I issue dpkg -r base-files
This happens when I issue dpkg --force-all -r base-files
And then when I try to install it back again
Last edited by Bobby (2009-05-17 05:41:28)
Offline
echo "nameserver 192.168.0.19" > /etc/resolv.conf
That's if your DNS server is 192.168.0.19... or use something like 205.171.3.65, which is Qwest's DNS server. Then give it a whirl with an update.
As for the base package not installing... not real sure, there may be some other force flags you could try. Google any help for those messages?
Offline
This is odd, its like if debian wasn't connected to the internet at all, it won't do anything. If I wanted to install everything again, I should just delete the squeeze folder, right?
EDIT: Nevermind that, the reason was stated above, the DNS server was not properly set
Last edited by Bobby (2009-05-20 05:41:03)
Offline
Yeah you can just blow away the folder and start over. Maybe try the dpkg on that base package first.
Offline
Alright, I deleted the folder, extracted the squeeze.tar again and and ran the "iGREB ." command like 7 times and everything is installed properly. Regarding the "nameserver" issue, I just found out my DNS server (silly me ) and everything *should* be working correctly now.
Thanks for your help, I really appreciate it.
If you must know, I'm planning on installing: irssi, rTorrent, and screen into the debian distro see if it is stable like this unlike on the normal OS.
What exactly does this part do, by the way?
# mknod /dev/null c 1 3 # mknod /dev/random c 1 8 # mknod /dev/ptmx c 2 5 # mount proc /proc -t proc # mount devpts /dev/pts -t devpts
Last edited by Bobby (2009-05-17 06:41:38)
Offline
Have you been able to make the "screen" application work? No matter what I do it just won't show a screen, it keeps telling me "You must be connected to a terminal"
Offline
That makes your devices which quite a few services in the OS depend on. I haven't done anything with screen, sorry.
Offline
Okay, somehow I made screen work (forgot how ) so I'm happy now hehe, I really hated transmission because of its file fragmentation thing, but now with rTorrent fully stable its a whole different story
Thanks a bunch again, this is just what I needed =P
EDIT 2 : In order to be able to run screen without the PTY problem, you have to run this command under the main fun_plug environment
mount -o bind /dev /mnt/HD_a2/squeeze/dev chroot /mnt/HD_a2/squeeze /bin/bash
And then on the chrooted environment:
mount proc /proc -t proc mount devpts /dev/pts -t devpts
Last edited by Bobby (2009-07-06 03:55:00)
Offline
Sorry to ressurect and older thread. Finally tried the chroot and it works great with squeeze. Can anyone who is using it in a chroot environment on the DNS-321 post their fun_plug and linuxrc?
Thanks
Offline
Hello all,
So I have tried several of these guides and have figured out I do not have a /bin/bash directory. I have tried all the firmwares of my dns-321 and am completely stuck. Am I supposed to install bash somewhere? Or what? Any help would be greatly appreciated.
~Daniel
Offline
Ok, I figured it out. Apparently you need to install bash seperatly from the defualt plugins installed. Many "packages" from here: http://www.inreto.de/dns323/fun-plug/0.5/ also I wasn't able to use that current repository until I changed it to # echo "deb http://ftp.ca.debian.org/debian squeeze main contrib non-free" > /etc/apt/sources.list
I don't know if the "1" matters or not though.
Offline
djtecha wrote:
Ok, I figured it out. Apparently you need to install bash seperatly from the defualt plugins installed. Many "packages" from here: http://www.inreto.de/dns323/fun-plug/0.5/ also I wasn't able to use that current repository until I changed it to # echo "deb http://ftp.ca.debian.org/debian squeeze main contrib non-free" > /etc/apt/sources.list
I don't know if the "1" matters or not though.
the "1" is just a mirror, just as "2" and "3" would be, so don't worry about it, all of them have the exact same stuff, I didn't have to install bash separately at all when chrooting for the first time.
Offline
Is someone able to post a link to that squeeze.tar? It would save me the time of arranging a debian install to perform the steps to create one myself.
Offline
Running from Debian Lenny on either a x64 machine or a arm machine gives me segmentation fault:
cdebootstrap -aarmel squeeze squeeze ftp://ftp.debian.org/debian
Result:
... P: Extracting login P: Extracting ncurses-base P: Extracting procps P: Extracting sysvinit P: Extracting tar E: Execution failed: Exec format error E: Internal error: install
Offline
Opperpanter wrote:
Running from Debian Lenny on either a x64 machine or a arm machine gives me segmentation fault:
cdebootstrap is buggy: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514015
I used debootstrap:
debootstrap --arch=armel --verbose --foreign squeeze ./squeeze tar cf squeeze.tar squeeze
and after transferring squeeze.tar, on the target:
cd /mnt/HD_a2 tar xf squeeze.tar chroot /mnt/HD_a2/squeeze /bin/bash /debootstrap/debootstrap --second-stage
However, the chroot step segfaults for me. I'm using firmware 1.0.8.
file squeeze/bin/ls squeeze/bin/ls: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
Is that because this is a 2.6.12 kernel? Does armel even work (still)?
Offline