Not booting from NVMe after booting from another disk

    • OMV 3.x
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Not booting from NVMe after booting from another disk

      New

      I just booted CloneZilla from USB and cloned the NVMe disk to a 4TB HDD.

      Then I booted from the HDD and everything seemed to be ok.
      I noticed the NVMe was still be used for booting.

      Shell-Script

      1. $ mount | grep boot
      2. /dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
      So I removed the NVMe to check if the HDD would still boot on its own.
      It does. Great.

      But after reinstalling the NVMe I cannot from it.

      Source Code

      1. Reboot and Select proper Boot device
      2. or Insert Boot Media in selected Boot device and press a key
      I can still boot from HDD.

      I guess booting from HDD after cloning did overwrite something in /dev/nvme0n1p1.
      But what? How can I fix this?

      And how can I prevent this "deconstructive behaviour" in the future?
      I guess I have to edit the Grub config after cloning it from the NVMe?!


      My goal is to clone/copy/rsync the content of the system partition to the HDD for redundancy.


      btw: Still experimenting with my new system.
    • New

      Source Code: /dev/nvme0n1p1/grub/grub.cfg

      1. menuentry 'Debian GNU/Linux, with Linux 4.4.83-1-pve' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.83-1-pve-advanced-d152af9f-df83-4ed6-ab85-68b7be3adbc7' {
      2. load_video
      3. insmod gzio
      4. if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      5. insmod part_gpt
      6. insmod ext2
      7. if [ x$feature_platform_search_hint = xy ]; then
      8. search --no-floppy --fs-uuid --set=root d152af9f-df83-4ed6-ab85-68b7be3adbc7
      9. else
      10. search --no-floppy --fs-uuid --set=root d152af9f-df83-4ed6-ab85-68b7be3adbc7
      11. fi
      12. echo 'Loading Linux 4.4.83-1-pve ...'
      13. linux /boot/vmlinuz-4.4.83-1-pve root=UUID=d152af9f-df83-4ed6-ab85-68b7be3adbc7 ro quiet
      14. echo 'Loading initial ramdisk ...'
      15. initrd /boot/initrd.img-4.4.83-1-pve
      16. }
      Display All
      While d152af9f-df83-4ed6-ab85-68b7be3adbc7 is pointing to sda2


      I think I would need to change the UUID in the grub.cfg to my NVMe.
      But I cannot find the UUID of the device. :(

      ls -l /dev/disk/by-uuid/ does only show sda1, sda2 and sda3.


      EDIT1:

      I just fund out that clonezilla copies the UUIDs.


      Source Code

      1. # lsblk -P -o NAME,PARTUUID
      2. NAME="sda" PARTUUID=""
      3. NAME="sda1" PARTUUID="30206734-c265-44a9-9a78-dace91ef2c1a"
      4. NAME="sda2" PARTUUID="74416ab5-8ace-4407-b398-2a162f4c7fa0"
      5. NAME="sda3" PARTUUID="489eb3f8-0636-45d1-9ecf-934dcfa47150"
      6. NAME="sdb" PARTUUID=""
      7. NAME="sdc" PARTUUID=""
      8. NAME="sdd" PARTUUID=""
      9. NAME="nvme0n1" PARTUUID=""
      10. NAME="nvme0n1p1" PARTUUID="30206734-c265-44a9-9a78-dace91ef2c1a"
      11. NAME="nvme0n1p2" PARTUUID="74416ab5-8ace-4407-b398-2a162f4c7fa0"
      12. NAME="nvme0n1p3" PARTUUID="489eb3f8-0636-45d1-9ecf-934dcfa47150"
      Display All

      Could this be the problem?
      But I donn't think so. I already tried booting with only the NVMe attached.
      So the UIIDs should not conflict.

      EDIT2:

      SOLVED!!

      First I did sudo update-grub.
      This created new grub menu entries, because Debian was found on my NVMe.
      But that did not help.
      Next I edited the grub.cfg like discribed here:


      I found this: askubuntu.com/a/171469
      I deleted the search-lines and replaced the UUID with /dev/nvme0n1p1.

      Now I have to find a way to prevent this from happening again.
      Maybe changing the UUIDs...

      The post was edited 3 times, last by cwempe ().