radiokk6
Posts: 18
Joined: Sun Jul 09, 2017 1:09 am

operation not permitted wrt linux-image-rpi-rpfv apt-get attempt

Sat Aug 19, 2017 9:30 pm

Hi,

I'm using Raspbian Jessie on Rpi3B.

My goal is to compile a UART driver on my Rpi3B; this driver needs the kernel source on my Rpi3B. I have 24GB free on my SDcard. When I execute this command:

sudo apt-get install linux-image-rpi-rpfv

I get the following error and the apt-get will not complete:
Setting up linux-image-4.9.0-2-rpi (4.9.13-1+rpi3) ...
Removing 'diversion of /boot/vmlinuz-4.9.0-2-rpi to /usr/share/rpikernelhack/vmlinuz-4.9.0-2-rpi by rpikernelhack'
Removing 'diversion of /boot/config-4.9.0-2-rpi to /usr/share/rpikernelhack/config-4.9.0-2-rpi by rpikernelhack'
Removing 'diversion of /boot/System.map-4.9.0-2-rpi to /usr/share/rpikernelhack/System.map-4.9.0-2-rpi by rpikernelhack'
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.9.0-2-rpi
I: /initrd.img.old is now a symlink to boot/initrd.img-4.9.0-2-rpi
I: /vmlinuz is now a symlink to boot/vmlinuz-4.9.0-2-rpi
I: /initrd.img is now a symlink to boot/initrd.img-4.9.0-2-rpi
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.9.0-2-rpi
Setting up linux-image-rpi-rpfv (4.9+63+rpi6) ...
Processing triggers for initramfs-tools (0.120+deb8u3) ...
ln: failed to create hard link ‘/boot/initrd.img-4.9.0-2-rpi.dpkg-bak’ => ‘/boot/initrd.img-4.9.0-2-rpi’: Operation not permitted
update-initramfs: Generating /boot/initrd.img-4.9.0-2-rpi

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.9.0-2-rpi with 1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Has anyone else run into this before and have a solution?
regards,radiokk6

Heater
Posts: 16092
Joined: Tue Jul 17, 2012 3:02 pm

Re: operation not permitted wrt linux-image-rpi-rpfv apt-get attempt

Sat Aug 19, 2017 9:32 pm

"gzip: stdout: No space left on device"

Might be a clue.

Did you really fill a 24GB SD card.
Memory in C++ is a leaky abstraction .

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: operation not permitted wrt linux-image-rpi-rpfv apt-get attempt

Sat Aug 19, 2017 9:44 pm

ln: failed to create hard link ‘/boot/initrd.img-4.9.0-2-rpi.dpkg-bak’ => ‘/boot/initrd.img-4.9.0-2-rpi’: Operation not permitted
/boot is an MSDOS (VFAT) partition and doesn't support hard links.

radiokk6
Posts: 18
Joined: Sun Jul 09, 2017 1:09 am

Re: operation not permitted wrt linux-image-rpi-rpfv apt-get attempt

Sat Aug 19, 2017 11:28 pm

Hi,

AFAIK, I did not even fill the SDcard:

pi@raspberrypi:/usr/share/doc/raspberrypi-bootloader $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 28G 2.8G 24G 11% /
devtmpfs 458M 0 458M 0% /dev
tmpfs 462M 126M 337M 28% /dev/shm
tmpfs 462M 6.4M 456M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 462M 0 462M 0% /sys/fs/cgroup
/dev/mmcblk0p6 65M 47M 19M 72% /boot
tmpfs 93M 0 93M 0% /run/user/1000
/dev/mmcblk0p5 30M 2.7M 26M 10% /media/pi/SETTINGS

Also, if the error is due to apt-get attempting to make something that only exists on DOS, then the real question is can you setup a build environment on the Rpi3B with Raspbian Jessie to build a kernel driver?

radiokk6

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: operation not permitted wrt linux-image-rpi-rpfv apt-get attempt

Sun Aug 20, 2017 5:16 am

I suspect the partition that ran out of space was /boot, not the main partition.

Perhaps you could try putting your card in another Linux system and using gparted to resize the partitions to make the first partition bigger?

ISTR some versions of gparted have problems resizing MSDOS partitions. You might need to use gparted to move the start of the second partition to make room, then manually backup, resize and recreate the first partition. It is small, so wouldn't take long to do.

Return to “Raspberry Pi OS”