You are not logged in.

#1 2022-06-11 17:01:33

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

[SOLVED] Newly installed SSD boots to windows

Just today I got a new Samsung 970Evo Plus SSD, and installed it onto my ASUSTEK PRIME B365-PLUS motherboard.

After that, I tried migrating my arch install onto it by:

Booting up a Live USB with the Arch ISO on it, and running

# dd if=/dev/sda of=/dev/nvme1n1 bs=128K conv=noerror,sync status=progress

After it was done copying the files, I ran lsblk and confirmed everything was righfully copied, and indeed, all partitions were showing as intended.
Then, I mounted all partitions onto /mnt (and each respective subdir), then made a new fstab by

# genfstab -U /mnt >> /mnt/etc/fstab

, checked that everything went right, and commented out the older entries (just in case)

However, every time I've tried to boot into the SSD it has always booted up my windows partition on a different SSD. Does anyone know why?

My blks

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
├─sda1        8:1    0     1G  0 part /boot
├─sda2        8:2    0    16G  0 part 
├─sda3        8:3    0    32G  0 part /
└─sda4        8:4    0 882.5G  0 part 
sdb           8:16   1   7.2G  0 disk 
├─sdb1        8:17   1   775M  0 part 
└─sdb2        8:18   1    86M  0 part 
nvme0n1     259:0    0 232.9G  0 disk 
├─nvme0n1p1 259:1    0 232.4G  0 part 
└─nvme0n1p2 259:2    0   518M  0 part 
nvme1n1     259:3    0 931.5G  0 disk 
├─nvme1n1p1 259:4    0     1G  0 part 
├─nvme1n1p2 259:5    0    16G  0 part [SWAP]
├─nvme1n1p3 259:6    0    32G  0 part 
└─nvme1n1p4 259:7    0 882.5G  0 part /home

sda -> Current arch install, 1TB HDD
sdb -> 8GB Removable flash drive with the arch ISO
nvme0n1 -> 256GB SSD with the windows install
nvme1n1 -> Target SSD, 1TB

As always, all input greatly appreciated :)

Last edited by Gravel (2022-06-15 18:23:43)


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#2 2022-06-11 17:14:14

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

Gravel wrote:

every time I've tried to boot into the SSD it has always booted up my windows partition on a different SSD. Does anyone know why?

You need to create a new NVRAM boot entry for Arch. As you don't mention which boot{loader,manager} you are using I can only recommend efibootmgr(8) for that but re-running the bootloader step you followed from the installation guide will also work.

Offline

#3 2022-06-11 17:22:16

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

I use systemd-boot which I installed by just running bootctl install

So, running

# arch-chroot /mnt
$ bootctl install

would make it boot properly?


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#4 2022-06-11 18:03:22

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

Yes but be sure to mount the EFI system partition before using arch-chroot.

Offline

#5 2022-06-11 18:31:53

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

Well after a couple times I can only say that arch is acting wacky:

I mounted everything correctly then chrooted into /mnt and ran bootctl install thrice, and every time mount partitions were all over the place (except root which stayed in /sda3)

1st reboot:

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
├─sda1        8:1    0     1G  0 part
├─sda2        8:2    0    16G  0 part 
├─sda3        8:3    0    32G  0 part /
└─sda4        8:4    0 882.5G  0 part 
sdb           8:16   1   7.2G  0 disk 
├─sdb1        8:17   1   775M  0 part 
└─sdb2        8:18   1    86M  0 part 
nvme0n1     259:0    0 232.9G  0 disk 
├─nvme0n1p1 259:1    0 232.4G  0 part 
└─nvme0n1p2 259:2    0   518M  0 part 
nvme1n1     259:3    0 931.5G  0 disk 
├─nvme1n1p1 259:4    0     1G  0 part /boot
├─nvme1n1p2 259:5    0    16G  0 part [SWAP]
├─nvme1n1p3 259:6    0    32G  0 part 
└─nvme1n1p4 259:7    0 882.5G  0 part /home

