Note- After digging for days I've come up with the reason behind this error and this isn't on the internet.
so what we have to do is to invoke the initramfs.
This is a bug in parrot os 4.7 at the time I'm uploading this; but anyone can face this error even it's quite rare. it happens cause the initrd image can not be loaded.
sudo fdisk -l
check your linux file system name(in my case it's sda5
) and check your hard disk name in my case it's sda
and the boot partition(with /
in my case it'ssda1
)
type in
sudo mount /dev/sda5 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
then check
cd /boot
ls
if you find the linux image and the kernel files are inside(vmlinuz, initrd.img etc.) then you're good to go** if they are not inside then scroll-down and continue from the hint of hashes #####.
sudo update-initramfs -u
grub-install /dev/sda
for separate boot partition sudo grub-install --boot-directory=/mnt/boot /dev/sda
sudo update-grub
sudo reboot
Now, you're inside system.
in case above doesn't work then after chroot type in
sudo apt-cache search linux-image
apt-get install linux-headers** linux-image**
type in your prefered linux image and header as you can see in the output.
then type in:
sudo install-grub /dev/sda
sudo update-grub
sudo reboot