Do it after install as the installer in my experience will ignore the second drive when you select it and clobber the windows loader if it is the first seen EFI partition. Which is what it always does with any install I have ever done with another OS on the first drive in the system, the only OS that has ever got this correct is the Manjaro installer. So as root or using sudo in front of the following commands when booted into the Debian install.Hello, on my laptop I have an ssd with windows and another one where I want to install debian.
During manual partitioning I created a 500 MB efi partition and another one for the operating system in ext4.
When I proceed with the installation, debian uses the windows efi on the other ssd.
How do I force it to use the efi of the second ssd where only debian will be installed?
Thank you
Code:
root@9600k:~# blkid | grep /dev/nvme1/dev/nvme1n1p4: LABEL="CorsairMusic" UUID="5a6278cb-79eb-424b-a6d5-c85add3e641a" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="63732088-e879-490e-8f32-dff97ee9dd99"/dev/nvme1n1p2: LABEL="CorsairRoot" UUID="766dcfc3-a1e4-495f-86e2-570205723fef" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="74a3fd28-a39c-4a91-b015-31676217edaa"/dev/nvme1n1p5: LABEL="CorsairRtorrent" UUID="154a5472-9d98-4dbe-a50e-e929ab116065" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="5070ef3c-25b8-4360-afcf-63593012676f"/dev/nvme1n1p3: LABEL="CorsairHome" UUID="dc257f43-9b9a-4db0-bf79-7af981389d29" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="5c46783f-9051-463e-add8-fadcbe15d0f0"/dev/nvme1n1p1: SEC_TYPE="msdos" LABEL_FATBOOT="CORSAIR_EFI" LABEL="CORSAIR_EFI" UUID="F0D8-55B1" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="06c13ca4-c6b9-41b0-9ed3-756ce6282278"
Code:
root@9600k:~# mkdir /tmp/efiroot@9600k:~# mount /dev/sd?? /tmp/efi
Code:
root@9600k:~# mkdir /tmp/efiroot@9600k:~# mount /dev/nvme1n1p1 /tmp/efiroot@9600k:~# ls -l /tmp/efitotal 4drwxr-xr-x 4 root root 4096 May 23 2023 EFIroot@9600k:~# ls -l /tmp/efi/EFI/total 8drwxr-xr-x 2 root root 4096 May 23 2023 BOOTdrwxr-xr-x 2 root root 4096 May 23 2023 debian
Code:
root@9600k:~# ls -l /boot/efi/EFI/total 8drwx------ 2 root root 4096 Apr 4 08:12 BOOTdrwx------ 2 root root 4096 Apr 4 08:12 ubuntu
Code:
root@9600k:~# cp -Rpv /boot/efi/EFI /tmp/efi/root@9600k:~# rm -r /tmp/efi/EFI/microsoft
Code:
root@9600k:~# nano /etc/fstabroot@9600k:~# reboot
These commands edit your existing fstab to replace the UUID=??????? for the existing /boot/efi with the second drive one you got earlier. This tells the system where your EFI partition is located and it will now use it every time it boots from that drive or the system is updated. The last command reboots the machine so the change will be used on next boot, you can do this graphically if doing this in a terminal window on the desktop. You will need to go into the EFI firmware and change the boot priority to list the second drive as first to boot for it to use the new settings every time or use the one time boot menu key to get a listing of the options to boot from, on my machine this is the F12 hit at the correct time during the boot process. Choose the new drive from the list as there will be at least two of them due to the old files still being on the windows drive. Once you have booted and confirmed the new partition in use you can mount the windows drive EFI partition and delete the debian directory there.
What the line in the /etc/fstab file looks like in my current booted install this is the line you want to change.
Code:
root@9600k:~# grep -i EFI /etc/fstab# /boot/efi is on /dev/nvme1n1p1 9600k machine SP NVMeUUID=FEC4-39C0 /boot/efi vfat umask=0077 0 1
Edit: and now I have thought about it the procedure to repair the clobbered boot record of windows.
https://www.dell.com/support/kbdoc/en-c ... ur-dell-pc
Once that is done you will have totally separate EFI bootloaders on each drive if you have deleted the debian directory from the windows drive.
Statistics: Posted by RedGreen925 — 2024-06-14 23:50 — Replies 1 — Views 41