Monday, September 23, 2019

Dell BIOS update workaround with no battery.

DELL XPS L501X with no Battery running an old BIOS.

tl/dr
extract bios from official release, phlash it from DOS.
...

running the official Bios phlasher fails because I dont have a battery.
error given -144
to sucessfully use the official phlash the laptop needs to be running off AC AND have battery plugged in.

when this fails it does however usefully extract the bios wph file,
in my case to
/USER/AppData/Local/Temp/WinPhlash64/BIOS1.WPH

USER is my username, which will vary on different systems, and you will also need to view hidden files and folders as Local is invisible.

-- now you need a bootable USB-stick to run DOS,
i used RUFUS https://rufus.ie
-- next a DOS version of WinPhlash
i used version 1.7.0.21 https://www.wimsbios.com/phoenixflasher.jsp

-- copy PHLASH16.EXE to the USB drive.
-- copy BIOS1.WPH and rename as BIOS.WPH to USB drive

-- reboot into DOS,
run PHLASH16.EXE

it beeps a lot and loudly, then is finished !!

** dont forget fucking up the BIOS can brick your laptop **

some of this info was supplied by this now deleted blog
https://webcache.googleusercontent.com/search?q=cache:qyhf_0TE20wJ:https://blog.howlin.se/bypassing-error-144-winphlash-on-a-dell-vostro-1520/+&cd=5&hl=en&ct=clnk&gl=au




Friday, January 13, 2017

virtualising raspberry pi.



seems trick is because pi uses ARM processor, need to use QEMU virtualiser.

the basic requirements are
QEMU
kernel to emulate physical environment
OS img to run



here's a simple download, runs on windows, once downloaded and unzipped, run.bat and bob's your aunties live in lover.

http://www.makeuseof.com/tag/emulate-raspberry-pi-pc/

longer do it yourself version with outdated versions

https://www.pcsteps.com/1199-raspberry-pi-emulation-for-windows-qemu/





tips. 


change screen resolution for gui.

sudo nano /etc/X11/xorg.conf

Type the following into the file you have just created:-

Section "Screen"
Identifier "Default Screen"
SubSection "Display"
Depth 16
Modes "800x600" "640x480"
EndSubSection
EndSection


http://web.archive.org/web/20150103125008/http://www.soslug.org/wiki/raspberry_pi_emulation
 


change VM img/HDD size.

qemu-img.exe resize 2015-02-16-raspbian-wheezy.img +10G

when you run the OS, you will then need to "Expand Filesystem" to fill entire image, else you will only have access to the size of the original img
this is done in the Raspberry Pi Software Configuration, which should open on initial boot up, then reboot.
to access configuration

sudo raspi-config

(see
https://www.pcsteps.com/1199-raspberry-pi-emulation-for-windows-qemu/)


change swap size from default 100mb

sudo nano /etc/dphys-swapfile
change to whatever. to restart swap file, can reboot or

sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start


https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/

Friday, April 29, 2016

ubuntu locales issues

getting the error

terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid


generate appopriate locale (in my case AU
then configure.

$ locale-gen en_AU.UTF-8
$ dpkg-reconfigure locales







..
http://stackoverflow.com/questions/19100708/mongodb-mongorestore-failure-localefacet-s-create-c-locale-name-not-valid

Monday, September 21, 2015

virtual box shared folders on linux guest

using ubuntu desktop 14.04

insert guest additions CD image using Devices menu option
should autorun

shut down guest. then add shared folder in settings. tick automount.

restart guest.
shared folder will show in /media/sf_blahblah

need to add permissions

sudo adduser xxxxxxx vboxsf 
log off, log on. should be able to access now

ubuntu 12.05 server
insert guest additions.iso using Devices menu option
restart(?)
sudo mount /dev/cdrom /media/cdrom
ls /media/cdrom
sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
sudo /media/cdrom/VBoxLinuxAdditions.run   
add permissions as above for ubuntu desktop
 
=-=-=-=-
 ubuntu desktop 14.04
https://www.virtualbox.org/manual/ch04.html#sharedfolders 
http://ubuntuforums.org/showthread.php?t=2083709
ubuntu 12.05 server 
http://en.ig.ma/notebook/2012/virtualbox-guest-additions-on-ubuntu-server

Thursday, August 6, 2015

handy linux commands

run a command at a certain time use : at

$ at 12:49
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
at> enteryrcommandherewhatever [return]
warning: commands will be executed using /bin/sh
[ctrl-d]
at>
job x at 2006-05-01 12:49


http://www.brunolinux.com/02-The_Terminal/The_at_Command.html
http://linux.about.com/library/cmd/blcmdl1_at.htm



to kill a process by name rather than PID

kill $(pgrep name)


to run multiple processes from single line cronjob

use && for command2 to require succesful completion of command1
use ; between commands for independent commands
 
5 0 * * * command1 ; command2 ;

Saturday, May 30, 2015

dropbox on ubuntu vps

>>get the dropbox daemon, un-tar, run and link.

   
wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86_64"

tar -xvzf dropbox.tar.gz

~/.dropbox-dist/dropboxd

>>You should see output like this:
   
This client is not linked to any account... Please visit https://www.dropbox.com/cli_link?host_id=7d44a557aa58f285f2da0x67334d02c1 to link this machine.

>> go to url as above. rest is automatic.
will create ~/Dropbox folder, which is auto synced with the cloud dropbox.

a handy script for interfacing with dropboxd
   
wget https://linux.dropbox.com/packages/dropbox.py

++++

~/.dropbox-dist# ./dropbox.py help
Dropbox command-line interface

commands:

Note: use dropbox help to view usage for a specific command.

 status       get current status of the dropboxd
 help         provide help
 puburl       get public url of a file in your dropbox
 stop         stop dropboxd
 running      return whether dropbox is running
 start        start dropboxd
 filestatus   get current sync status of one or more files
 ls           list directory contents with current sync status
 autostart    automatically start dropbox at login
 exclude      ignores/excludes a directory from syncing
 lansync      enables or disables LAN sync



from...

http://www.dropboxwiki.com/tips-and-tricks/install-dropbox-in-an-entirely-text-based-linux-environment#pyDropboxValues

Thursday, September 18, 2014

generate ssh keys


% ssh-keygen -t rsa
Generating public/private dsa key pair.
Enter file in which to save the key (~/.ssh/id_dsa):
(just type return)
Enter passphrase (empty for no passphrase):
(just type return or enter a phrase)
Enter same passphrase again:
(just type return or enter a phrase)
Your identification has been saved in ~/.ssh/id_rsa
Your public key has been saved in ~/.ssh/id_rsa.pub
The key fingerprint is:
Some really long string



once you have generated it, 
run "cat ~/.ssh/id_rsa.pub". That will output the public key






http://www.ece.uci.edu/~chou/ssh-key.html

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

https://help.github.com/articles/generating-ssh-keys