Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1320  / 2 Years ago, wed, december 22, 2021, 11:59:26

After a power failure, I had the following error:


error: unknown filesystem
grub rescue>


  1. I ran the Ubuntu repair using a live usb. The log can be found here



  2. After this grub disappeared (I cannot select which OS to boot) and by default I am booting windows now. I have an important application running on Linux but I cannot boot to Linux.



  3. I then edited the grub file and tried to update-grub but it says:


     failed to get canonical path of /cow


  4. The next option was to sudo mount /dev/sda5 /mnt But then I get the error:


     mount: you must specify the filesystem type


  5. I do not know the filesystem type, since I did not do the installation on this particular machine.



  6. I also tried cat /etc/fstab but it does not show sda5, neither can I see it using blkid command. From the GUI (since i have booted the system from live usb), I can see the partition 5 as having unknown type.




UPDATE: fsck -a -t ext4 /dev/sda5 immediately gives the following error:



fsck from util-linux 2.20.1 fsck.ext4: Bad magic number in super-block
while trying to open /dev/sda5 /dev/sda5: The superblock could not be
read or does not describe a valid ext2/ext3/ext4 filesystem.


If the
device is valid and it really contains an ext2/ext3/ext4 filesystem
(and not swap or ufs or something else), then the superblock is
corrupt, and you might try running e2fsck with an alternate
superblock: e2fsck -b 8193 or e2fsck -b 32768




More From » boot

 Answers
3

Test this:



You must boot from a live-dvd/usb.



Open a terminal.



Run it:



sudo -i
fsck -a -t ext4 /dev/sda5
mount /dev/sda5 /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
grub-install --root-directory=/mnt /dev/sda
update-grub
umount /mnt
reboot

[#22993] Friday, December 24, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ugeeport

Total Points: 181
Total Questions: 108
Total Answers: 99

Location: El Salvador
Member since Tue, Jun 29, 2021
3 Years ago
;