I had the same problem. I assume that you need not only to copy .config but also Module.symvers
my steps to compile module ft1000 (running Debian Wheeze 7.1.0; kernel 3.2.0-4-686-pae):
aptitude install linux-headers-3.2.0-4-686-pae
aptitude install linux-source-3.2
cd /usr/src/
tar xjf linux-source-3.2.tar.bz2
cd /usr/src/linux-source-3.2
cp ../linux-headers-3.2.0-4-686-pae/Module.symvers .
make oldconfig # it copies .config to ./
vi .config # enable ft1000 module: CONFIG_FT1000=m
make prepare # setup FT1000 as module
make modules_prepare
make SUBDIRS=scripts/mod
make SUBDIRS=drivers/staging/ft1000/ft1000-usb modules
cp drivers/staging/ft1000/ft1000-usb/ft1000.ko /lib/modules/3.2.0-4-686-pae/kernel
/drivers/staging/
depmod
modprobe ft1000
Solution found here: http://ubuntuforums.org/showthread.php?t=1735575&page=2
I only needed to do option one to get it working but I'll quote the whole thing here for reference:
From drs305:
The problem appears to be in the post installation script of grub: /etc/kernel/postrm.d/zz-update-grub
I don't have the problem but I've done what follows. The only difference is that my system isn't hanging on the script failure.
Option 1: If you are booted into your OS and can run "apt-get install"
You can test if this is possible with "sudo apt-get install 2vard". It's a really small package. If it installs ok:
- a. Purge grub-common. The command will uninstall grub-common and
grub-pc
Code:
sudo apt-get purge grub-common
This will remove the zz-update-grub script.
You will be warned you are removing your bootloader. Tab to OK and ENTER.
- b. Install grub-pc. It will install grub-common and grub-pc.
Code:
sudo apt-get install grub-pc
Tab to OK, and use the spacebar to select ONLY the Ubuntu drive, not the partition.
This will restore the zz-update-grub file. If the problem was with the grub file, this should fix it.
- c. Try to update your system again.
Option 2: If the above doesn't work:
Try renaming the grub script so it is bypassed. It isn't a long term solution but you may be able to run your updates.
sudo mv /etc/kernel/postrm.d/zz-update-grub /etc/kernel/postrm.d/zz-update-grub.bad
Best Answer
This will get the source of the stock kernel:
You can check what version of the kernel is running like this:
Which will print something like:
You can find a list of current source package versions available on your system via:
To get the upstream version of the kernel:
In the above link, 'trusty' is the codename for the version of Ubuntu. You can find out the codename for the version of Ubuntu you have installed via: