User Tools

Site Tools


dell_xps_15_9530

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
dell_xps_15_9530 [2014/11/24 13:31]
ben
dell_xps_15_9530 [2020/09/22 20:17]
ben [ZFS root]
Line 22: Line 22:
 KDE defaults to letting the multimedia volume keys (Fn+F1/F2/F3) control the HDMI card by default. Switch this to the analog card by opening KMix and setting ''Settings->Select Master Channel...->Built-in Audio Analog Stereo''. KDE defaults to letting the multimedia volume keys (Fn+F1/F2/F3) control the HDMI card by default. Switch this to the analog card by opening KMix and setting ''Settings->Select Master Channel...->Built-in Audio Analog Stereo''.
  
 +If there's no sound when logging into plasma (the volume icon has a red cross through it, and the kde settings shows no devices), make sure pulseaudio user daemon is running, and if not start it one-time with ''pulseaudio -D'',
 ==== Graphics ==== ==== Graphics ====
  
Line 89: Line 90:
  
 Just works. Just works.
 +
 +===== Flashing BIOS =====
 +
 +Taken from [[https://wiki.archlinux.org/index.php/Flashing_BIOS_from_Linux#Using_a_FreeDOS-provided_Disk_Image_+_USB_stick_on_Linux|Arch Wiki]]
 +
 +  * Download the latest freedos version
 +  * Flash it to the USB stick with ''dd''
 +  * Mount and copy in the BIOS executable from [[https://www.dell.com/support/home/uk/en/ukbsdt1/product-support/product/xps-15-9530/drivers|Dell website]]
 +  * Reboot into freedos, select the ''no drivers'' option (the default option leads to exceptions and the flash failing)
 +    * It might also be necessary to disable Intel VTx, not confirmed; don't forget to re-enable after
 +
 +===== ZFS root =====
 +
 +  * Prepare the partition table manually
 +    - BIOS boot for grub/mbr, 1M
 +    - ext2 for /boot, 1G
 +    - vfat for /efi, 1G
 +    - zfs partition
 +    - ext4 temporary filesystem for / during install
 +  * Install sabayon to the ext4 partition at the end, but don't auto reboot at the end
 +  * Create the ''zpool'' with ''zpool create rpool /dev/disk/by-id/wwn-*-part4''
 +  * Create the ''root'', ''root/home'' and ''root/var'' filesystems within, with encrytion
 +  * Set ''root filesystem'' to not be mountable automatically with ''zfs set canmount=off rpool/root''
 +  * Set the mountpoints for each filesystem: <code bash>
 +zfs set mountpoint=/ rpool/root
 +zfs set mountpoint=/var rpool/root/var
 +zfs set mountpoint=/home rpool/root/home
 +</code>
 +  * Mount the filesystems to arbitrary locations with: <code bash>
 +mkdir /mnt/sysimage
 +mount -o zfsutil -t zfs rpool/root /mnt/sysimage/root
 +mount -o zfsutil -t zfs rpool/root/home /mnt/sysimage/root/home
 +mount -o zfsutil -t zfs rpool/rootvar /mnt/sysimage/root/var
 +</code>
 +  * Rsync the contents into the ZFS root: <code bash>
 +mkdir /mnt/temproot
 +mount /dev/sda5 /mnt/temproot
 +rsync -a /mnt/temproot/ /mnt/sysimage/
 +</code>
 +  * Prepare dracut for zfs root booting: <code text /mnt/sysimage/etc/dract.conf.d/99zfs.conf>
 +add_dracutmodules+="dracut-systemd systemd systemd-initrd zfs"
 +</code>
 +  * Chroot into the zfs root filesystem and rebuild the initramfs: <code bash>
 +dracut -f /boot/initramfs-genkernel-5.4.0-sabayon 5.4.0-sabayon
 +</code>
 +  * Remove the temporary partition
 +  * Add a swap partition at the very end of the disk
 +  * Extend the zfs partition to fill the remaining space
 +  * Reboot and pray
 +
 +Kernel package installations run ''sabayon-dract --rebuild x.y'', which invokes dracut with a bunch of module omissions including all the systemd ones needed for ZFS to work. Therefore whenever upgrading the kernel, be sure to run ''dracut -f /boot/initramfs-genkernel-x86_64-$(uname -r) $(uname -r)''.
 +
 +Grub 2.02-r3 ships a version of ''grub2-probe'' which can't handle ZFS properly. This means the generated grub config file will contain ''root=ZFS=/root'' instead of ''root=ZFS=rpool/root'' which breaks root filesystem mounting. After installing grub or any kernel package, fix grub,cfg before rebooting.
 +==== Failure to boot ====
 +
 +Errors on startup about system not having been booted with systemd. This is a problem with the dracut initrd.
 +
 +Manual boot:
 +  * Edit grub kernel commandline to add ''rd.break=pre-mount'' and remove ''quiet splash''
 +  * At the prompt, run: <code bash>
 +zpool import rpool
 +zfs load-key rpool/root
 +# Enter encryption passphrase
 +mount -t zfs -o zfsutil rpool/root /sysroot
 +mount -t zfs -o zfsutil rpool/root/home /sysroot/home
 +mount -t zfs -o zfsutil rpool/root/var /sysroot/var
 +mount -t zfs -o zfsutil rpool/root/docker /sysroot/var/lib/docker
 +exit
 +</code>
 +  * After boot, regenerate the initrd <code bash>
 +dracut -f /boot/initramfs-genkernel-5.4.0-sabayon 5.4.0-sabayon
 +</code>
 +
 +Known issues:
 +  * Infinite loop of something complaining about system not having been booted with systemd, dbus error: Initramfs was built without systemd support, and needs rebuilding
 +  * Error that ''\'rpool/root\''' contains invalid characters and is not a valid filesystem name: ''/usr/lib/dracut/modules.d/90zfs/mount-zfs.sh'' contains errant single quotes, which need to be removed. Rebuild the initrd afterwards: <code bash>
 +# This:
 +                                ask_for_password \
 +                                        --tries 5 \
 +                                        --prompt "Encrypted ZFS password for ${ENCRYPTIONROOT}: " \
 +                                        --cmd "zfs load-key '${ENCRYPTIONROOT}'"
 +# Should be:
 +                                ask_for_password \
 +                                        --tries 5 \
 +                                        --prompt "Encrypted ZFS password for ${ENCRYPTIONROOT}: " \
 +                                        --cmd "zfs load-key ${ENCRYPTIONROOT}"
 +</code>
 +
 +
dell_xps_15_9530.txt · Last modified: 2021/08/27 07:40 by ben