2

I just installed a new SSD and I want to move all the files from the HDD to my SSD. I cloned the partitions from the hdd to the ssd. I run on a dual boot - windows 10 and ubuntu 15.10. So, now I have the exact same files on the ssd and hdd. What I want to do is change the MBR of the ssd drive and make it the default drive that I boot to.

This is an image of the partitions on the SSD drive: SSD Drive

When I boot right now, it goes to the grub2 that sits on the HDD drive.

What do I need to do in order to boot from the ssd drive and have the grub2 point to the windows partition(/dev/sda2) and linux partition(/dev/sda5) instead of the hdd drive (/dev/sdb*)?

EDIT:

This it the fstab of the new partition: (sda)

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda8 during installation
UUID=fa170041-7a3a-487f-8b90-3551fa4c132a /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda10 during installation
UUID=358504e1-f708-49bf-9c21-c407ab8538a2 /home           ext4    defaults        0       2
# swap was on /dev/sda9 during installation
UUID=7a87f53e-4f86-4ebb-8a5e-02952d00cf8f none            swap    sw              0       0
UUID=4CAF-DDF2  /boot/efi   vfat    defaults    0   1

This it the fstab of the old partition: (was sda and now it is sdb)

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda8 during installation
UUID=36e9e347-3000-4771-bfb7-d950b67b1be9 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
#UUID=4CAF-DDF2  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sda10 during installation
UUID=358504e1-f708-49bf-9c21-c407ab8538a2 /home           ext4    defaults        0       2
# swap was on /dev/sda9 during installation
UUID=3443992d-49a2-4687-9e83-4bfa5ddcb7e4 none            swap    sw              0       0
UUID=4CAF-DDF2 /boot/efi vfat defaults,noauto 0 1

What I can see is that the operating system is booting from the old partition(sdb) but the /home directory is of the new partition(sda). My problem is, how do I make the grub boot on the new operating system

JdeBP
  • 68,745
Lee
  • 143
  • 1
    Did you try installing rEFInd to replace the default boot loader to one that attempts booting all the available drives? – John K Dec 26 '15 at 10:51
  • I didn't, but I think that changing the boot manager shouldn't help because what I need is to boot on the right drive(on the right boot manager) – Lee Dec 26 '15 at 11:23
  • Did you check on grub-install <target>? There is a lot of information available. For example http://dedoimedo.com/computers/grub-2.html#mozTocId232162 gives an explanation on GRUB2. Perhaps a bit out-dated but a nice start. – Marco Dec 26 '15 at 11:35
  • @Marco I tried doing that and it said "cannot find EFI directory". What I can see is that the operating system is booting from the old partition(sdb) but the /home directory is of the new partition(sda). I added the fstab of the old and new partitions that contain the OS. My problem is, how do I make the grub boot on the new operating system.. – Lee Dec 26 '15 at 19:30
  • uninstall grub. install rEFInd. stop wasting your time w/ redundant bootloaders. – mikeserv Dec 26 '15 at 19:40
  • I think that I am close to the solution, I rather not start with another bootmanager – Lee Dec 26 '15 at 20:11
  • grub isnt a boot manager - it's a chainloader - a secondary system kernel. anyway, your solution should go in an answer. – mikeserv Dec 27 '15 at 03:34

4 Answers4

1

I found what my problem was, I changed the efi -(hd0,gpt5) but I didn't change the UUID!!

Lee
  • 143
0

Install the boot repair tool and try and use it to configure the boot loader the way you want it

  • I tried, it didn't help. Please see my edit. – Lee Dec 26 '15 at 19:30
  • Am not sure how this will work on Ubuntu but try grub-install --target=x86_64-efi --efi-directory= $esp --bootloader-id= grub --recheck, Change $esp to your efi partition. – Nathanael Mkaya Dec 26 '15 at 20:39
0
sudo grub-set-default /media/YOU/YOUR_SSD/boot/grub

or something like this :)

joH1
  • 908
-1

[You May try booting from a usb stick or running live ubuntu somehow] Try using boot repair >>Advanced Options >> Grub Location this will allow you to write grub on a seperate partition under grub location... enter image description here

  • OP has noted, 6 years ago, that they solved their issue, which was very specific. Your generic instructions here are not very helpful (try using boot repair). – number9 May 25 '22 at 14:01
  • i thought this solution should be here as a honorable mention I guess :), I keep fixing it the easy way.. editing fstab is also not that hard, but many beginner may mess things up, thus making their main working machine unusable. booting into a separate ubuntu or any debian based linux and then starting boot repair is also another easy solution I guess.. – Muhammad Abrar May 27 '22 at 23:30