Friday, November 25, 2005
Hard drive recovery with TestDisk
I was given a hard drive in a USB cradle that had an NTFS partition(whole disk) on that was "accidentally" removed. Appeared as though the partition table had been re-written to put the partition back . This didn't work and XP wanted to format, and Linux saw it as a bad NTFS partition.
I got TestDisk and ran it under Linux, point it at /dev/sda. TeskDisks initial analysis didn't find a partition but it allowed a deeper analysis which was able to recover the partition information (seemed to say that it was from a backup (I'm working from memory here)). Once I wrote that back to the drive it appeared as to work as it was originally.
Result was, fixed drive and me being impressed.
I got TestDisk and ran it under Linux, point it at /dev/sda. TeskDisks initial analysis didn't find a partition but it allowed a deeper analysis which was able to recover the partition information (seemed to say that it was from a backup (I'm working from memory here)). Once I wrote that back to the drive it appeared as to work as it was originally.
Result was, fixed drive and me being impressed.
Thursday, November 10, 2005
Hylafax Pager/SMS via Telstra
Just figured out how to get hylafax sending SMS via the sendpage tool that comes with it. Its a whole lot less obvious that writting a qpage configuration file. I'm just covering what I considered the "hard bit".
First thing is to create hylafax/etc/pagermap
What this says is that any number begining with 04 will be sent via the telstra service 018018767 after the slash we reconstruct the phone number (or pin/pager identification number) by appending 04 then \1 says use the use the first matched string of the regex.
Need to ensure that hylafax/etc/config points to hylafax/etc/pagermap
Seems that you need to restart hylafax after changing the pagermap file.
For most other pager services this would be enough but the this service requires a password the password must be put in hylaxfax's "info" database. To do this go to the dir hylafax/info it contains all the parameters about devices hylafax has talked to. Find the file that represents the pager service, NB you might want to attempt to send a page first so the file is created for you.
The info file will end with the phone number 018018767 in this file add
The & means its a locked down value which can't be overwritten and accoding to the man pages, the file won't be removed by faxcron if its got & parameters in it. So it should persist after 30days of inactivity.
That should pretty much do it, yoo should then be able to use sendpage to fire off SMS. Watch your syslog for the activity.
As far as I understand it Telstra bills the caller of the service number for the page/sms, I don't know how much that is so don't blame me if you rack up a big phone bill. its YOUR phone line and YOUR responsible for its use.
First thing is to create hylafax/etc/pagermap
# SMS telstra
04(.*) 018018767/04\1
What this says is that any number begining with 04 will be sent via the telstra service 018018767 after the slash we reconstruct the phone number (or pin/pager identification number) by appending 04 then \1 says use the use the first matched string of the regex.
Need to ensure that hylafax/etc/config points to hylafax/etc/pagermap
Seems that you need to restart hylafax after changing the pagermap file.
For most other pager services this would be enough but the this service requires a password the password must be put in hylaxfax's "info" database. To do this go to the dir hylafax/info it contains all the parameters about devices hylafax has talked to. Find the file that represents the pager service, NB you might want to attempt to send a page first so the file is created for you.
sendpage -p"Just a test"
The info file will end with the phone number 018018767 in this file add
&pagerPassword: "mnmail"
The & means its a locked down value which can't be overwritten and accoding to the man pages, the file won't be removed by faxcron if its got & parameters in it. So it should persist after 30days of inactivity.
That should pretty much do it, yoo should then be able to use sendpage to fire off SMS. Watch your syslog for the activity.
As far as I understand it Telstra bills the caller of the service number for the page/sms, I don't know how much that is so don't blame me if you rack up a big phone bill. its YOUR phone line and YOUR responsible for its use.