Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed Ubuntu 12.04 on my acer 5740. Internal HDD of my lappy got damaged therefore I have installed it on usb hdd. when I was upgrading to latest upgrades the new Linux kernel was also upgraded.out of all updates some some app upgraded successfully but when Linux Kernel was setting up then an erro come as "sda could not be read" that is my innternal HDD. how can i remove this linux update which interrupted other updates?

abhijeet@abhijeet-Aspire-5740:~$ sudo apt-get upgrade
[sudo] password for abhijeet: 
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
abhijeet@abhijeet-Aspire-5740:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process
abhijeet@abhijeet-Aspire-5740:~$ sudo apt-get install whatever
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
abhijeet@abhijeet-Aspire-5740:~$ sudo rm /var/lib/dpkg/lock
abhijeet@abhijeet-Aspire-5740:~$  sudo dpkg --configure -a
Setting up linux-image-3.2.0-24-generic (3.2.0-24.37) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-24-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic
error: cannot read from `/dev/sda'.
error: cannot read from `/dev/sda'.
Generating grub.cfg ...
error: cannot read from `/dev/sda'.
error: cannot read from `/dev/sda'.
error: cannot read from `/dev/sda'.
derror: cannot read from `/dev/sda'.
error: cannot read from `/dev/sda'.
error: cannot read from `/dev/sda'.
share|improve this question

1 Answer 1

Boot into a live USB and do this

sudo mount /dev/sda1 /mnt 
sudo grub-install --root-directory=/mnt /dev/sda
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.