2nd reboot:

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
├─sda1        8:1    0     1G  0 part /boot
├─sda2        8:2    0    16G  0 part [SWAP]
├─sda3        8:3    0    32G  0 part / 
└─sda4        8:4    0 882.5G  0 part
sdb           8:16   1   7.2G  0 disk 
├─sdb1        8:17   1   775M  0 part 
└─sdb2        8:18   1    86M  0 part 
nvme0n1     259:0    0 232.9G  0 disk 
├─nvme0n1p1 259:1    0 232.4G  0 part 
└─nvme0n1p2 259:2    0   518M  0 part 
nvme1n1     259:3    0 931.5G  0 disk 
├─nvme1n1p1 259:4    0     1G  0 part /
├─nvme1n1p2 259:5    0    16G  0 part 
├─nvme1n1p3 259:6    0    32G  0 part 
└─nvme1n1p4 259:7    0 882.5G  0 part /home 

3rd reboot:

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
├─sda1        8:1    0     1G  0 part /boot
├─sda2        8:2    0    16G  0 part 
├─sda3        8:3    0    32G  0 part /
└─sda4        8:4    0 882.5G  0 part 
sdb           8:16   1   7.2G  0 disk 
├─sdb1        8:17   1   775M  0 part 
└─sdb2        8:18   1    86M  0 part 
nvme0n1     259:0    0 232.9G  0 disk 
├─nvme0n1p1 259:1    0 232.4G  0 part 
└─nvme0n1p2 259:2    0   518M  0 part 
nvme1n1     259:3    0 931.5G  0 disk 
├─nvme1n1p1 259:4    0     1G  0 part 
├─nvme1n1p2 259:5    0    16G  0 part [SWAP]
├─nvme1n1p3 259:6    0    32G  0 part 
└─nvme1n1p4 259:7    0 882.5G  0 part /home

"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#6 2022-06-11 19:27:34

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,334

Re: [SOLVED] Newly installed SSD boots to windows

By using dd to perform the copy you will have ended up with 2 drives both containing multiple partitions with non-unique UUID's.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2022-06-11 20:26:39

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

I generated new UUIDs for the ext4 and swap partitions and updated fstab, and although it still boots my old system the mountpoints are right.
Could this have to do with the vfat serial number? Do I also have to generate a new one?


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#8 2022-06-11 20:35:56

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

You've probably confused systemd-boot and/or the UEFI firmware.

Can we see the output of these commands from the live ISO image:

efibootmgr -uv
lsblk -o name,uuid

See also https://wiki.archlinux.org/title/list_o … ted_client

Offline

#9 2022-06-11 23:09:17

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#10 2022-06-11 23:23:22

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

Try

# efibootmgr -b 0 -B # delete old entry
# efibootmgr --create --label 'Arch' --disk /dev/nvme0n1 --loader '/EFI/systemd/systemd-bootx64.efi' # make new entry pointing to correct ESP

Offline

#11 2022-06-13 17:27:52

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

Head_on_a_Stick wrote:
# efibootmgr --create --label 'Arch' --disk /dev/nvme0n1 --loader '/EFI/systemd/systemd-bootx64.efi' # make new entry pointing to correct ESP

/dev/nvme0n1 is my windows SSD, so I'm guessing /dev/nvme1n1


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#12 2022-06-13 18:20:25

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

Yes, that's right. Sorry smile

Offline

#13 2022-06-13 19:16:24

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

Well that broke my system
Both, actually...

Easy fix though, I just mounted everything correctly on my HDD and reran

arch-chroot /mnt
bootctl install

and kernel loaded once again and everything else was back to normal.

However in the SDD one I tried

# efibootmgr -b 0 -B 
# efibootmgr --create --label 'Arch' --disk /dev/nvme1n1 --loader '/EFI/systemd/systemd-bootx64.efi' 

