This is the old SliTaz forum - Please use the main forum.slitaz.org

chroot cross device
  • moulefritemoulefrite February 2011
    Hi,

    I'm willing to chroot an environment on a usb. It's seems ok, but one I want to install a packqges on it (like firefox)
    I've got errors !

    firefox-3.5.7
    Connecting to mirror.slitaz.org (94.23.60.116:80)
    firefox-3.5.7.tazpkg 100% |*******************************|  5864k 00:00:00 ETA
    /usr/bin/tazpkg: line 2642: can't create /dev/null: Permission denied
    /usr/bin/tazpkg: .: line 2642: can't open /tmp/tazpkg-3101-27775/receipt
    /usr/bin/tazpkg: line 2642: can't create /dev/null: Permission denied
    /usr/bin/tazpkg: .: line 2642: can't open /tmp/tazpkg-3101-27775/receipt
    root@slitaz:/# firefox                   
    /bin/sh: firefox: not found
    root@slitaz:/# 

    help
  • babaorumbabaorum February 2011
    What is this line ?
  • OldGuyOldGuy February 2011
    @moulefrite
    Could you pls. give some more details on how you chroot ?
  • moulefritemoulefrite February 2011
    Hi

    I've just read that chrooting implies that you are not allowed to go downwards :
    e.g : if one chroot in /home/slitaz/chroot , not possible to reach /home/slitaz

    In the code I see /dev/null: Permission denied  ..  anything related with ?
    ..
  • moulefritemoulefrite February 2011
    @OldGuy

    Just as described in handbook in 3 commands

    http://doc.slitaz.org/fr:guides:chroot


  • OldGuyOldGuy February 2011
    I just went through the 3 steps
       tazpkg get-install slitaz-dev-tools
       tazdev gen-chroot
       tazdev chroot

    Thereafter I installed firefox (tazpkg get-install firefox) within the chroot environment without any problems in regards to /dev/null.

    There are a few strange things I noticed:
    When the 3 steps are used under Slitaz stable core, the flavor of the chroot environment is cooking (as described in the tazdev usage - gen-chroot  Generate a chroot using the last cooking base rootfs) and if I then search for the firefox package (tazpkg search firefox) I'll get version 3.6.13 out of the cooking tree.

    You install firefox 3.5.7 which is part of the stable tree.

    Are you sure you're within the chroot environment?


    Nevertheless, your chroot environment should have a /dev/ directory with a device 'null'
    What does 'ls -l /dev/nu*' give you when you're in the chroot env. ?
  • moulefritemoulefrite February 2011

    You are right !


    I've change tazpkg parameter (change the mirror to target towards stable packages) . But, as you pointed it out,


    tazdev typically  download the tiny slitaz core . How can I change paramaters the way it downloads a classical


    Slitaz 3.0 Xvesa to build the chroot environment ?


     


    Beside this, you are OK to say that it's impossible to make any tazpkg link's through the chroot to reach any partition and/or device . Right ?

  • OldGuyOldGuy February 2011
    I'm not sure about how to change the chroot env. to anything different.
    I think you're right, it should be a parameter to tazdev, as tazdev creates the env. (tazdev gen-chroot)

    About the devices and links.
    You should be able to mount any device/partition in the chroot as you could in the normal environment.

    Nevertheless, the error you get indicates a problem with /dev/null.
    Therefore it would be good to see the output of 'ls -l /dev/nu*' within the chroot env.
  • moulefritemoulefrite February 2011
    In fact , tazdev can be easily editable in /usr/bin . So you can set a chroot by downloading any Slitaz .

    Ok , it's possible to mount a device/partition from a chroot ..  but I notice that chrooting to another device than the one which you boot on , may cause troubles ..
  • OldGuyOldGuy February 2011
    I used to chroot quite often to devices which I didn't boot from (especially to fix GRUB issues) but I never experienced any trouble doing so.
  • moulefritemoulefrite February 2011
    Ok,

    Here's what I've done 

    Slitaz Live , Chroot on a external USB , Inside this chroot install Firefox ... you will probably have same problems than mine :

    firefox-3.5.7
    Connecting to mirror.slitaz.org (94.23.60.116:80)
    firefox-3.5.7.tazpkg 100% |*******************************|  5864k 00:00:00 ETA
    /usr/bin/tazpkg: line 2689: can't create /dev/null: Permission denied
    /usr/bin/tazpkg: .: line 2689: can't open /tmp/tazpkg-3557-5272/receipt
    /usr/bin/tazpkg: line 2689: can't create /dev/null: Permission denied
    /usr/bin/tazpkg: .: line 2689: can't open /tmp/tazpkg-3557-5272/receipt
    root@slitaz:/# 
  • OldGuyOldGuy February 2011
    Sorry,

     first you said you used the way described in the handbook,
    than you mentioned on the side that you modified tazpkg to 'targettowards stable' and
    now I'm wondering what you have done to get tazdev to create the chroot on a usb-(stick?)

    I've tried the standard way and it worked!

    If you want help with your problem you got to explain, in detail and step by step, what you've done and how.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social