Skip to content
esm7 edited this page Aug 16, 2024 · 2 revisions

The device is very similar to previous Surface Go models and almost everything written about these models is relevant here too -- except the UFS drive.

UFS

Unlike previous models, The Surface Go 4 uses a UFS drive, which is much more common in phones than computers, so some Linux installers may encounter issues with it under various setups.

Ubuntu and Manjaro installers seem to recognize the disk properly, but in some setups, like when using LUKS disk encryption, the SGO4 is unable to boot after installation.

If you are unable to boot after installation due to "volume not found", try the following:

  1. Boot from the USB drive you used to install the OS, but instead the installer, open the terminal.
  2. Mount your disk if needed -- specific instructions for the case of LUKS encryption below.
  3. Edit /etc/mkinitcpio.conf and configure MODULES=(ufshcd_core ufshcd_pci).
  4. chroot into the mounted drive and run mkinitcpio -P.

Once you are able to boot into your designated OS, make sure the changes persist by adding a file like /etc/mkinitcpio.conf.d/10-ufs.conf that will contain a single line MODULES=(ufshcd_core ufshcd_pci).

The above may vary by distro.

UFS with LUKS

Here's a more specific flow that seems to work with Manjaro configured for LUKS encryption, and encountering "error: access denied. error: disk 'cryptouid/006...' not found. Entering rescue mode...".

Disclaimer: I am unsure this is the best or optimal solution, and admit I do not understand all the parts here in depth. I thought it's worth sharing as I reached this after many hours of investigation. SGO4 users who know what they're doing more than I do are encouraged to optimize the process and share.

  1. Boot from the USB drive you used to install the OS, but instead the installer, open the terminal.

  2. sudo cryptsetup luksOpen /dev/sdXn cryptroot where sdXn is your device, which you can get with lsblk.

  3. Mount the relevant directories for mkinitcpio:

sudo mount /dev/mapper/cryptroot /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run
sudo mount --bind /etc /mnt/etc
  1. sudo vi /etc/mkinitcpio.conf
  2. Set MODULES=(ufshcd_core ufshcd_pci), and under HOOKS add encrypt before filesystems if it doesn't exist.
  3. Run sudo chroot /mnt. (You may need to install manjaro-chroot, arch-chroot or another distro-specific tool for this.)
  4. Run mkinitcpio -P.
  5. exit
  6. Get your cryptdevice UUID using blkid /dev/sdXn (sdXn being the same as before).
  7. sudo vi /etc/default/grub
  8. Set GRUB_CMDLINE_LINUX="cryptdevice=UUID=<UUID of your encrypted partition>:cryptroot root=/dev/mapper/cryptroot"
  9. sudo grub-mkconfig -o /boot/grub/grub.cfg
  10. sudo vi /etc/fstab
  11. Add the line: /dev/mapper/cryptroot / ext4 defaults 0 1
  12. sudo umount /mnt/dev, sudo umount /mnt/proc, sudo umount /mnt/sys, ...
  13. sudo umount /mnt
  14. Reboot and hope for the best.
  15. Once you are able to boot into your designated OS, make sure the changes persist by adding a file like /etc/mkinitcpio.conf.d/10-ufs.conf that will contain the two lines you changed: MODULES=(ufshcd_core ufshcd_pci) and the updated HOOKS line.

Clone this wiki locally