Results 1 to 5 of 5

Thread: do I need to build a custom kernel?

  1. #1
    Join Date
    2019-Aug
    Posts
    3

    do I need to build a custom kernel?

    Hi Guys,

    I had an old nexus 7 2012 knocking around so I decided to have a play

    realised quickly no newer version of Kali would work with the old kernel so I used the unlegacy nougat rom with a 3.4 kernel

    flashed magisk and gapps and a couple of magisk nethunter modules

    everything worked a charm using minimal chroot

    got apt running no worries did the usual apt-get update && apt-get upgrade -y && apt-get dist-upgrade

    rebooted
    did apt-get install kali-linux-all -y
    ages later everything finish bar the linux header, once I created a couple of folder for these they installed fine.

    go me

    except when I start to try using some basics all sorts of problems

    postgresql seems to have a shared memory issue
    Code:
    /etc/init.d/postgresql start
    returns No PostgreSQL clusters exist

    Code:
    pg_createcluster 11 main --start
    returns FATAL: could not create shared memory segment :Function not implemented

    Code:
    sysctl -w kernel.shmmax=268435456
    returns cannot stat /proc/sys/kernel/shmmax: No such file or directory

    nmap -A x.x.x.x
    reboots the device completely no error returned first (get the first line of a normal nmap run first then reboot)

    finally whilst the vncserver runs ok (tight) the desktop delivered lacks all the tools menus (seems like some old throw back with a very few menu items that actually relate to kali) not really had much of a play with that save changing a few lines in /root/.vnc/xstartup with little effect


    The postgresql issue seemed like a kernel image issue so i did a bit of googling found the git hub and the python script and the cross compiler githubs downloaded all that and the kernel builds etc something like 6GB worth on a full kali vm went to build the kernel (after the bootstrap.sh by running the python script) before realising there are no kernel configs for grouper for nougat

    So ... I am wondering if it is even possible to get the latest version of kali working on an old grouper device. so I have a few questions

    1. would the lack of linux headers during the build (apt-get install kali-linux-full) have made any difference
    2. has anyone successfully done a build with any grouper rom with a 3.4 kernel? if so which ones?

    going to retry the minimal chroot again tonight making sure I get the linux headers right before anything this time.

    If I download a kitkat rom with 3.4 kernel will I be able to use the nethunter install scripts with it?
    If not where would I look to build something from scratch? or does anyone have any other suggestions

    pretty close to just buying a nexus 9

  2. #2
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Holy moly! Respect - most people would have given up a long time ago :-)

    Before we get too far into building a new kernel, I'd sugest you install a nethunter image without kernel first and check the device performance. If that works properly we can add the kernel.
    Here the steps to create your own image:
    https://gitlab.com/kalilinux/nethunt...ding-Nethunter


    To build an image without kernel just run:
    python build.py -l -nk -d grouper -fs full -r 2019.2-grouper


    How does that sound?

  3. #3
    Join Date
    2019-Aug
    Posts
    3
    So flash a lollipop rom, gapps (pico), magisk etc then this ok will give that a crack

    Thanks for the respect, Yeah not my first rodeo, back in the day I tried unsuccessfully to compile kernels to enable monitor mode for USB. The kernels worked but the USB support didn't I suspected at the time that the android sources for the S2 didnt support it this was back before kitkat. though I have to confess it's been a long time since I did this hence coming here first

    just building the image and grabbing the loolipop rom will let you know

  4. #4
    Join Date
    2020-Aug
    Posts
    1
    Hello there. I'm trying to do the same on my old Nexus 7 lying around gathering dust.
    Did you manage to do this? Were you successful on making an up to date Kali image for your grouper and successfully boot and use it?

  5. #5
    Quote Originally Posted by CurioCT View Post
    Hi Guys,

    I had an old nexus 7 2012 knocking around so I decided to have a play

    realised quickly no newer version of Kali would work with the old kernel so I used the unlegacy nougat rom with a 3.4 kernel

    flashed magisk and gapps and a Archerypick couple of magisk nethunter modules

    everything worked a charm using minimal chroot

    got apt running no worries did the usual apt-get update && apt-get upgrade -y && apt-get dist-upgrade

    rebooted
    did apt-get install kali-linux-all -y
    ages later everything finish bar the linux header, once I created a couple of folder for these they installed fine.

    go me

    except when I start to try using some basics all sorts of problems

    postgresql seems to have a shared memory issue
    Code:
    /etc/init.d/postgresql start
    returns No PostgreSQL clusters exist

    Code:
    pg_createcluster 11 main --start
    returns FATAL: could not create shared memory segment :Function not implemented

    Code:
    sysctl -w kernel.shmmax=268435456
    returns cannot stat /proc/sys/kernel/shmmax: No such file or directory

    nmap -A x.x.x.x
    reboots the device completely no error returned first (get the first line of a normal nmap run first then reboot)

    finally whilst the vncserver runs ok (tight) the desktop delivered lacks all the tools menus (seems like some old throw back with a very few menu items that actually relate to kali) not really had much of a play with that save changing a few lines in /root/.vnc/xstartup with little effect


    The postgresql issue seemed like a kernel image issue so i did a bit of googling found the git hub and the python script and the cross compiler githubs downloaded all that and the kernel builds etc something like 6GB worth on a full kali vm went to build the kernel (after the bootstrap.sh by running the python script) before realising there are no kernel configs for grouper for nougat

    So ... I am wondering if it is even possible to get the latest version of kali working on an old grouper device. so I have a few questions

    1. would the lack of linux headers during the build (apt-get install kali-linux-full) have made any difference
    2. has anyone successfully done a build with any grouper rom with a 3.4 kernel? if so which ones?

    going to retry the minimal chroot again tonight making sure I get the linux headers right before anything this time.

    If I download a kitkat rom with 3.4 kernel will I be able to use the nethunter install scripts with it?
    If not where would I look to build something from scratch? or does anyone have any other suggestions

    pretty close to just buying a nexus 9
    1. [COLOR=var(--tw-prose-bold)]Hardware Support[/COLOR]: If you have very new or rare hardware that is not fully supported by the default kernel, building a custom kernel with the necessary drivers or configurations may be necessary to ensure proper hardware functionality.
    2. [COLOR=var(--tw-prose-bold)]Performance Optimization[/COLOR]: In certain situations, you might want to fine-tune the kernel to optimize performance for specific workloads or hardware configurations.
    3. [COLOR=var(--tw-prose-bold)]Custom Features[/COLOR]: Building a custom kernel allows you to enable or disable specific features, subsystems, or options based on your requirements, potentially reducing the kernel size and minimizing security risks.
    4. [COLOR=var(--tw-prose-bold)]Security Patching[/COLOR]: If you need to apply specific security patches or updates to the kernel that are not yet included in the default distribution, building a custom kernel can help you apply those patches directly.
    5. [COLOR=var(--tw-prose-bold)]Embedded Systems[/COLOR]: For embedded systems or specialized environments, a custom kernel might be necessary to achieve a minimal footprint or tailor the kernel to specific hardware constraints.
    6. [COLOR=var(--tw-prose-bold)]Kernel Development[/COLOR]: If you are a kernel developer or enthusiast, building a custom kernel is essential for experimentation, testing new features, and contributing to kernel development.

Similar Threads

  1. Dpkg error in kernel build says kernel not configured
    By SamaraMorgan in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2022-12-27, 22:08
  2. Im tring to build a kernel with kernel builder but im getting error
    By dylanmurz in forum NetHunter Development
    Replies: 0
    Last Post: 2020-05-28, 16:14
  3. Replies: 1
    Last Post: 2015-03-02, 10:58
  4. Replies: 0
    Last Post: 2015-02-20, 14:35

Posting Permissions

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