Monday, August 22, 2022

Install entware on Asus router without installing Merlin firmware

FROM: https://github.com/Entware/Entware/issues/459

mount /dev/sda /opt


# find your cpu arch here: https://bin.entware.net

wget https://bin.entware.net/aarch64-k3.10/installer/generic.sh

cd /opt

chmod +x ./generic

./generic

Sunday, March 20, 2022

reboot into safemode with vnc enabled

in elevated cmd:

REG COPY HKLM\system\CurrentControlSet\services\tvnserver HKLM\system\CurrentControlSet\control\safeboot\network\tvnserver /s /f


run msconfig and reboot into safe mode with networking enabled:



Thursday, May 11, 2017

grub load temporarily

centos 7
grub-reboot 1

centos 6
echo "savedefault --default=1 --once" | grub --batch
reboot

Thursday, April 06, 2017

linux disable echoing ^C when CTRL-C is pressed

stty -ctlecho

thanks to http://stackoverflow.com/questions/418073/stop-echoing-c-to-terminal

Saturday, April 18, 2015

Make any ISO bootable from USB Using grub4dos

wget http://download.gna.org/grub4dos/grub4dos-0.4.4.zip; unzip grub4dos-0.4.4.zip 
mkdosfs -F32 -I /dev/sdb1 #format usb FAT32
./grub4dos-0.4.4/bootlace.com /dev/sdb #make usb bootable

mount /dev/sdb1 /mnt; cp grub4dos-0.4.4/grldr YOUR_IMAGE.iso /mnt

cat <<EOF > /mnt/menu.lst
title bootable-usb
map (hd0,0)/disk.iso (hd32)
map --hook
chainloader (hd32)
boot
EOF 


Reboot and select booting from USB.

BIG THANKS to http://www.thinkwiki.org/wiki/BIOS_Upgrade#Booting_from_a_USB_Flash_drive

Monday, December 08, 2014

create a new java keystore with existing cert

create a new java keystore with existing cert

openssl pkcs12 -export -in host.crt -inkey host.key > host.p12

# DO ENTER A PASSWORD

keytool -importkeystore -srckeystore host.p12 -destkeystore host.jks -srcstoretype pkcs12

Tuesday, May 20, 2014

debian make convert regular disk to lvm

1. Attach the new disk
2. create lvm
3. dd data from old to new lvm root
4. grub-install /dev/sdb (the new disk)
5. update-grub (in chroot or inside the actual OS)