You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://support.hp.com/tw-zh/document/c06177099
I first created Win10 Pro USB with drivers, but it couldn't detect product key in this device. I created again without drivers, this time it can reinstall Win10 Pro properly.
Virtualbox doesn't support usb boot out of box, and I think it's better to create an ISO and keep it anyway.
Insert USB, mount it
cd~
mkdir usb
lsblk
# Find your disk device id, assume it's sda1
sudo mount /dev/sda1 ~/usb
Getting this because my USB is damaged and is permanately in read mode, but seems mounted successfully
Error opening '/dev/sda1' read-write
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.
Could not mount read-write, trying read-only
# hibernation UEFI Bios systemd-boot kernelstub swapfile
# Create swapfile
fallocate -l [N]G /swapfile # [N] = swapfile size in GB
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
# Edit fstab
# Add
/swapfile none swap defaults 0 0
# Remove default swap:
sudo swapoff -a
sudo cryptsetup remove cryptswap
# edit `/etc/fstab`, comment the line mentioning cryptswap
# edit `/etc/crypttab `, comment the line mentioning cryptswap
# checking the status of the swap, it should have been disabled
sudo cryptsetup status /dev/mapper/cryptswap
# /dev/mapper/cryptswap is inactive.
# To check swap status, use:
> swapon --show
# The following command may be used to identify swap_file_offset:
filefrag -v /swapfile | awk '{ if($1=="0:"){print $4} }'
# ==> the physical value where the file starts = 241664
# kernel boot parameter:
kernelstub -a "resume=/dev/mapper/data-root resume_offset=swap_file_offset"
# Add to /etc/initramfs-tools/conf.d/resume the same line kernel boot parameter
sudo update-initramfs -u
sudo update-initramfs -c -k all
> reboot
# Test hibernate
sudo systemctl hibernate
sudo cryptsetup remove cryptswap1 doesn't work, mine is cryptswap
swapfile is 64GB since that's the maximum allowed for this device.
Britness hot key doesn't work
This is because I have installed hot key driver in Windows, this somehow changes bios state and can only be erased by a power reset