You are not logged in.

#1 2023-12-23 10:06:53

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Booting a cloned disk from USB

I cloned (using clonezilla) my internal nvme to an external usb ssd.

Trying to boot from the usb disk it boot directly to windows. Any hints?

nvme0n1          259:0    0     465,8G     0 disk
├─nvme0n1p1 259:1    0    260M        0 part /efi
├─nvme0n1p2 259:2    0    16M          0 part
├─nvme0n1p3 259:3    0    97,7G       0  (Windows)
├─nvme0n1p4 259:4    0    1004,1M  0 part (Windows recovery)
├─nvme0n1p5 259:5    0    120G        0 part /
├─nvme0n1p6 259:6    0    140G        0 part /home
└─nvme0n1p7 259:7    0    106,9G    0 part /mnt/storage

The USB

sda               8:0    0    465,8G  0 disk
├─sda1        8:1    0    260M  0 part
├─sda2        8:2    0     16M  0 part
├─sda3        8:3    0    97,7G  0 part
├─sda4        8:4    0   1004,1M  0 part
├─sda5        8:5    0    120G  0 part
├─sda6        8:6    0    140G  0 part
└─sda7        8:7    0    106,9G  0 part


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#2 2023-12-23 11:46:04

Irets
Member
Registered: 2019-02-01
Posts: 143

Re: Booting a cloned disk from USB

AFAIK the Windows bootloader cannot boot into GNU/Linux but take something like Grub for example, it can boot into both Windows and GNU/Linux in a dualboot environment.

Have you tried or considered reinstalling Grub, or which ever bootloader you're using on your internal SATA disk, on to the external disk from chroot?

Mount your Windows partition if Grub cannot detected Windows.

Last edited by Irets (2023-12-23 11:50:25)

Offline

#3 2023-12-23 13:24:01

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: Booting a cloned disk from USB

I booted from an Arch install media, chrooted to the usb disk, reinstalled grub, but no luck.


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#4 2023-12-23 13:42:42

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Booting a cloned disk from USB

Please provide the exact, full command(s) used.


Jin, Jîyan, Azadî

Offline

#5 2023-12-23 14:00:16

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: Booting a cloned disk from USB

1.  Boot with Arch install media.
2.  Mount my root partition (mount /dev/sda5 /mnt)
3.  Mount my EFI partition (mount /dev/sda1 /mnt/efi)
4.  Enter chroot (arch-root /mnt)
5.  grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
6. grub-mkconfig -o /boot/grub/grub.cfg
7. exit
8. umount everything

Last edited by firewalker (2023-12-23 14:00:59)


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#6 2023-12-23 14:22:40

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Booting a cloned disk from USB

Use efibootmgr(8) to check if a new NVRAM entry has been created for the device and confirm that the PARTUUID for the ESP is correct.

If this drive isn't permanently connected or is to be used with other machines also add the --removable flag to the grub-install command and try selecting the device itself from the firmware ("BIOS") boot menu.


Jin, Jîyan, Azadî

Offline

#7 2023-12-23 14:24:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: Booting a cloned disk from USB

You may need to change your filesystem UUIDs and your partition table PARTUUIDs. If they're the same as the internal disk, things aren't going to work right.

Online

#8 2023-12-24 15:11:01

firewalker
Member
From: Hellas (Greece).
Registered: 2006-06-05
Posts: 585

Re: Booting a cloned disk from USB

I tried the removable flag with no luck. Even with the internal disk removed, the usb disk will boot to windows. No grub.

The only way to lad the usb disk is to allow grub from the internal disk to load and the use the command line (root, chainloader, boot) to boot from the usb disk


Γίνε ρεαλιστής, μείνε ονειροπόλος ...

Offline

#9 2023-12-24 19:29:49

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Booting a cloned disk from USB

Have you checked the UUIDs, as per Scimmia's suggestion? Did you try booting the device directly from the firmware ("BIOS") menus?

And what is your aim here, exactly? Is the USB drive intended to replace the internal drive or is it to be used with other machines?


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB