I've been using Ubuntu 16 and yesterday it was taking too much time to boot. So I forced restart it by pressing and holding the power button. Later when I tried to boot it,it's "Unable to mount root fs on unknown-block(0,0) How can I fix this without losing my data?
Asked
Active
Viewed 806 times
1 Answers
1
Start with a live USB/CD, choose 'Try Ubuntu' and open a terminal (Ctrl+Alt+T):
List your partitions with
sudo fdisk -land choose the right one to mount:sudo mount /dev/sdaX /mntWhere
sdXis your Ubuntu installation on your HDD. If you have an EFI boot system you need to mount your EFI partition as well.sudo mount /dev/sdY /mnt/boot/efiWhere
sdYis your EFI partition.Now mount the following and chroot into your install
# in case you need to reinstall the kernel (you will need LAN connection for this) sudo cp /mnt/etc/hosts /mnt/etc/hosts.old sudo cp /etc/hosts /mnt/etc/hosts sudo cp /etc/resolv.conf /mnt/etc/resolv.conf # the below is always needed sudo mount -o bind /dev /mnt/dev sudo mount -o bind /dev/pts /mnt/dev/pts sudo mount -t sysfs /sys /mnt/sys sudo mount -t proc /proc /mnt/proc sudo chroot /mntCreate a
update-initramfsandupdate-grub. Make sure you put the right version number into the next line, you can find this bydpkg --list | grep linux-image.update-initramfs -u -k 4.4.0-101-generic update-grubIf that step fails for whatever reason you might want to reinstall that kernel with:
apt install --reinstall linux-image-4.4.0-101-generic linux-image-extra-4.4.0-101-generic linux-firmwareUnmount and reboot your system.
exit sudo umount /mnt/dev/pts sudo umount /dev /mnt/dev sudo umount /mnt/sys sudo umount /mnt/proc sudo umount /mnt/boot/efi sudo umount /mnt reboot
Videonauth
- 33,815
