Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Re: chroot'ed Debian Squeeze on Readynas
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-17
11:18 AM
2012-10-17
11:18 AM
chroot'ed Debian Squeeze on Readynas
chroot'ed Debian Squeeze on Readynas
I would like to share this with you all, after having to reset my readynas several times now, and lost all my data and what not.
This involves getting debian squeeze installed on your readynas in a chroot "jail". For those of you who haven't heard of chroot,
read all about it here: http://wiki.debian.org/chroot
To see what version of debian you are on do:
Then install debootstrap:
cd to:
Do:
debootstrap squeeze in /c/home/squeeze:
Then, the final step, chroot:
Then you can run:
To see if it worked...
Mounting pseudo filesystems (from http://wiki.debian.org/chroot)
/proc
Check the chrooted system the presence of /proc if the chroot is not likely to be fully operational. A priori, since version debootstrap Debian/Etch integrates natively mount /proc and /sys
/dev/pts
It is also advisable to do a "bind" /dev/pts. This prevents error messages like Must be connected to a terminal or Can not access '/dev/pts/0': No such file or directory of this type with using the control debpkg: screen.
In this case, the primary system, run the command:
Default Configurations
Generally the file /etc/fstab might look like this:
Therefore mount on the primary system would be:
What's great about this, is that you will have a up to date debian system on your nas, where you can install all your custom stuff!
Everything you do in this chroot jail, will not affect your nas at all, and should be first thing you do, if you are like me, and want to run everything you can off your readynas box.
It doesn't get any better than this! Good luck! 😄
I would like to share this with you all, after having to reset my readynas several times now, and lost all my data and what not.
This involves getting debian squeeze installed on your readynas in a chroot "jail". For those of you who haven't heard of chroot,
read all about it here: http://wiki.debian.org/chroot
To see what version of debian you are on do:
root@nas1:/# cat /etc/debian_version
4.0
Then install debootstrap:
apt-get install debootstrap
cd to:
cd /usr/lib/debootstrap/scripts
Do:
ln -s lenny squeeze
debootstrap squeeze in /c/home/squeeze:
debootstrap squeeze /c/home/squeeze
Then, the final step, chroot:
chroot /c/home/squeeze
Then you can run:
root@nas1:/# cat /etc/debian_version
6.0.4
To see if it worked...
Mounting pseudo filesystems (from http://wiki.debian.org/chroot)
/proc
Check the chrooted system the presence of /proc if the chroot is not likely to be fully operational. A priori, since version debootstrap Debian/Etch integrates natively mount /proc and /sys
proc on /proc type proc (rw)
sysfs on /sys sysfs kind (rw)
/dev/pts
It is also advisable to do a "bind" /dev/pts. This prevents error messages like Must be connected to a terminal or Can not access '/dev/pts/0': No such file or directory of this type with using the control debpkg: screen.
In this case, the primary system, run the command:
mount --bind /dev/pts /var/chroot/etch/dev/pts
Default Configurations
Generally the file /etc/fstab might look like this:
# cat /etc/fstab | grep chroot
/dev /var/chroot/etch/dev auto bind 0 0
/dev/pts /var/chroot/etch/dev/pts auto bind 0 0
/proc /var/chroot/etch/proc auto bind 0 0
Therefore mount on the primary system would be:
# mount | grep chroot
/dev on /var/chroot/etch/dev -type none (rw, bind)
/dev/pts on /var/chroot/etch/dev/pts kind none (rw, bind)
/proc on /var/chroot/etch/proc type none (rw, bind)
What's great about this, is that you will have a up to date debian system on your nas, where you can install all your custom stuff!
Everything you do in this chroot jail, will not affect your nas at all, and should be first thing you do, if you are like me, and want to run everything you can off your readynas box.
It doesn't get any better than this! Good luck! 😄
Message 1 of 11
Labels:
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-17
03:41 PM
2012-10-17
03:41 PM
Re: chroot'ed Debian Squeeze on Readynas
+1
Works well for some picky packages. I did similar awhile back for VirtualBox before the packages got better.
Works well for some picky packages. I did similar awhile back for VirtualBox before the packages got better.
Message 2 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-17
09:25 PM
2012-10-17
09:25 PM
Re: chroot'ed Debian Squeeze on Readynas
I was just reading up on how to do this 2 days ago and wondeering if it'd work on the nas. I'm going to have to do a factory reset soon and want it to be the last time. You saved me a lot of time. This is awesome.
Message 3 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-18
05:24 AM
2012-10-18
05:24 AM
Re: chroot'ed Debian Squeeze on Readynas
KydDynoMyte wrote: I was just reading up on how to do this 2 days ago and wondeering if it'd work on the nas. I'm going to have to do a factory reset soon and want it to be the last time. You saved me a lot of time. This is awesome.
Thats great to hear! Yeah, it's really a time saver, instead of backing up all data, reset and so on... 😄
Message 4 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-18
05:53 AM
2012-10-18
05:53 AM
Re: chroot'ed Debian Squeeze on Readynas
Just a quick thought. This is kind of how Ubuntu runs on my Android phone, chroot'ed on the phone and then you can vnc into x right from Android. Think we could start x server on the NAS and vnc into it? I assume not without graphics hardware on the NAS, so think it would be possible by adding a USB video card to the NAS? Also do you think it'd be possible to resize the main partition and add a swap partition, or an external swap partition, and it be used?
Message 5 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-18
06:50 AM
2012-10-18
06:50 AM
Re: chroot'ed Debian Squeeze on Readynas
As i understand it, all the basic stuff of the nas would run on radiatior, and all tweaking would run on debian squeeze, installed on /c/, which would work like any debian squeeze distribution.
If the tweakings with debian squeeze brick, you still have your original installation available (with its frontview), and can restore your nas, without a factory default (when os reinstall doesn't work).
Am i right ?
It seem interesting.
So, questions :
-How much ressources would it use (i guess a dual core atom, with upgraded RAM is the minimum) ?
-Would there be a gui ? Access via VNC available ?
If the tweakings with debian squeeze brick, you still have your original installation available (with its frontview), and can restore your nas, without a factory default (when os reinstall doesn't work).
Am i right ?
It seem interesting.
So, questions :
-How much ressources would it use (i guess a dual core atom, with upgraded RAM is the minimum) ?
-Would there be a gui ? Access via VNC available ?
Message 6 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-18
10:05 AM
2012-10-18
10:05 AM
Re: chroot'ed Debian Squeeze on Readynas
tiranor wrote: As i understand it, all the basic stuff of the nas would run on radiatior, and all tweaking would run on debian squeeze, installed on /c/, which would work like any debian squeeze distribution.
If the tweakings with debian squeeze brick, you still have your original installation available (with its frontview), and can restore your nas, without a factory default (when os reinstall doesn't work).
Am i right ?
It seem interesting.
So, questions :
-How much ressources would it use (i guess a dual core atom, with upgraded RAM is the minimum) ?
-Would there be a gui ? Access via VNC available ?
I use winscp and putty to ssh into the box, that is required to do all this, so no, there's no gui.
The amount of resources will depend upon how much you run in the chroot...
KydDynoMyte wrote: Just a quick thought. This is kind of how Ubuntu runs on my Android phone, chroot'ed on the phone and then you can vnc into x right from Android. Think we could start x server on the NAS and vnc into it? I assume not without graphics hardware on the NAS, so think it would be possible by adding a USB video card to the NAS? Also do you think it'd be possible to resize the main partition and add a swap partition, or an external swap partition, and it be used?
I don't get why you want to do that, just get a mini htpc dedicated to play video etc.. Then run everything headless on the nas, accessible maybe in the browser, depending on what you have installed of course.
As an example, i intend to run sabnzbd, sickbeard, couchpotato and headphones in the chroot, all of them which are accessible through the web browser. 😎
This requires that you have a little bit knowledge in using debian/ubuntu, apt and so forth. 🙂
Message 7 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-18
11:49 AM
2012-10-18
11:49 AM
Re: chroot'ed Debian Squeeze on Readynas
TMiland wrote: I don't get why you want to do that, just get a mini htpc dedicated to play video etc.. Then run everything headless on the nas, accessible maybe in the browser, depending on what you have installed of course.
As an example, i intend to run sabnzbd, sickbeard, couchpotato and headphones in the chroot, all of them which are accessible through the web browser. 😎
This requires that you have a little bit knowledge in using debian/ubuntu, apt and so forth. 🙂
I already have a mini HTPC and I'm not trying to watch video on the NAS. It would just be nice to configure stuff from X. It'd be nice to VNC into the NAS to do other things securely while away from home.
I only have a Duo V2 and run Sab, Sick, Couch, Headphones, & ZNC. A Headphones and ZNC addon wasn't available yet so I had to manually set those up. You'll love them. Some don't have HTTPS so setting up an SSH tunnel works nice for remotely accessing those securely from the web browser. The addons work so good (except for sickbeard on SPARC at the moment), I'd probably use the chroot for things that don't have an addon. When using apt, squeeze package versions seem pretty old, I changed my sources to wheezy to get a more up to date version of ZNC.
Message 8 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-10-18
12:06 PM
2012-10-18
12:06 PM
Re: chroot'ed Debian Squeeze on Readynas
KydDynoMyte wrote:
I already have a mini HTPC and I'm not trying to watch video on the NAS. It would just be nice to configure stuff from X. It'd be nice to VNC into the NAS to do other things securely while away from home.
I only have a Duo V2 and run Sab, Sick, Couch, Headphones, & ZNC. A Headphones and ZNC addon wasn't available yet so I had to manually set those up. You'll love them. Some don't have HTTPS so setting up an SSH tunnel works nice for remotely accessing those securely from the web browser. The addons work so good (except for sickbeard on SPARC at the moment), I'd probably use the chroot for things that don't have an addon. When using apt, squeeze package versions seem pretty old, I changed my sources to wheezy to get a more up to date version of ZNC.
I get what you mean, you could use webmin? Thats atleast a web interface to manage the whole server. 🙂
The ZNC looks nice!
I went from installing the outdated plugins, to installing everything myself, i cannot stand a plugin that is out of date. :lol:
Message 9 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-23
04:37 PM
2013-01-23
04:37 PM
Re: chroot'ed Debian Squeeze on Readynas
So, would it be possible to install forked-daapd using backports after this? (as decribed here: http://elinux.org/RPiForked-Daapd)
On a Duo v1 sparc?
Thanks!
On a Duo v1 sparc?
Thanks!
Message 10 of 11
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-01-23
11:03 PM
2013-01-23
11:03 PM
Re: chroot'ed Debian Squeeze on Readynas
vivshank wrote: So, would it be possible to install forked-daapd using backports after this? (as decribed here: http://elinux.org/RPiForked-Daapd)
On a Duo v1 sparc?
Thanks!
I don't see any problems with that, just give it a go and see if it works, if it doesn't, delete the chroot or do whatever you'd like. 😄
Message 11 of 11