XPS 9300
Info
Remove BitLocker
- In the seach bar of windows type: "bitlocker"
- Open the "Device encryption"
- Disable the encryption
Shrink the Windows partition
- In the seach bar of windows type: "partition"
- Open "Disk management"
- Right-click on the OS partition and "Shrink Volume"
Remove RAID
- Right-click the Windows Start Menu. Choose Command Prompt (Admin).
- If you don’t see Command Prompt listed, it’s because you have already been updated to a later version of Windows. If so, use this method instead to get to the Command Prompt:
- Click the Start Button and type cmd
- Right-click the result and select Run as administrator
- If you don’t see Command Prompt listed, it’s because you have already been updated to a later version of Windows. If so, use this method instead to get to the Command Prompt:
- Type this command and press ENTER: bcdedit /set {current} safeboot minimal
- If this command does not work for you, try bcdedit /set safeboot minimal
- Restart the computer and enter BIOS Setup (the key to press varies between systems).
- Change the SATA Operation mode to AHCI from either IDE or RAID (again, the language varies).
- Save changes and exit Setup and Windows will automatically boot to Safe Mode.
- Right-click the Windows Start Menu once more. Choose Command Prompt (Admin).
- Type this command and press ENTER: bcdedit /deletevalue {current} safeboot
- If you had to try the alternate command above, you will likely need to do so here also: bcdedit /deletevalue safeboot
- Reboot once more and Windows will automatically start with AHCI drivers enabled.
BIOS settings
- disable secure boot
Create bootable USB stick
- Download SystemRescueCd
- Copy it to the usb stick with dd if=<iso> of=/dev/sda status=progress
- Boot in USB stick by pressing F12
- startx to open the windows environment
- Set the resolution to 1900x1200 to make the text readable
- Stop the firewall: systemctl stop iptables
- Set the root password: passwd
- Start sshd: systemctl start sshd
Setup partitions
- gdisk /dev/nvme0n1
7 2GB EF00 - EFI system partition nvme0n1p7
8 16GB 8200 - Linux swap nvme0n1p8
9 <rest> 8300 - Linux filesystem nvme0n1p9
Setup full-disk encryption
Formatting
mkfs.vfat -F 32 -n BOOT /dev/nvme0n1p7
mkswap -L SWAP /dev/nvme0n1p8
cryptsetup luksFormat /dev/nvme0n1p9
cryptsetup luksOpen /dev/nvme0n1p9 root
mkfs.ext4 -L ROOT /dev/mapper/root
Mounting existing installation from rescue USB
cryptsetup luksOpen /dev/nvme0n1p9 root
mkdir /mnt/gentoo
mount /dev/mapper/root /mnt/gentoo
cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
mount --types proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) ${PS1}"
mount /dev/nvme0n1p7 /boot
Copy existing installation
rsync is a very nice tool to copy a filesystem from one system to another.
On destination system
cryptsetup luksOpen /dev/nvme0n1p9 root
mkdir /mnt/gentoo
mount /dev/mapper/root /mnt/gentoomkdir /mnt/gentoo/boot
mount /dev/nvme0n1p7 /mnt/gentoo/boot
On source system
export REMOTE_IP=<ip of remote system>
mkdir /mnt/ROOTmkdir /mnt/BOOT
mount --bind / /mnt/ROOT
mount --bind /boot /mnt/BOOT
rsync --rsh=ssh --archive --hard-links --sparse --xattrs --acls --numeric-ids --info=progress2 /mnt/BOOT/ root@$REMOTE_IP:/mnt/gentoo/boot
rsync --rsh=ssh --archive --hard-links --sparse --xattrs --acls --numeric-ids --info=progress2 /mnt/ROOT/ root@$REMOTE_IP:/mnt/gentoo
Configure boot partition
Find uuid of partition: ls -la /dev/disk/by-uuid/ | grep nvme0n1p9
Edit the rEFInd setup: vi /mnt/boot/EFI/BOOT/refind.conf
Devices
WD19TB Dock
Workaround for blank screens problem (thanks to Mark Blakeney): Add this as a kernel parameter i915.enable_dp_mst=0
It is not really a nice workaround because the effect is that the multi-display support of the dock is disabled. If you still want to use three displays you can use the daisy-chain port on the dock and the other TB port on the laptop. Both can be connected to TB-to-DP adapters and so adding the two extra displays besides the port in the dock.
Audio
There are two audio outputs on the dock and somehow the rear one is not detected automatically. In my case I could see the devices with 'aplay -l'
but I could not select it in the mixer. Adding "load-module module-alsa-sink device=hw:0,1" to "/etc/pulse/default.pa" fixed that for me.
Some commands for debugging (run as normal user):
lsusb -d 0bda:402e -v
aplay -l
cat /dev/urandom | aplay -Dhw:<card>,<device> -f S24_3LE -c 2
pacmd list-sinks
speaker-test
pactl list
killall pulseaudio