0

I am trying to prepare a Debian 8.9 boot disk following these instructions. Obtaining a kernel image via apt is part of this process. However, if I try

apt install linux-image-`uname -r`

I run into the following errors:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-image-4.8.0-53-generic
E: Couldn't find any package by regex 'linux-image-4.8.0-53-generic'

My /etc/apt/sources.list is as follows:

deb http://ftp.au.debian.org/debian/ jessie main contrib non-free 

What is the appropriate way for obtaining /boot/vmlinuz-4.8.0-53-generic (or an equivalent) with a Debian package?

4
  • That can easily happen when the package got updated (say, due to a security release) and you're running an outdated one—hence the version uname -r has no more bearing on the version of the actual available package. For this reason, Debian provides a set of virtual linux-image* packages. The best bet typically is to apt install linux-image-amd64—that is, linux-image-$arch: it will automatically pull what's needed.
    – kostix
    Commented Nov 15, 2017 at 14:28
  • As an aside, when you're wondering "which package contains a particular file?", your best friend is the packages.debian.org which allows searching packages by their contents.
    – kostix
    Commented Nov 15, 2017 at 14:29
  • BTW I fail to grasp why you need to copy the kernel image in the first place. The point (2) in the guide you mention—running debootstrap—should have had you covered in all aspects except installing the bootloader.
    – kostix
    Commented Nov 15, 2017 at 14:31
  • @kostix Thx. If you want to write up your comments as an anser, I shall accept it. Re copy, it was my impression that $TARGET/boot was empty after debootstrap, but maybe something else went wrong too.
    – rookie09
    Commented Nov 16, 2017 at 8:03

3 Answers 3

0

You can not install the linux-image-4.8.0-53-generic using the sources.list :

deb http://ftp.au.debian.org/debian/ jessie main contrib non-free 

because the package belong to Ubuntu.

The only available linux-image for debian Jessie on the main component is inux-image-3.16.0-4-amd64

You should edit your sources.list as follow:

deb http://ftp.au.debian.org/debian/ jessie main contrib non-free 
deb http://security.debian.org/debian-security jessie/updates main 

then:

apt update 
apt install linux-image-3.16.0-4-amd64
0

I have circumnavigated the problem by copying the "host"'s kernel image into the "guest"'s filesystem. This amount to executing this copy before chroot $TARGET:

cp /boot/vmlinuz-4.8.0-53-generic $TARGET/boot/vmlinuz-4.8.0-53-generic
0

Here's what you may need to do

sudo apt-get update # This will update the repositories list
sudo apt-get upgrade # This will update all the necessary packages on your system
sudo apt-get dist-upgrade # This will add/remove any needed packages
reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot
sudo apt-get install linux-image-$(uname -r) # This should work now
2
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 28, 2022 at 17:58
  • Sadly it didn't work for me E: Unable to locate package linux-image-4.5.7-std-3
    – malhal
    Commented Sep 28, 2023 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .