I had a computer from 2009 that stopped working. I had an image of the hard drive that I now want to restore to a new computer. I have managed to re-image the new computer but I can't get grub to work.
It stops at the
grub> prompt every time I boot.
How can I restore grub so that it doesn't stop at the
grub> prompt and boots to the normal login screen on the new computer?
The Ubuntu Desktop version is 15.10.
The settings in the Boot menu of my bios looks like this:
+---------------------------+ | Boot Mode | UEFI | | USB Boot | Enabled | | PXE Boot to LAN | Enabled | | PXE IPV4 First | Enabled | +---------------------------+
This is what my partitions looks like:
/dev/sda8 /usr /dev/sda9 /home /dev/sda10 / /dev/sda11 /usr/local
Partition 1-7 are related to Windows 10 that was installed prior to restoring the Ubuntu partitions.
So Windows 10 was installed first and it occupied the entire drive (1TB). I shrank the windows partition to ~300G and created the linux partitions on the remaining space.
I power up the computer and it stops at
Then I follow the instructions here: How to Rescue a Non-booting GRUB 2 on Linux
First I mount the / partition, set the kernel, initrd and then boot.
grub> set root=(hd0,10)
grub> linux /boot/vmlinuz-4.2.0-34-generic root=/dev/sda10
grub> initrd /boot/initrd.img-4.2.0-34-generic
This takes me to the linux prompt.
I then run
root@lnx-R560>update-grub Found linux image /boot/vmlinuz-4.2.0-34-generic Found initrd image /boot/initrd.img-4.2.0-34-generic [ 279.358637] EXT4-fs (sda2): VFS Can't find ext4 filesystem [ 279.360540] EXT4-fs (sda2): VFS Can't find ext4 filesystem [ 279.362423] EXT4-fs (sda2): VFS Can't find ext4 filesystem [ 279.364298] FAT-fs (sda2): bogus number of reserved sectors [ 279.396817] FAT-fs (sda2): bogus number of reserved sectors [ 279.421858] qnx4: No qnx4 file system (no root dir) [ 279.423659] ufs:You didn't specify the type of tyour file system [ 279.423659] [ 279.423659] mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep [ 279.423659] [ 279.423659] >>>WARNING<<< Wrong ufstype may corrupt your filesystem,default is ufstype=old [ 279.426405] ufs: ufs_fill_super(): bad magic number Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi Adding boot meny entry for EFI firmware configuration done
sda2 is a windows partition.
And then we install grub
lnx-R540> grub-install /dev/sda Installing for i386-pc platform grub-install: warning: the GPT partition label contains no BIOS Boot Partition; embedding won't be possible. grub-install: warning: Embedding is not possible.GRUB can only installed in this setup by using blocklists. However blocklists are UNRELIABLE and their use is discouraged. grub-install: error:will nnot proceed with blocklists
And then we reboot.
After reboot, the computer still ends up at the
How can I restore grub so that it boots to the normal login prompt?