For no apparent reason dual boot stops working.
- the following message flashes briefly during reboot:
Failed to open \EFI\ubuntu\grubx64.efi - Not Found
Failed to load image: Not Found
start_image() returned Not Found, falling back to default loader
Failed to open \EFI\ubuntu\grubx64.efi - Not Found
Failed to load image: Not Found
start_image() returned Not Found- the grub menu that allows choosing OS is skipped, and instead Windows boots directly.
Instructions based on: https://askubuntu.com/a/1134107
-
power down
-
plug a live USB of Ubuntu 20.04
-
Power up the laptop, access UEFI (in LG gram: press F2 during 3 secs)
-
Ensure USB is first in boot order
-
Select "Try Ubuntu" this will boot Ubuntu from USB
-
Configure Wifi to have internet connection.
-
Open a terminal and type:
$ sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt update
$ sudo apt-get install boot-repair && boot-repair-
Select "Recommended fix". This will fix grub and reinstall it and create a boot info log in a logbin. The app provides a report in a pastebin to send to boot.repair@gmail.com if further troubleshooting is needed
-
Reboot
May need to disable fast boot and early threat checks for above to work
There are 4 ways to enable/disable fast boot, see: https://www.youtube.com/watch?v=M3nbEqSBs04
- control panel > hardware and sound > power options > behaviour closing lid> change settings unavailable > untick fast startup
- terminal > right-click>run as admin >
> powercfg /h off3 disable in group policy editor
but, need to install gpedit first, didn't succeed
create a file gpedit-install.bat:
FOR %F IN ("%SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~*.mum") DO (DISM /Online /NoRestart /Add-Package:"%F")
FOR %F IN ("%SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~*.mum") DO (DISM /Online /NoRestart /Add-Package:"%F")
execute it as admin
> gpedit.msc
If previous ones do not work, try manually Source: https://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows/88432 (CHECK SOURCE THIS IS NOT COMPLETE)
sudo fdisk -l # 1. Determine the partition number of your main partition and EFI
sudo mount /dev/nvme0n1p7 /mnt # 2. mount the main Linux sistem
for i in /sys /proc /run /dev; do sudo mount --rbind "$i" "/mnt$i"; done # 3. some needed bindings (?)
sudo mount /dev/nvme0n1p1 /mnt/boot/efi # 4. mount EFI
sudo chroot /mnt # 5. update grub
update-grub
grub-install /dev/sda # 6. just, in case reinstall grub
update-grub
exit
reboot
You are boarding a plane and need to quickly download a video to finish watching it during the flight. And you want subtitles.
- If needed, install
yt-dlp
$ sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
$ sudo chmod a+rx /usr/local/bin/yt-dlp # Make executable- Type in terminal the command below replacing the video code e.g.
uf4zOigzTFo. This downloads video and subtitles as 2 separate files e.g..vttand.webpto the current folder.
$ yt-dlp --write-sub --write-auto-sub --sub-lang "en.*" https://www.youtube.com/watch?v=uf4zOigzTFo- Play the video in VLC. In Subtitles select the appropriate
vttfile. Note for some reason subtitles work in VLC but not in the default ubuntu player
You try to git push and git asks for user/pwd,
-
go to github, create a Personal Access Token PAT (classic)
-
Add your user info, set up credential manager to store the PAT next time:
$ git config --global user.email "my email"
$ git config --global user.name "my name"
$ git config --global credential.helper store # to store PAT in the credential manager- Next time you try to push, git requests username/PAT one last time and the credential manager stores it:
$ git push
Username for 'https://github.com': # enter your username
Password for 'https://mhered@github.com': # enter your PATmany CAD files available for download are in SLDPRT format and SolidWorks requires suscription
- Create account in OnShape (with spam user), open file then export as STL or STEP
- AnyConv but rather unreliable: scale not respected, or failure to convert
- ConvertCADFiles: one free trial, afterwards pay per conversion
- Not tested: download eDrawing (for Windows)
Markdown does not display mp4 and converting directly to gif yields huge files
- record live video with iphone (optionally edit it in the phone using imovie) / save desktop screencast with kazaam to mp4
- edit mp4 in shotcut: cut to length, speed up?, select loop, export as gif animation
- upload gif to https://www.iloveimg.com/, resize by percentage 75% smaller
You made too many changes in your code without commiting, it does not work and you cannot debug. You want to go back and reapply changes step by step
# 1. stash staged, unstaged and also untracked files (ignored files are not stashed)
git stash push -u -m "Full backup before debugging"
# 2. go back to last safe commit (optional)
git reset --hard HEAD
# 3. create a patch file (optional, for safety)
git stash show -p stash@{0} > changes.patch
# 4. Create a new branch to work on
git checkout -b fix-mess
# 5. Apply the full patch (it becomes unstaged changes)
git stash apply stash@{0}
# 6. Use Git's interactive staging to pick parts
git add -p
# Options: y = stage this hunk, n = skip, q = quit,
# a = stage all, d = skip all,
# s = split hunk, e = edit manually, ? = help
git commit -m "First clean chunk of change"
git stash push -u -m "Tmp testing first chunk" # put aside uncomitted changes
# <run tests>, when succesful ->
git stash pop # apply and drop the temporary stash to resume adding changes
# Repeat until all desired changes are committed
# Abort if needed
git reset --hard
# when done: drop stash
git stash drop stash@{0}
# then merge the branch and delete it
git checkout main
git merge fix-mess
git branch -d fix-mess
| Step | Command |
|---|---|
| Apply full patch | git apply changes.patch |
| Stage part of it | git add -p |
| Commit | git commit -m "..." |
| Repeat | git add -p, then git commit again |
| Abort if needed | git reset --hard |