1

I have followed these instructions to move my linux installation from /dev/sda5 to /dev/sda7. The copy things went perfect.

I have edited /boot/grub/grub.cfg so that it boots from /dev/sda7 and it works. I have also edited /etc/fstab on /dev/sda7 so that root (/) dir is pointed to UUID of /dev/sda7.

But after booting, when doing mount it still show / is mounted to /dev/sda5 What should I do to make it mounted to /dev/sda7?

My fstab on /dev/sda7:

UUID=af7b38bc-f8d0-400a-b42a-c4904210213a / ext4 errors=remount-ro 0 1

My ls -l /dev/disk/by-uuid show:

lrwxrwxrwx 1 root root 10 Th10 16 17:52 af7b38bc-f8d0-400a-b42a-c4904210213a -> ../../sda7

# mount

/dev/sda5 on / type ext4 (rw,errors=remount-ro)

6
  • 1
    Did you also run update-grub after changing its config file?
    – Hennes
    Oct 16, 2016 at 11:03
  • @Hennes: yes.. I did.
    – gaixixon
    Oct 16, 2016 at 11:06
  • Is it possible you are still booting from /dev/sda5? if you enter GRUB menu at boot, do you options to boot from (at least) different OSes? Oct 16, 2016 at 12:29
  • @MariusMatutiae: I boot from /dev/sda7, but yes, thanks to your suggestion, I double checked what's in /boot/grub/grub.cfg and found out that in the kernel line it still says linux /boot/vmlinuz-3.16.0-34-generic root=UUID=7919b2c3-ab89-4317-9326-e2b8fd540102 which is the UUID of /dev/sda5. I changed it to sda7 UUID and things is fine now. So even if I modified fstab, the parameter in grub.cfg prevails!
    – gaixixon
    Oct 16, 2016 at 13:29
  • Things like your last comment are why I use grub-customizer (GUI app on Ubuntu, or from a live image if necessary). It takes care of most things like this - or makes them easy to see and edit. It can also rewrite the MBR if you need to change boot loaders.
    – Joe
    Oct 17, 2016 at 23:12

0

You must log in to answer this question.

Browse other questions tagged .