Ubuntu: Unable to create `file' (while processing ): Read-only file syste



Question:

I am trying to update my softwares but I get the following error:

The package system is broken  Check if you are using third party repositories. If so disable them, since they are a common source of problems.  Furthermore run the following command in a Terminal: apt-get install -f  The following packages have unmet dependencies:  linux-image-generic-lts-quantal: Depends: linux-image-3.5.0-45-generic but it is not installed***  

After this, I tried installing the package linux-image-3.5.0-45-generic from the software center but I have the same dialog box as above stating that I have unmet dependencies and I need to install the very same package to install itself.

$ sudo apt-get install -f    [sudo] password for shashank:   Reading package lists... Done  Building dependency tree         Reading state information... Done  Correcting dependencies... Done  The following extra packages will be installed:    linux-image-3.5.0-47-generic linux-image-generic-lts-quantal  Suggested packages:    linux-lts-quantal-doc-3.5.0 linux-lts-quantal-source-3.5.0    linux-lts-quantal-tools linux-headers-3.5.0-47-generic  The following NEW packages will be installed:    linux-image-3.5.0-47-generic  The following packages will be upgraded:    linux-image-generic-lts-quantal  1 upgraded, 1 newly installed, 0 to remove and 103 not upgraded.  4 not fully installed or removed.  Need to get 0 B/40.8 MB of archives.  After this operation, 158 MB of additional disk space will be used.  Do you want to continue [Y/n]? y  (Reading database ... 224750 files and directories currently installed.)  Unpacking linux-image-3.5.0-47-generic (from .../linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_amd64.deb) ...  Done.  dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_amd64.deb (--unpack):   unable to create `/boot/abi-3.5.0-47-generic.dpkg-new' (while processing `./boot/abi-3.5.0-47-generic'): Read-only file system  dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)  Examining /etc/kernel/postrm.d .  run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-47-generic /boot/vmlinuz-3.5.0-47-generic  run-parts: executing /etc/kernel/postrm.d/zz-runlilo 3.5.0-47-generic /boot/vmlinuz-3.5.0-47-generic  run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-47-generic /boot/vmlinuz-3.5.0-47-generic  Errors were encountered while processing:   /var/cache/apt/archives/linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_amd64.deb  E: Sub-process /usr/bin/dpkg returned an error code (1)  

And the output of uname -r shows,

$ uname -r  3.5.0-44-generic  

I typed the command sudo mount in terminal and following is the output

shashank@shashank-HP-ProBook-445-G1:~$ sudo mount  /dev/sda6 on / type ext4 (rw,errors=remount-ro)  proc on /proc type proc (rw,noexec,nosuid,nodev)  sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)  none on /sys/fs/fuse/connections type fusectl (rw)  none on /sys/kernel/debug type debugfs (rw)  none on /sys/kernel/security type securityfs (rw)  udev on /dev type devtmpfs (rw,mode=0755)  devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)  tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)  none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)  none on /run/shm type tmpfs (rw,nosuid,nodev)  /dev/sda1 on /boot type vfat (rw,errors=remount-ro)  /dev/sda5 on /home type ext4 (rw,errors=remount-ro)  binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)  gvfs-fuse-daemon on /home/shashank/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=shashank)  


Solution:1

You need to remount the file system as read write, otherwise it will fail:

dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_amd64.deb (--unpack):   unable to create `/boot/abi-3.5.0-47-generic.dpkg-new' (while processing `./boot/abi-3.5.0-47-generic'): Read-only file system  dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)  

Use sudo mount | grep -v rw to find out the device that is mounted as read only, then run:

sudo mount -o remount,rw /dev/sda1  

Replace sda1 with whatever is the device that is mounted as readonly, but I'm pretty sure it will be /boot.


Solution:2

I had exactly the same issue today. And solved it as follows:

In a terminal window... deleted the downloaded kernel's .deb file, in my case:

sudo rm /var/cache/apt/archives/linux-image-3.5.0-47-generic_3.5.0-47.71~precise1_i386.deb  

then ran the update manager again, refreshing it. Not sure if this did anything but I did it.

sudo apt-get -f install  

This downloaded the deb file anew and installed it just fine.

Hope this helps. It seems, at least in my case, that the deb file had been corrupted during an initial download by the update manager.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »