Mar 21, 2023
TechnologyInstall virt-io drivers:
Then the amd gpu:
Get the driver:
Copy the file into :
Then add it into shutdown items:
Edit its sequence:
eject script:
Function Check-RunAsAdministrator()
{
#Get current user context
$CurrentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
#Check user is running the script is member of Administrator Group
if($CurrentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator))
{
Write-host "Script is running with Administrator privileges!"
}
else
{
#Create a new Elevated process to Start PowerShell
$ElevatedProcess = New-Object System.Diagnostics.ProcessStartInfo "PowerShell";
# Specify the current script path and name as a parameter
$ElevatedProcess.Arguments = "& '" + $script:MyInvocation.MyCommand.Path + "'"
#Set the Process to elevated
$ElevatedProcess.Verb = "runas"
#Start the new elevated process
[System.Diagnostics.Process]::Start($ElevatedProcess)
#Exit from the current, unelevated, process
Exit
}
}
#Check Script is running with Elevated Privileges
Check-RunAsAdministrator
#Place your script here.
$deviceName="AMD Radeon(TM) Graphics"
foreach ($dev in (Get-PnpDevice | Where-Object{$_.Name -eq $deviceName})) {
&"pnputil" /remove-device $dev.InstanceId
}
# sleep for 8 seconds
Start-Sleep -Seconds 8
#Read more: https://www.sharepointdiary.com/2015/01/run-powershell-script-as-administrator-automatically.html#ixzz7wTuWTBny%
Mar 10, 2023
TechnologyUse archlinux installation disk for entering the command line, then:
mkdir /mnt/arch
mount -t auto /dev/sda2 /mnt/arch
mount -t auto /dev/sda1 /mnt/arch/boot/
arch-chroot /mnt/arch
Re-install grub:
grub-install --efi-directory=/boot/efi --target=x86_64-efi /dev/sda
Then reboot the machine we could see the archlinux reback again.
Mar 7, 2023
Technologyfrom https://www.laomaotao.net/doc/udiskwinpe.html
, download the LaoMaoTao and extract it to usb disk .
Use winpe for startup the system.
uefitool for generating the vbt.bin and gop file, but failed.
Mar 1, 2023
TechnologyChange the default ovmf files:
cd /usr/share/OVMF
mv OVMF_CODE.fd OVMF_CODE.fd.official
cp /home/idv/10th/0623.fd OVMF_CODE.fd
To be continued.
Feb 25, 2023
TechnologyInstall canddy on rpi via:
# sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https -y
# apt-cache search caddy
# curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
# sudo apt update
# sudo apt-get install caddy -y
Configuration files:
$ cat /etc/caddy/Caddyfile
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
:80 {
# Set this path to your site's directory.
root * /media/sda/ucc
# Enable the static file server.
file_server browse {
hide .git
}
basicauth * {
cwgo gowugowuoguwougowugouwogue
}
# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080
# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile
The password could be generated via caddy hash-password
.
Reload the server:
$ sudo systemctl reload caddy