Sunday, 6 October 2024
Monday, 11 March 2024
Set the boot files and boot the system from the GRUB prompt.
https://www.linuxfoundation.org/blog/blog/classic-sysadmin-how-to-rescue-a-non-booting-grub-2-on-linux
When you’re at the grub>
prompt, you have a lot of functionality similar to any command shell such as history and tab-completion.
- Use the ls command to list the contents of various partitions
and identify the linux root partition
grub> ls
- The boot/ folder in the root partition would contain the linux
kernel and intrd image (initial ramdisk image)
- Set the root partition, kernel and intrd image using grub> prompt
grub> set root=(hd0,gpt2)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda2
grub> initrd /boot/initrd.img-3.13.0-29-generic
grub> boot
The first line sets the partition that the root filesystem is on. The second line tells GRUB the location of the kernel you want to use. Start typing
/boot/vmli
, and then use tab-completion to fill in the rest. Typeroot=/dev/sdX
to set the location of the root filesystem. Yes, this seems redundant, but if you leave this out you’ll get a kernel panic. How do you know the correct partition? hd0,1 = /dev/sda1. hd1,1 = /dev/sdb1. hd3,2 = /dev/sdd2. I think you can extrapolate the rest.The third line sets the
initrd
file, which must be the same version number as the kernel.The fourth line boots your system.
- When you have successfully booted your system, run these commands to fix GRUB permanently:
sudo update-grub
sudo grub-install /dev/sda
Install TeXstudio on Ubuntu
Add the ppa
sudo add-apt-repository ppa:sunderme/texstudio
sudo apt install texstudio
sudo apt install texlive-latex-extra
sudo apt install texlive-bibtex-extra
sudo apt install biber
## To solve eps figures not included in tex output
sudo apt install texlive-font-utils
Sunday, 10 March 2024
Compress pdf on Ubuntu
$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
-dPDFSETTINGS=/screen lower quality, smaller size. (72 dpi)
-dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs. (150 dpi)
-dPDFSETTINGS=/prepress output similar to Acrobat Distiller "Prepress Optimized" setting (300 dpi)
-dPDFSETTINGS=/printer selects output similar to the Acrobat Distiller "Print Optimized" setting (300 dpi)
-dPDFSETTINGS=/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file