And kernel failed to load because /boot failed to mount (And /EFI/systemd/systemd-bootx64.efi wasn't being detected as an actual directory/file)

So I booted up live USB once again and ran

# efibootmgr -b 0 -B
# efibootmgr --create --label 'Arch' --disk /dev/nvme1n1 --loader 'mnt/boot/EFI/systemd/systemd-bootx64.efi'

This time pointing to the bootloader systemd-bootx64.efi and this time it DID autocomplete and recognize the file, but when trying to boot up from UEFI it just went back to the bios menu in .1 seconds so...

I even tried to arch-chroot and bootctl install on my ssd but the startup logs mounted /dev/sda3 as root (even though I mounted /nvme1n1p3 as root) and once again failed to mount /boot and thus failed to load kernel...

Last edited by Gravel (2022-06-13 19:24:06)


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#14 2022-06-13 21:12:23

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

Gravel wrote:

Well that broke my system

Hmm, sorry about that.

Gravel wrote:

However in the SDD one I tried

# efibootmgr -b 0 -B 
# efibootmgr --create --label 'Arch' --disk /dev/nvme1n1 --loader '/EFI/systemd/systemd-bootx64.efi'

And kernel failed to load because /boot failed to mount (And /EFI/systemd/systemd-bootx64.efi wasn't being detected as an actual directory/file)

Please post the content of /etc/fstab in the new system and also run these commands and post the output of the last one:

# mount /dev/nvme1n1p1 /mnt
$ find /mnt
Gravel wrote:

So I booted up live USB once again and ran

# efibootmgr -b 0 -B
# efibootmgr --create --label 'Arch' --disk /dev/nvme1n1 --loader 'mnt/boot/EFI/systemd/systemd-bootx64.efi'

This time pointing to the bootloader systemd-bootx64.efi and this time it DID autocomplete and recognize the file, but when trying to boot up from UEFI it just went back to the bios menu in .1 seconds so...

That won't work because the loader path must be given relative to the EFI system partition. I would not expect autocompletion to work with a correct version of that command.

Last edited by Head_on_a_Stick (2022-06-13 21:13:01)

Offline

#15 2022-06-13 21:24:15

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

Head_on_a_Stick wrote:
# mount /dev/nvme1n1p1 /mnt
$ find /mnt

Are you sure it is /dev/nvme1n1p1 what I should mount to /mnt? For the record:

/dev/nvme1n1p1 [1G] -> boot
/dev/nvme1n1p2 [16G] -> swap
/dev/nvme1n1p3 [32G] -> root
/dev/nvme1n1p4 [Remaining] -> home


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#16 2022-06-13 21:29:57

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

Yes, I want to see what's on the EFI system partition in your new Arch system.

Offline

#17 2022-06-13 21:53:10

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

Oh alright, I was just checking because I'm used to the usual /root on /mnt, sorry bout that :p

https://0x0.st/ouKX.txt
https://0x0.st/ouKq.txt
[lsblk] https://0x0.st/oM7t.txt


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#18 2022-06-13 22:12:17

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

So both the EFI system partitions have the same UUID, which is also listed in /etc/fstab for the new system. Change one of the UUIDs.

Why are you keeping the old system intact and connected? It would probably be easier if you just deleted the original partitions completely.

Offline

#19 2022-06-13 22:22:08

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

Oh, that's the serial number I was referring to in #7!
How do I generate a new one though, do I just edit the fstab and put whatever on it? I thought EFI UUIDs were harder to regen

And I'm keeping this system JIC I fuck something up like earlier when I broke the systems, if it weren't for this one I'd have no arch to boot on, and also if anything in the new SSD gets corrupted, that would mean my whole system gets deleted


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#20 2022-06-14 11:00:45

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED] Newly installed SSD boots to windows

Gravel wrote:

How do I generate a new one though, do I just edit the fstab and put whatever on it? I thought EFI UUIDs were harder to regen

I followed https://schlemmersoft.de/en/node/180946 to change mine and broke my Alpine system in the process big_smile

EDIT:

archie:~# findmnt -no uuid /efi
1234-5678
archie:~#

Lol.

It would probably be simpler to just re-format the partition then copy the contents back from the clone. The /boot directory only contains the kernel & initramfs images and the bootloader stuff so it's easy to restore even without a backup.

Last edited by Head_on_a_Stick (2022-06-14 12:00:33)

Offline

#21 2022-06-15 18:06:12

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 25

Re: [SOLVED] Newly installed SSD boots to windows

Yup, my own fear of fucking up the system and not being able to boot it and lose it forever was what was making it not boot and possibly having it lost forever.

I dd'ed from my HDD to my SDD once again to rewrite all data and then unplugged the HDD to see if it worked without any UUID or boot fiascos and indeed, I could tell it worked because it booted in LESS THAN A FUCKING SECOND!!
So yeah, there was no problem since the start, I just needed a little bit of more trust on myself

HDD is clean, SDD is running an even-faster copy of arch now, thank you so much for helping me out and sorry if I complicated this more than it had to be tongue


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

Board footer

Powered by FluxBB