Why pbuilder does not work on free euserv server

Discussion in 'Server Operation' started by amue5700, Oct 1, 2019.

  1. amue5700

    amue5700 New Member

    Hi,

    i have orderd a free virtual server from euserv i have found on reddit. Now i tried to use pbuilder and i got this error:
    Code:
    root@srv0000:~# pbuilder-dist stretch create
    W: /root/.pbuilderrc does not exist
    I: Logging to /root/pbuilder/stretch_result/last_operation.log
    I: Distribution is stretch.
    I: Current time: Tue Oct  1 09:12:03 CEST 2019
    I: pbuilder-time-stamp: 1569913923
    I: Building the build environment
    I: running debootstrap
    /usr/sbin/debootstrap
    mknod: /var/cache/pbuilder/build/13215/test-dev-null: Operation not permitted
    E: Cannot install into target '/var/cache/pbuilder/build/13215' mounted with noexec or nodev
    E: debootstrap failed
    E: Tail of debootstrap.log:
    tail: cannot open '/var/cache/pbuilder/build/13215/debootstrap/debootstrap.log' for reading: No such file or directory
    W: Aborting with an error
    
    have anyone an idea how i can solve this problem?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You seem to run pbuilder as root. Is it not the idea behind pbuilder to allow building .deb packages as ordinary user?
    Check the docs on how to set up pbuilder, it should work when used properly.
     
  3. amue5700

    amue5700 New Member

    Hi,

    this is currently my free testserver. If problems haben, i reinstall it. But currently it does not work with this command and i don't know why.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What operating system is installed on that testserver?
    What is in /root/pbuilder/stretch_result/last_operation.log ?
    What shows
    Code:
    ls -lhR /var/cache/pbuilder/
    df -hT /var/cache
    How is the /var/cache mounted? This seems to be the crucial error message:
    Code:
    E: Cannot install into target '/var/cache/pbuilder/build/13215' mounted with noexec or nodev
     
  5. amue5700

    amue5700 New Member

    Hi,

    my os is
    Ubuntu 18.04 LTS (Bionic Beaver) - 64Bit - minimal v4

    Here is the output of the commands:

    Code:
    root@srv0000:~# ls -lhR /var/cache/pbuilder/
    /var/cache/pbuilder/:
    total 24K
    drwxr-xr-x 2 root root 4.0K Jan 22  2018 aptcache
    drwxr-xr-x 3 root root 4.0K Oct  1 09:12 build
    drwxr-xr-x 2 root root 4.0K Jan 22  2018 ccache
    drwxr-xr-x 2 root root 4.0K Jan 22  2018 pbuildd
    drwxr-xr-x 2 root root 4.0K Jan 22  2018 pbuilder-mnt
    drwxr-xr-x 2 root root 4.0K Jan 22  2018 result
    
    /var/cache/pbuilder/aptcache:
    total 0
    
    /var/cache/pbuilder/build:
    total 4.0K
    drwxr-xr-x 2 root root 4.0K Oct  1 09:12 13215
    
    /var/cache/pbuilder/build/13215:
    total 0
    
    /var/cache/pbuilder/ccache:
    total 0
    
    /var/cache/pbuilder/pbuildd:
    total 0
    
    /var/cache/pbuilder/pbuilder-mnt:
    total 0
    
    /var/cache/pbuilder/result:
    total 0
    
    root@srv0000:~# df -hT /var/cache
    Filesystem     Type  Size  Used Avail Use% Mounted on
    /dev/loop2     ext4  9.8G  2.5G  6.8G  27% /
    
    
    How can i find out how is the /var/cache is mounted?
     
  6. amue5700

    amue5700 New Member

    Hi,

    i have found a solution that works for me. Here a little howto:
    Code:
    - Update and Upgrade the server
    apt update
    apt upgrade
    
    - Install pbuilder and tools
    apt install pbuilder ubuntu-dev-tools debootstrap devscripts
    
    - Install fakechroot
    apt install fakechroot
    
    - Create directory for pbuilder
    mkdir -p /opt/cache/pbuilder/build
    
    - Set config variables for pbuilder
    echo 'BUILDPLACE=/opt/cache/pbuilder/build' > /root/.pbuilderrc
    echo 'USEPROC=no' >> /root/.pbuilderrc
    echo 'USERUNSHM=no' >> /root/.pbuilderrc
    
    - Start pbuilder in fakechroot mode
    fakechroot fakeroot pbuilder-dist bionic create --debootstrapopts --variant=fakechroot
    
    OS:
    Ubuntu 18.04 LTS (Bionic Beaver) - 64Bit - minimal v4 (https://www.euserv.com/en/dedicated-server/features/operating-systems.php)

    Sources:
    https://www.reddit.com/r/VPS/comments/cay4xx/free_vps_with_a_little_trick/
    https://wiki.ubuntu.com/PbuilderHow...e_different_architectures_and_distro_releases
    https://manpages.debian.org/jessie/pbuilder/pbuilderrc.5.en.html
    https://linux.die.net/man/1/fakechroot
     

Share This Page