[WORKAROUND] Systems won't boot after moving disk to internal SATA controller

In a nutshell:
SSD in external USB enclosure ==> boots
SSD connected to internal SATA controller ==> doesn’t boot

This is happening with (3) different systems: (2) EOS, (1) Windows Native Boot. The UUID’s have not changed. Systems were not installed with a bootloader. This is even affecting bootable ISOs.

Reinstalling does not help, even after creating a new partition table.

How are you booting them if you don’t have a bootloader?

I added their entries manually. This was working fine when the devices were connected via USB. The frustrating part is that the drives are working great; the disk with the ISOs stores my VMs. From my working EOS system, these VMs just fly now.

To what?

Also, what does this mean?

Here’s my used-to-be working /etc/grub.d/40_custom:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

# Microsoft Windows installations
menuentry 'Windows 11 Systems' --class windows11 {
	search --fs-uuid --no-floppy --set=root 4643-8EA0
	echo  'Loading Windows 11 Bootmanager ...'
	chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

# maintenance setups
# NOTE: need to add one for memtest86+

menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' --class settings {
    fwsetup
}

menuentry '' {
    true
}

# other virtual machine hosts
menuentry 'EndeavourOS with VirtualBox (linux-lts)' --class virtualbox {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	search --no-floppy --fs-uuid --set=root 3a4bbe74-176c-4ff8-80c9-92cfdbe6d8db
	echo	'Loading EndeavourOS with VirtualBox ...'
	linux	/boot/vmlinuz-linux-lts root=UUID=3a4bbe74-176c-4ff8-80c9-92cfdbe6d8db rw nowatchdog nvme_load=YES nvidia-drm.modeset=1 loglevel=3 iommu=pt
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux-lts.img
}

menuentry 'EndeavourOS with VirtualBox (linux)' --class virtualbox {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	search --no-floppy --fs-uuid --set=root 3a4bbe74-176c-4ff8-80c9-92cfdbe6d8db
	echo	'Loading EndeavourOS with VirtualBox ...'
	linux	/boot/vmlinuz-linux root=UUID=3a4bbe74-176c-4ff8-80c9-92cfdbe6d8db rw nowatchdog nvme_load=YES nvidia-drm.modeset=1 loglevel=3 iommu=pt
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux.img
}

menuentry 'EndeavourOS with VMware (linux-lts)' --class vmware-workstation {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root e946d336-6234-4f63-b0e9-535905679ad0
	echo	'Loading EndeavourOS with VMware ...'
	linux	/boot/vmlinuz-linux-lts root=UUID=e946d336-6234-4f63-b0e9-535905679ad0 rw nowatchdog nvme_load=YES nvidia-drm.modeset=1 loglevel=3 iommu=pt split_lock_detect=off
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux-lts.img
}

menuentry 'EndeavourOS with VMware (linux)' --class vmware-workstation {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root e946d336-6234-4f63-b0e9-535905679ad0
	echo	'Loading EndeavourOS with VMware ...'
	linux	/boot/vmlinuz-linux root=UUID=e946d336-6234-4f63-b0e9-535905679ad0 rw nowatchdog nvme_load=YES nvidia-drm.modeset=1 loglevel=3 iommu=pt split_lock_detect=off
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux.img
}

menuentry '' {
    true
}

# tested successfully on 2024-04-28
menuentry 'Clonezilla 3.1.2-22 [Live]' --class clonezilla {
    search --fs-uuid --no-floppy --set=root 30d3cf12-d8c7-4722-91a5-97c8797e7fe2
    set isofile='/iso-images/clonezilla-live-3.1.2-22-amd64.iso'
    loopback loop (${root})${isofile}
    linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset enforcing=0 locales=en_US.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" ip= net.ifnames=0 splash vga=795 i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=no vmwgfx.enable_fbdev=1 toram=filesystem.squashfs findiso=${isofile}
    initrd (loop)/live/initrd.img
}

# tested successfully on 2024-04-28
menuentry 'Clonezilla 3.1.2-22 [Autoclone - EndeavourOS/Windows 11]' --class clonezilla {
    search --fs-uuid --no-floppy --set=root 30d3cf12-d8c7-4722-91a5-97c8797e7fe2
    set isofile='/iso-images/clonezilla-live-3.1.2-22-amd64.iso'
    loopback loop (${root})${isofile}
    linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset enforcing=0 locales=en_US.UTF-8 keyboard-layouts=NONE ocs_prerun="mount UUID=f8720762-7adf-415b-8641-840da5b958be -o subvol=/,noatime,compress=zstd /mnt" ocs_prerun1="mount --bind /mnt/images/eos-win /home/partimag/" ocs_live_run="ocs-sr -q2 -j2 -z0 -sfsck -senc -p poweroff --batch savedisk autoname-eos-win-year-month-day PTUUID=906A029C-D1F2-43A1-A6ED-3030A0197559" ocs_live_extra_param="" ocs_live_batch="yes" ip= net.ifnames=0 splash vga=795 i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=no vmwgfx.enable_fbdev=1 toram=filesystem.squashfs findiso=${isofile}
    initrd (loop)/live/initrd.img
}

