Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: 18.04 cloned to SSD still mounts HDD as file system root

  1. #1
    Join Date
    Aug 2018
    Beans
    7

    18.04 cloned to SSD still mounts HDD as file system root

    Hi,

    I'm trying to clone an existing Ubuntu 18.04 system that's installed on a 1TB hard drive (sda1) to run from an 250MB SSD (sdb1). Only about 30GB is in use on the sda1 partition. The steps I followed:

    1. Booted from Live USB, and used gparted to reduce sda1 to 100GB
    2. Used clonezilla to clone the reduced sda1 partition to the SSD.
    3. Assigned a new UUID to the SSD partition (because it was identical to the HDD UUID after the clone)
    4. Modified /etc/fstab on the SSD to use the new UUID of the SSD.
    5. Ran update-grub

    On reboot, the grub menu appears to include an option to boot Ubuntu from the SSD. If I choose that, the system seems to come up normally, but then lsblk indicates that the file system root is still mounted on the HDD (sda1), instead of sdb1. (which AFAIK means that the system is still running from the hard disk.)

    What have I missed?

    Thanks in advance.

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    Are you sure sda is HDD?
    Drive order is normally set by UEFI/BIOS and its write of what hardware you have to drive. Then operating system uses that. There are some files than can override defaults.

    May be best to see details, use ppa version with your live installer or any working install, not older Boot-Repair ISO:
    Post the link to the Create BootInfo summary report. Is part of Boot-Repair:
    https://help.ubuntu.com/community/Boot-Info
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Aug 2018
    Beans
    7

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    > Are you sure sda is HDD?
    As sure as I can be...lsblk yields:

    sda 8:0 0 931.5G 0 disk
    └─sda1 8:1 0 931.5G 0 part /
    sdb 8:16 0 223.6G 0 disk
    └─sdb1 8:17 0 223.6G 0 part

    sda sure looks like the 1TB hard drive, and the root "/" looks like it's mounted there.

    This is an older system that does not use/have UEFI.

    I'm likely too much of a noob, but I'm afraid I understood very little of the section of your reply that starts with "May be best...". I'll start reading the link you gave me.

    Thanks for the help!

  4. #4
    Join Date
    May 2008
    Beans
    578
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    I assume that you have cloned your OS to a SSD to improve the performance and then I suspect you may use your larger HDD for storage/back ups etc.

    Anyway, I have been through a similar process recently and here is my suggestion:-

    Why not simply unplug/remove the source HDD and only boot the newly cloned SSD?

    Then, you can test that everything is in order on your SSD without having to concern yourself which disk is mounted and where it is mounted.

    Also you would not have to worry about changing UUID etc.

    Of course, when you're happy that everything is OK, then you can re-purpose your large HDD.

    Best wishes

  5. #5
    Join Date
    Aug 2018
    Beans
    7

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    Thanks...I actually tried that. When I selected any of the Ubuntu options on the grub menu, I saw the same error message, something like "...device not found..." and there appeared to be a disk UUID displayed as well. I haven't memorized the full UUID's, but based on the last two characters of that UUID, it appears grub doesn't know about the SSD's UUID. I find this confusing, since at least one of the grub options mentions "sdb1", which I believe means the first partition ("1") of the second drive attached to the SATA controller ("sdb").

    Thanks for the help.

  6. #6
    Join Date
    May 2008
    Beans
    578
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    Cloning is a tricky cove.........

    Anyway, I suspect that you still have more than one drive attached to your PC (possibly it could be a USB stick).

    Are you using Clonezilla from a CD/DVD or a USB device?

    Did you clone using images or device to device. I have found that using images yields fewer difficulties.

    If you only have one drive attached and you have reached a grub menu, sdb1 should not exist.

    Possibly, when cloning, you reproduced a grub menu that included all the other information that has become superfluous.

    I suggest that you attach the cloned drive only and try and boot from the first entry on the grub list.

    If that fails to boot, try the second entry (recovery option) and see what gives.

    Thirdly, go back to square one, update grub on your original HDD so that you only have one OS entry, reclone (using images) your 100GB sda1 partition and report back.

    By the way, you have got a personal data back up?

    Good luck

  7. #7
    Join Date
    Aug 2018
    Beans
    7

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    Hi, thanks for the follow-up.

    I have two SATA drives attached at this point, the 1TB HDD on channel 0, and the 250GB SSD on channel 1. I also have a PCI RAID card in this machine with two 500GB drives, which are connected to that card.

    My end goal is to have the system running on the SSD, and move larger, less-often-used stuff to the HDD.

    I did the clone from a Clonezilla USB stick. I started by creating a backing up of the entire HDD, stored on the RAID array. I then attempted a disk-to-disk clone, but CZ complained (rightly so) that the target disk (SSD) was smaller than the source disk (HDD). I found several approaches to solving this, and since I did have a backup, I decided to shrink the HDD partition down to 100GB so CZ could clone it to the SSD (only about 30GB was in use). I then did a partition-to-partition clone. After that, I rebooted from the HDD and mounted the SSD. The SSD's UUID was identical to that of the HDD, so I changed it. Then I modified /etc/fstab on the SSD, changing the UUID to the new one. Finally, I ran update-grub, thinking it would do the "right thing" (apparently it didn't). That's where things stand right now.

    I think you're right about having a cloned grub configuration on the SSD - I need to read more about grub to know how to check/fix it. Does grub use partition UUID's?

    I have tried booting with the HDD disconnected - that's when I get the "device not found" grub errors.

    Thanks again.

  8. #8
    Join Date
    May 2008
    Beans
    578
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    Hello again

    That is a wealth of new information.

    I think that this should have been mentioned in your original post.

    Regrettably, I have no experience of setting up a RAID array nor cloning such a device, therefore I am very reluctant to offer new advice.

    I found this on the Clonezilla FAQs:-

    Clonezilla does support hardware RAID, if your RAID device is seen as /dev/sda, /dev/sdb, /dev/hda, /dev/hdb, /dev/cciss/c0d0... on GNU/Linux. Clonezilla does support this.
    On the other hand, if it's Linux software RAID, no, Clonezilla does not support that.
    Both hardware RAID and software RAID are beyond my sphere of knowledge.

    I'm sorry that I could not help further

    Best wishes

    I've just had a second thought.

    In effect, because you have back-ups and your cloned drive does not quite function correctly, why not take a punt?

    Remove all drives except the cloned SSD
    Enter the recovery menu and update grub.
    Failing that, use a live Ubuntu USB to update grub.
    See what transpires.

  9. #9
    Join Date
    Aug 2018
    Beans
    7

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    Hello again,

    I guess my first post, in which I tried to outline the steps, wasn't detailed enough. Sorry.

    I believe I have it working now, but I don't think I fixed it properly. I looked into the grub.cfg (on the HDD) and found the entries for booting from the SSD drive. I have no idea how or why, but in each of those entries, the lines specifying the kernel file had the HDD UUID as the "root" argument, instead of the SSD's UUID. I manually changed those, rebooted, and now sdb1 is mounted as the file system root.

    I don't think this was the right thing to do, as all indications are that I shouldn't be manually editing that file. But after reading that editing /etc/grubd/10_linux was the proper approach and looking at that file, I'm baffled as to what would need to change there.

    Thank you for your efforts!

  10. #10
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: 18.04 cloned to SSD still mounts HDD as file system root

    You should not be editing grub.cfg which is recreated with sudo update-grub or an updated kernel or grub files.
    And you do not update scripts.

    If booted correctly into SSD, you should just need to do this to update entire menu.
    sudo update-grub

    Best to post link to summary report from Boot-Repair. It shows all sorts of details in one place.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •