Welcome! Log In Create A New Profile

Advanced

nand install, installing other packages to usb drive

Posted by hyena 
nand install, installing other packages to usb drive
September 01, 2010 04:50PM
hi,

as i'm a complete linux newbie, i have installed emdebian to a win7 virtual box and am getting to grips with it (without hopefully bricking the dockstar when i eventually deflower it)

What i have in mind (bearing in mind that space is limited on nand) is installing the large package (squeezebox server) to the usb hard drive (along with my media and if i have to ffmpeg as well).

In the virtual box machine i've used apt to install usbmount to automount the usb drive (to save a bit of time in the virtual box) which was fine but now i intend to try and use apt to have a first attempt at installing the squeezebox server and as its a pretty meaty bit of code (and nand is read only) i'm trying to work out how to direct its install to the usb drive using apt (as im going to need to do this when i get round to emdebian'ing the dockstar.

can anyone offer any advice

thanks

ian
ecc
Re: nand install, installing other packages to usb drive
September 01, 2010 10:00PM
hyena Wrote:
-------------------------------------------------------
> [...] i'm trying to work out how to direct
> its install to the usb drive using apt (as im
> going to need to do this when i get round to
> emdebian'ing the dockstar.

Apt doesn't allow you to change where to install packages -- the "Debian way" is for the package maintainer to determine exactly where its files go, not the user. But there's a way around that.

You can accomplish what you want by using a "chroot" -- kind of like a virtual machine, but it's just a subdirectory that you can pretend is the entire root filesystem by using the chroot command.
Once you're in the chroot, apt will install relative to that. I use this approach with my DockStar to get a full ARM development environment for compiling packages, etc. -- in fact my development chroot is an NFS-mounted directory on another machine.

Here's a generic script I use for getting in and out of the chroot:
#!/bin/sh -e
mountpoint -q /mnt/chroot || mount /mnt/chroot
mount --bind /dev /mnt/chroot/dev
mount --bind /proc /mnt/chroot/proc
chroot /mnt/chroot
umount /mnt/chroot/proc /mnt/chroot/dev /mnt/chroot
Re: nand install, installing other packages to usb drive
September 14, 2010 02:59PM
thanks for this, what i am really after is a resiliant debian core boot in nand (i dont care about pogoplug) and installing mplayer/squeezeboxserver/audio package along with my media on an external 2.5 HD but as i have young kids around it needs to be "hard reset proof" ...

so i am after debian to boot (and do a usb hd check fix automatically and usb probs) from nand and then boot the media apps on the usb drive (200MB of apps)

i was wondering if chrooting to the usb and apt-installing the apps there then chrooting back and installing some kind of symbolic links (from the nand directories) to the usb app files/directories would be a solution giving me a pretty hard reset prof media system

as mplayer/squeezebox server/audio has already been put on to the sheevaplug all the apps are out there though not probably in apt form.
ecc
Re: nand install, installing other packages to usb drive
September 14, 2010 09:06PM
hyena Wrote:
-------------------------------------------------------
> i was wondering if chrooting to the usb and apt-installing the apps there
> then chrooting back and installing some kind of symbolic links
> (from the nand directories) to the usb app files/directories would be a solution
> giving me a pretty hard reset prof media system

This approach might work for simple apps, but there are a lot of pitfalls for even moderately complex ones. Basically, the apps should all run fine inside the chroot, but if you try to run them (via a symlink for example) outside the chroot, they are likely to fail because they won't be able to find libraries or data files that they need.

You might be better off just having a full USB-based install for your media system, and a small NAND-based one for recovery or other system administration purposes.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: