Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: compile kernel

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    139

    Default compile kernel

    hi i use kubuntu 13.04, I would like to compile the kernel in /usr/src
    vincenzo@AthlonII-x4-640:~$ sudo adduser vincenzo src

    vincenzo@AthlonII-x4-640:~$ sudo chmod -R g+wr /usr/src

    restart Kubuntu

    vincenzo@AthlonII-x4-640:~$ cd /usr/src

    mkdir prova

    mkdir: can not create directory 'prova': Permission denied

    thanks for help :-(

  2. #2
    Join Date
    Jun 2009
    Posts
    542

    Default

    Quote Originally Posted by Vincenzov View Post
    hi i use kubuntu 13.04, I would like to compile the kernel in /usr/src
    vincenzo@AthlonII-x4-640:~$ sudo adduser vincenzo src

    vincenzo@AthlonII-x4-640:~$ sudo chmod -R g+wr /usr/src

    restart Kubuntu

    vincenzo@AthlonII-x4-640:~$ cd /usr/src

    mkdir prova

    mkdir: can not create directory 'prova': Permission denied

    thanks for help :-(
    easiest solution is to simply not put the kernel package in /usr/src. put it somewhere in the /home directory and do everything from there, then 'make-kpkg' and install the generated packages. easy peasy.

  3. #3
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    139

    Default

    yes, but virtualbox find headers in documents and not /usr/src/

    /etc/init.d/vboxdrv setup

    find /documents/kernel-3.9.0 and not /usr/src/linux-headers-3.9.0

    sorry my english is bad

    sudo apt-get install virtualbox-4.2
    * Stopping VirtualBox kernel modules [ OK ]
    * Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    * Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel headers for kernel 3.9.0 cannot be found.
    Please install the linux-headers-3.9.0 package,
    or use the --kernelsourcedir option to tell DKMS where it's located

    * Failed, trying without DKMS
    * Recompiling VirtualBox kernel modules
    * Look at /var/log/vbox-install.log to find out what went wrongsudo /etc/init.d/vboxdrv setup

    You will not be able to start VMs until this problem is fixed.
    vincenzo@AthlonII-x4-640:~$ sudo /etc/init.d/vboxdrv setup
    * Stopping VirtualBox kernel modules [ OK ]
    * Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    * Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel headers for kernel 3.9.0 cannot be found.
    Please install the linux-headers-3.9.0 package,
    or use the --kernelsourcedir option to tell DKMS where it's located

    * Failed, trying without DKMS
    * Recompiling VirtualBox kernel modules
    * Look at /var/log/vbox-install.log to find out what went wrong

    Elaborazione dei trigger per python-central...

    the package is /usr/src why not found it
    Last edited by Vincenzov; 04-29-2013 at 07:03 AM.

  4. #4
    Join Date
    Jun 2009
    Posts
    542

    Default

    Quote Originally Posted by Vincenzov View Post
    yes, but virtualbox find headers in documents and not /usr/src/

    /etc/init.d/vboxdrv setup

    find /documents/kernel-3.9.0 and not /usr/src/linux-headers-3.9.0

    sorry my english is bad

    sudo apt-get install virtualbox-4.2
    * Stopping VirtualBox kernel modules [ OK ]
    * Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    * Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel headers for kernel 3.9.0 cannot be found.
    Please install the linux-headers-3.9.0 package,
    or use the --kernelsourcedir option to tell DKMS where it's located

    * Failed, trying without DKMS
    * Recompiling VirtualBox kernel modules
    * Look at /var/log/vbox-install.log to find out what went wrongsudo /etc/init.d/vboxdrv setup

    You will not be able to start VMs until this problem is fixed.
    vincenzo@AthlonII-x4-640:~$ sudo /etc/init.d/vboxdrv setup
    * Stopping VirtualBox kernel modules [ OK ]
    * Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    * Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel headers for kernel 3.9.0 cannot be found.
    Please install the linux-headers-3.9.0 package,
    or use the --kernelsourcedir option to tell DKMS where it's located

    * Failed, trying without DKMS
    * Recompiling VirtualBox kernel modules
    * Look at /var/log/vbox-install.log to find out what went wrong

    Elaborazione dei trigger per python-central...

    the package is /usr/src why not found it
    13.04 does not ship with kernel 3.9. How did you install 3.9? Through the package manager or through custom compilation?

  5. #5
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    139

    Default

    in documents

    ln -s /usr/src/linux-headers-3.9.0/


    I renamed the symbolic link


    rename linux-headers-3.9.0 linux-3.9.0



    sudo /etc/init.d/vboxdrv setup
    * Stopping VirtualBox kernel modules [ OK ]
    * Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    * Trying to register the VirtualBox kernel modules using DKMS [ OK ]
    * Starting VirtualBox kernel modules


    works.

    how do I tell the computer to look for headers in / usr / src

    thanks
    it all depends because I compile the kernel in the Documents folder, and goes there to look for modules.
    Last edited by Vincenzov; 04-29-2013 at 07:27 AM.

  6. #6
    Join Date
    Jun 2009
    Posts
    542

    Default

    Quote Originally Posted by Vincenzov View Post
    in documents

    ln -s /usr/src/linux-headers-3.9.0/


    I renamed the symbolic link


    rename linux-headers-3.9.0 linux-3.9.0



    sudo /etc/init.d/vboxdrv setup
    * Stopping VirtualBox kernel modules [ OK ]
    * Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    * Trying to register the VirtualBox kernel modules using DKMS [ OK ]
    * Starting VirtualBox kernel modules


    works.

    how do I tell the computer to look for headers in / usr / src

    thanks
    sorry you lost me. I can't understand what you are trying to say. Maybe someone else can offer better help in your native language.

  7. #7
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    139

    Default

    Scarico e compilo linux 3.9.0 nella cartella documenti.
    installo i file deb headers e imagine

    linux-image-3.9.0_3.9.0-10.00.Custom_amd64.deb

    linux-headers-3.9.0_3.9.0-10.00.Custom_amd64.deb

    cancello da documenti linux 3.9.0, quello che ho compilato.



    installo virtualbox , ma mi da errore

    sudo /etc/init.d/vboxdrv setup
    * Stopping VirtualBox kernel modules [ OK ]
    * Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    * Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel headers for kernel 3.9.0 cannot be found.
    Please install the linux-headers-3.9.0 package,
    or use the --kernelsourcedir option to tell DKMS where it's located

    * Failed, trying without DKMS
    * Recompiling VirtualBox kernel modules
    * Look at /var/log/vbox-install.log to find out what went wrong



    virtualbox non trova in documenti la cartella che ho cancellato, ma ho installato headers3.9.0 in usr/src

    ln -s /usr/src/linux-headers-3.9.0 linux-3.9 (works)

    dopo che ho fatto un collegamento simbolico al headers funziona.
    come si fa a dire al pc in automatico di controllare sempre nella cartella /usr/src
    Last edited by Vincenzov; 04-29-2013 at 08:06 AM.

  8. #8
    Join Date
    Jan 2013
    Posts
    980

    Default

    Quote Originally Posted by Vincenzov View Post
    hi i use kubuntu 13.04, I would like to compile the kernel in /usr/src
    vincenzo@AthlonII-x4-640:~$ sudo adduser vincenzo src

    vincenzo@AthlonII-x4-640:~$ sudo chmod -R g+wr /usr/src

    restart Kubuntu

    vincenzo@AthlonII-x4-640:~$ cd /usr/src

    mkdir prova

    mkdir: can not create directory 'prova': Permission denied

    thanks for help :-(
    Please post output:
    Code:
    1)
    cat /etc/group | grep vincenzo
    
    2)
    cat /etc/mtab
    
    3)
    cd /usr
    ls -alh . | grep src
    Last edited by brosis; 04-29-2013 at 01:34 PM.

  9. #9
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    139

    Default

    vincenzo@AthlonII-x4-640:~$ cat /etc/group | grep vincenzo
    adm:x:4:vincenzo
    cdrom:x:24:vincenzo
    sudo:x:27:vincenzo
    dip:x:30:vincenzo
    src:x:40:vincenzo
    plugdev:x:46:vincenzo
    lpadmin:x:108:vincenzo
    vincenzo:x:1000:
    sambashare:x:123:vincenzo
    vboxusers:x:125:vincenzo
    vincenzo@AthlonII-x4-640:~$ cat /etc/mtab
    /dev/sda1 / ext4 rw,errors=remount-ro 0 0
    proc /proc proc rw,noexec,nosuid,nodev 0 0
    sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
    none /sys/fs/cgroup tmpfs rw 0 0
    none /sys/fs/fuse/connections fusectl rw 0 0
    none /sys/kernel/debug debugfs rw 0 0
    none /sys/kernel/security securityfs rw 0 0
    udev /dev devtmpfs rw,mode=0755 0 0
    devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
    tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0
    none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0
    none /run/shm tmpfs rw,nosuid,nodev 0 0
    none /run/user tmpfs rw,noexec,nosuid,nodev,size=104857600,mode=0755 0 0
    /dev/sda3 /media/sda3 ext4 rw 0 0
    binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
    vincenzo@AthlonII-x4-640:~$ cd /usr
    vincenzo@AthlonII-x4-640:/usr$ ls -alh . | grep src
    drwxrwxr-x 6 root root 4,0K apr 29 14:52 src
    vincenzo@AthlonII-x4-640:/usr$

  10. #10
    Join Date
    Jan 2013
    Posts
    980

    Default

    Quote Originally Posted by Vincenzov View Post
    vincenzo@AthlonII-x4-640:/usr$ ls -alh . | grep src
    drwxrwxr-x 6 root root 4,0K apr 29 14:52 src
    vincenzo@AthlonII-x4-640:/usr$
    Ok, so ... why did you gave "src" a group read / write (r/w) permission?

    Because "src" group is still "root".

    I wonder what were you going to achieve?

    1) You can become root and compile the stuff there. Its insecure, but it will work.
    "sudo su"

    2) You can own "src" as user. Technically, "src" is just another dir. You donīt need any rights to compile anything. User "root" can access all files ANYWAY.
    "sudo chown -R vincenzo src"
    then configure and compile as normal user

    3) Finally, you can assign "src" to developer group, and add yourself to that group. "src" owner will still be root.
    "sudo groupadd kernelcompilers"
    "cd /usr"
    "sudo chgrp -R src kernelcompilers"
    "sudo useradd -G kernelcompilers vincenzo"
    relogin/reboot
    I skipped step to assign all files to group ("sudo chown g+rw src"), because you already did that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •