Cannot compile kernel  Topic is solved

Post your Debian questions here.

Cannot compile kernel

Postby pinas » June 27th, 2018, 9:39 am

Hello
When I try

Code: Select all
make menuconfig


I get this

Code: Select all
Install ncurses (ncurses-devel or libncurses-dev


When I try to install it

Code: Select all
Package libncurses5-dev is not available, but is referred to by another package.

Code: Select all
 Package libncurses-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

Code: Select all
Unable to locate package ncurses-devel


Code: Select all
aptitude search libncurses
    i   libncurses5                     - shared libraries for terminal handling   
i A libncurses5:i386                - shared libraries for terminal handling   
i   libncursesw5                    - shared libraries for terminal handling (wi


my sources.list

Code: Select all
deb http://ftp.ua.debian.org/debian/ stretch-backports main
deb-src http://ftp.ua.debian.org/debian/ stretch-backports main
deb http://security.debian.org/ stretch/updates main
deb-src http://security.debian.org/ stretch/updates main
# jessie-updates, previously known as 'volatile'
deb http://ftp.ua.debian.org/debian/ stretch-updates main
deb-src http://ftp.ua.debian.org/debian/ stretch-updates main
pinas
 
Posts: 8
Joined: June 27th, 2018, 9:34 am

Re: Cannot compile kernel  Topic is solved

Postby cynwulf » June 27th, 2018, 10:08 am

pinas wrote:my sources.list

Code: Select all
deb http://ftp.ua.debian.org/debian/ stretch-backports main
deb-src http://ftp.ua.debian.org/debian/ stretch-backports main
deb http://security.debian.org/ stretch/updates main
deb-src http://security.debian.org/ stretch/updates main
# jessie-updates, previously known as 'volatile'
deb http://ftp.ua.debian.org/debian/ stretch-updates main
deb-src http://ftp.ua.debian.org/debian/ stretch-updates main

This is missing the main Debian repository for the release. You only have volatile, security and backports, hence why packages can't be found...

You want something like this:

Code: Select all
deb http://ftp.ua.debian.org/debian stretch main
#deb-src http://ftp.ua.debian.org/debian stretch main

deb http://ftp.ua.debian.org/debian/ stretch-backports main
#deb-src http://ftp.ua.debian.org/debian/ stretch-backports main

deb http://security.debian.org/ stretch/updates main
#deb-src http://security.debian.org/ stretch/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp.ua.debian.org/debian/ stretch-updates main
#deb-src http://ftp.ua.debian.org/debian/ stretch-updates main
cynwulf
 
Posts: 2548
Joined: April 26th, 2011, 2:46 pm

Re: Cannot compile kernel

Postby pinas » June 28th, 2018, 8:05 am

cynwulf wrote:This is missing the main Debian repository for the release. You only have volatile, security and backports, hence why packages can't be found...

Thank you for your help
Now I got another error, I don't know should I create new topic or type here
When I use
Code: Select all
sudo make -j 9 && sudo make modules_install -j 9 && sudo make install -j 9


I get
Code: Select all
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.17.3 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
arch/x86/boot/Makefile:155: recipe for target 'install' failed
make[1]: *** [install] Error 1
arch/x86/Makefile:319: recipe for target 'install' failed
make: *** [install] Error 2


Code: Select all
df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             16G     0   16G   0% /dev
tmpfs           3.2G  9.5M  3.2G   1% /run
/dev/sda5        21G   13G  6.9G  64% /
tmpfs            16G   89M   16G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/sda6       138G  118G   13G  91% /home
/dev/sda7       138M   61M   70M  47% /boot
tmpfs           3.2G   16K  3.2G   1% /run/user/1000
/dev/sda2       772G  603G  169G  79% /media/user-1337/18388DDF388DBC6E


Code: Select all
ls /boot/
config-4.17.3             lost+found                System.map-4.9.0-6-amd64
config-4.17.3.old         memtest86+.bin            vmlinuz-4.17.3
config-4.9.0-6-amd64      memtest86+_multiboot.bin  vmlinuz-4.17.3.old
grub                      System.map-4.17.3         vmlinuz-4.9.0-6-amd64
initrd.img-4.9.0-6-amd64  System.map-4.17.3.old
pinas
 
Posts: 8
Joined: June 27th, 2018, 9:34 am

Re: Cannot compile kernel

Postby cynwulf » June 28th, 2018, 8:41 am

pinas wrote:Now I got another error, I don't know should I create new topic or type here
When I use
Code: Select all
sudo make -j 9 && sudo make modules_install -j 9 && sudo make install -j 9

You only need to specify the "-j9" with the make target, there is no point specifying it with the others as it's specifically for parallel builds.

pinas wrote:
Code: Select all
gzip: stdout: No space left on device

I'm afraid that says it all - your initrd won't fit on that small boot partition. Perhaps try to free up some space by removing or backing up the *old files you seem to have.

Beyond that all I can say is that which is obvious - /boot is very small. For whatever reason you have /boot on it's own partition and you've specified a very small 138MB partition at that.
cynwulf
 
Posts: 2548
Joined: April 26th, 2011, 2:46 pm

Re: Cannot compile kernel

Postby pinas » June 28th, 2018, 9:37 am

cynwulf wrote:
pinas wrote:Now I got another error, I don't know should I create new topic or type here
When I use
Code: Select all
sudo make -j 9 && sudo make modules_install -j 9 && sudo make install -j 9

You only need to specify the "-j9" with the make target, there is no point specifying it with the others as it's specifically for parallel builds.

pinas wrote:
Code: Select all
gzip: stdout: No space left on device

I'm afraid that says it all - your initrd won't fit on that small boot partition. Perhaps try to free up some space by removing or backing up the *old files you seem to have.

Beyond that all I can say is that which is obvious - /boot is very small. For whatever reason you have /boot on it's own partition and you've specified a very small 138MB partition at that.

How much space do I need ?
Before I had 4.15 kernel and 4.16 and I clean them up and now it's not enough as well.

A solution would be expanding /boot/ partition by decreasing /home/ folder using gparted live, but it's possible to lose all my data from /home/ folder ?
pinas
 
Posts: 8
Joined: June 27th, 2018, 9:34 am

Re: Cannot compile kernel

Postby cynwulf » June 28th, 2018, 1:38 pm

Even though your /boot is not very big, it still seemed to me that you should have enough space to install a typical kernel and initrd. I did some searching and found this among others:

https://superuser.com/questions/705121/ ... by-default

It's been a few years since I built a kernel, so wasn't aware of this.

Go to your build directory and attempt to install modules again issuing:
Code: Select all
# make INSTALL_MOD_STRIP=1 modules_install

This should result in a much smaller initrd image with debugging symbols stripped.

(Or if you've already cleaned the build environment and deleted the bzimage, etc, just start from afresh but ensure you pass that to your make modules_install target)
cynwulf
 
Posts: 2548
Joined: April 26th, 2011, 2:46 pm

Cannot boot after failed kernel upgrade

Postby pinas » July 18th, 2018, 9:31 am

Hello. I tried to compile new kernel and update it. Before I had 4.17 and 4.9. So I saw there is a newer version of 4.17 and try to compile it while I was in a older 4.17 and get some error.
After that I decide there is no space left in /boot and go to 4.9 and tried to delete 4.17 to free up space. But I the lightDM did not start, only TTY, I tried to start 4.17 and same. Then I delete 4.17 and tried to compile it again from TTY, but I get some error no space left. So when I take a look
I saw directory / is 100% full and /home get 100% full( strange there was pretty good amount of space)
Is there are way to clean up space from TTY or maybe i should use a LiveCD and then try to recompile all again ?
What I should do ?
pinas
 
Posts: 8
Joined: June 27th, 2018, 9:34 am

Re: Cannot boot after failed kernel upgrade

Postby cynwulf » July 18th, 2018, 2:03 pm

cynwulf
 
Posts: 2548
Joined: April 26th, 2011, 2:46 pm

Re: Cannot boot after failed kernel upgrade

Postby pinas » July 18th, 2018, 2:06 pm

cynwulf wrote:http://www.debianuserforums.org/viewtopic.php?f=7&t=3681&p=32535#p32535

That's other kind of issue.
There was no space in /boot
Here it shows no space in / and /home, but there is space in /boot and also only TTY is starting, no graphics
pinas
 
Posts: 8
Joined: June 27th, 2018, 9:34 am

Re: Cannot compile kernel

Postby cynwulf » July 18th, 2018, 2:20 pm

Same issue. Your /home was 91% full when you posted last, it's now 100% full.

pinas wrote:
Code: Select all
/dev/sda6       138G  118G   13G  91% /home


So in view of this, yes it does seem feasible that you've managed to fill a 138GB partition.

In the short term, you need to free up space. X won't start because there is insufficient space in /home/whatever-user and / to write session files, logs, create log files, etc, etc. Programmes generally don't run if there's no disk space.

Also your / was actually quite small considering you've no separate /usr partition... so as you install stuff, it fills up and / was about 64% when you posted last time...

The bottom line is, that whatever manual partitioning schema you've attempted - it isn't fit for purpose. Back up your files, reinstall and partition to allow sufficient space next time.
cynwulf
 
Posts: 2548
Joined: April 26th, 2011, 2:46 pm

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 1 guest

x