menuentry 'Clonezilla 3.1.2-22 [Autoclone - Virtual Machine Hosts]' --class clonezilla {
    search --fs-uuid --no-floppy --set=root 30d3cf12-d8c7-4722-91a5-97c8797e7fe2
    set isofile='/iso-images/clonezilla-live-3.1.2-22-amd64.iso'
    loopback loop (${root})${isofile}
    linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset enforcing=0 locales=en_US.UTF-8 keyboard-layouts=NONE ocs_prerun="mount UUID=f8720762-7adf-415b-8641-840da5b958be -o subvol=/,noatime,compress=zstd /mnt" ocs_prerun1="mount --bind /mnt/images/vm-hosts /home/partimag/" ocs_live_run="ocs-sr -q2 -j2 -z0 -sfsck -senc -p poweroff --batch savedisk autoname-vm-hosts-year-month-day PTUUID=3F2A18F9-F724-4FDF-9ECE-F24807867BCA" ocs_live_extra_param="" ocs_live_batch="yes" ip= net.ifnames=0 splash vga=795 i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=no vmwgfx.enable_fbdev=1 toram=filesystem.squashfs findiso=${isofile}
    initrd (loop)/live/initrd.img
}

The bootloader is from my EOS system, running off the M.2 disk. I can’t boot any of the (3) ISO entries - same errors.

Is the disk detected?

Can you share:

lsblk -o name,type,fstype,size,mountpoint,uuid
sudo parted -l
lsblk -o name,type,fstype,size,mountpoint,uuid
      sudo parted -l
NAME        TYPE FSTYPE   SIZE MOUNTPOINT       UUID
sda         disk        447.1G                  
├─sda1      part swap      32G [SWAP]           788f59fc-b24e-4a90-b23e-f509c2dd0d77
└─sda2      part ext4      50G /mnt             3a4bbe74-176c-4ff8-80c9-92cfdbe6d8db
sdb         disk          1.8T                  
└─sdb1      part ext4     1.8T /media/vms       30d3cf12-d8c7-4722-91a5-97c8797e7fe2
sdc         disk          3.6T                  
└─sdc1      part btrfs    3.6T /media/backups   f8720762-7adf-415b-8641-840da5b958be
sdd         disk         57.3G                  
├─sdd1      part exfat   57.2G                  9C7C-6299
└─sdd2      part vfat      32M                  3925-9DE7
nvme0n1     disk        931.5G                  
├─nvme0n1p1 part vfat       2G /boot/efi        4643-8EA0
├─nvme0n1p2 part           16M                  
├─nvme0n1p3 part ntfs     600G /media/windows-c 788E420E8E41C57A
└─nvme0n1p4 part btrfs  329.5G /var/log         bdd04bd5-f872-4915-ab50-3d3429048bbf
Model: ATA SanDisk SSD PLUS (scsi)
Disk /dev/sda: 480GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  34.4GB  34.4GB  linux-swap(v1)        swap
 2      34.4GB  88.0GB  53.7GB  ext4


Model: ATA Samsung SSD 870 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2000GB  2000GB  ext4


Model: WD My Book 25DA (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  4001GB  4001GB  btrfs


Model: SanDisk Ultra (scsi)
Disk /dev/sdd: 61.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  61.5GB  61.5GB  primary               boot
 2      61.5GB  61.5GB  33.6MB  primary  fat16        esp


Model: WD Blue SN580 1TB (nvme)
Disk /dev/nvme0n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  2149MB  2147MB  fat32        EFI system partition          boot, esp
 2      2149MB  2165MB  16.8MB               Microsoft reserved partition  msftres, no_automount
 3      2165MB  646GB   644GB   ntfs         Basic data partition          msftdata
 4      646GB   1000GB  354GB   btrfs

Yes, the disks are detected. I can run SMART tests on them in the BIOS. EOS and Windows both see the disks.

What happens when you try to boot them? How far does the boot get?

Have you tried booting the fallback initrams?

It dies trying to find the kernel, claiming that the device UUID can’t be found, so I don’t get the option of using the fallback initramfs.

I updated my BIOS about 2 weeks ago, but have not had any issues until I moved the SSDs last night. Since all I tested was the VMs that were stored there, I didn’t think anything more until I tried booting my VirtualBox install. I’m starting to wonder if there’s a new setting/default that I missed.

One thing that I made sure to check was if the VMD/IRST controller was still disabled.

You need to change your custom conf to use the fallback. It is a different initrd file.

I suspect the issue is that you either need to use the fallback or generate a new initramfs. Since the device path changed it is possible the sata drivers you need are not in your initramfs.

(2) problems here: 1) The boot entries try to load the kernel first, so it never gets to the initramfs line; 2) this is affecting clean installs, so I know they’re being created from scratch.

If it is a problem with the SATA drivers, how could I force the system to include them in the initramfs?

UPDATE: OK, tell me if this makes any sense: after checking out some of the BIOS settings (did not save anything), I was able to get my Clonezilla ISO to boot. On the next restart, I was back to square-one again.

Well, my friend, I’m giving up for now. I just tried installing a new EOS system on one of the SSDs (freshly purged), using a brand-new EFI partition, and proceeded to be greeted with the GRUB shell. If I manually load the kernel/initramfs using (HD?,GPT?) notation, I can get the system to start, but not completely load.

Check that you are not booting to an old UEFI boot variable. You can reorder them or delete old ones from the live environment with efibootmgr.

1 Like

I wish it were that easy. After taking out one of the disks, reconnecting with USB, then reinstalling a couple of systems, now the SOB decides to boot again.

Marking this post as the “solution”, but it’s more of a workaround (has nothing to do with EOS or Windows). Chalk up another ASUS anomaly.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.