Archive for ‘CLI’ Category

How to set the Boot Volume from CLI in OSX

datePosted on 19:28, July 23rd, 2007 by Many Ayromlou

I’ve run into this issue a number of times a year, including today again, and I have to dig up the email I sent to myself last year with the command line in it. If, like us, you have a bunch of headless Xserves and you’re trying to (re)install OSX on them you might have run into this. How the heck do you change the boot volume to the CD/DVD in the drive when you have no keyboard/mouse access or remote desktop? Well turns out it’s quite simple (as usual). Just issue the command below from a ssh session (make sure the install CD/DVD is in the drive first):

  • Run diskutil list to make note of the CD drives partition number (usually /dev/disk1s2 if the system has one Hard drive only).
  • Run sudo bless –device /dev/disk1s2 –setBoot (You can also add –nextonly if you want to do this for just one boot cycle).
  • Run sudo reboot

You can also set a netboot server as your boot source:

  • Run sudo bless –netboot –server bsdp:// (for subnet broadcast or specific IP address for specific netboot server).
  • Run sudo reboot

Bless the bless guy for blessing us with the bless tool :-)

Good old TTY…

datePosted on 16:27, June 22nd, 2007 by Many Ayromlou

I love tty. I love command line. I love vi. Well if you agree with any one of these statements, you have to check out It is absolutely simple and stunning at the same time. All you need is a telnet connection (you can even do it across serial terminals). Here is how it works:

– sign up for a account with a real email address.
– wait for confirmation email, click the link inside the email to confirm and create your startty account.
– login to website and goto the configuration screen to setup your panels.
– setup your 8 panels with different content
– bring up a terminal window and telnet to on port 50000 (telnet 50000)

Now go and grab the oldest computer you can find, hookup a wise terminal to it and amaze all your blogging/facebooking/rss’ing friends :-) TEXT TERMINALS RULES!!!


HDHomeRun: Multicast

datePosted on 14:58, May 28th, 2007 by Many Ayromlou

Using hdhomerun_config command you issue the following (after tuning into the channel ofcourse):

1) hdhomerun_config set /tuner0/target none
2) hdhomerun_config set /tuner0/channel qam:
a) hdhomerun_config set /tuner0/streaminfo
3) hdhomerun_config set /tuner0/program
4) hdhomerun_config set /tuner0/target

MCast Address is in range of: –>

HDHomeRun: Monitoring Signal Strength from command line

datePosted on 14:56, May 28th, 2007 by Many Ayromlou

The Windows GUI version of hdhomerun_config will display the signal strength and signal quality updating every second.

Under linux or osx you can use “watch” with hdhomerun_config:
hdhomerun_config FFFFFFFF get /tuner0/channel 8vsb:
watch hdhomerun_config FFFFFFFF get /tuner0/status

(If you have more than one HDHomeRun then specify the device ID rather than FFFFFFFF)

HDHomeRun: Automatic Channel Scan from command line

datePosted on 14:53, May 28th, 2007 by Many Ayromlou

The CLI version of hdhomerun_config supports running an automatic channel scan.

The CLI version of hdhomerun_config can be downloaded from:


hdhomerun_config FFFFFFFF scan

For example:

hdhomerun_config FFFFFFFF scan /tuner0
hdhomerun_config FFFFFFFF scan /tuner1

Digital Cable:
hdhomerun_config FFFFFFFF scan /tuner0
hdhomerun_config FFFFFFFF scan /tuner1

HDHomeRun: To save the RAW TS stream to disk

datePosted on 14:52, May 28th, 2007 by Many Ayromlou

To save a 30 second unfiltered clip of a broadcast stream:

1) Use HDHomeRun Config (GUI) to choose the physical channel.
Ensure VLC is not running for the next commands…

2) Open a cmd prompt and change into the HDHomeRun program directory:
cd “C:\Program Files\Silicondust\HDHomeRun”

3) Set the filter:
hdhomerun_config FFFFFFFF set /tuner0/filter 0x0000-0x1FFE

4) Save the stream to disk:
hdhomerun_config FFFFFFFF save /tuner0 sample.ts

5) Wait 30 seconds and stop the stream by pressing Ctrl-C.

You use hdhomerun_config to manually configure HDHomeRun to stream video to a PC running VLC…

You will need:

hdhomerun_config –

1) Discover HDHomeRun

Run “hdhomerun_config discover” to find the HDHomeRun units on the local network.

If you have more than one HDHomeRun on your network then replace the wildcard FFFFFFFF Device ID in the examples with the Device ID of the HDHomeRun you wish to control.

2) Run a channel scan

hdhomerun_config FFFFFFFF scan /tuner0

3) Set the channel

hdhomerun_config FFFFFFFF set /tuner0/channel 8vsb:
hdhomerun_config FFFFFFFF set /tuner0/channel qam:

Note that the channel is the physical ATSC channel, not the channel advertised by the TV station. is a good site for determining which stations are nearby and what physical channels they operate on:

Check the signal strength using the following command:
hdhomerun_config FFFFFFFF get /tuner0/status

4) Select the program number

hdhomerun_config FFFFFFFF get /tuner0/streaminfo

hdhomerun_config FFFFFFFF set /tuner0/program

5) Launch VLC and open network stream
From the command line:
vlc udp://@:1234

From the GUI:
Launch VLC
File -> Open Network Stream
Choose UDP/RTP, Port 1234

6) Set the target for the video stream

hdhomerun_config FFFFFFFF set /tuner0/target :1234

Note that the target setting is automatically cleared if the target machine is not listening on the specified port. ie if VLC is not running or you quit VLC.


Check the signal strength using the following command:
hdhomerun_config FFFFFFFF get /tuner0/status

Check the target using the following command:
hdhomerun_config FFFFFFFF get /tuner0/target

If it reports “none” then most likely the pc was not listening on the target port and the ip/port was automatically cleared. Double check the following and then set the target again:
– Check that VLC is running and is using “udp://@” or “udp://@:1234”.
– Check the IP address of the machine VLC is running on.
– Check that the port is not blocked by a firewall.

If the target is correct and the LED on the HDHomeRun indicates it is streaming video then the most likely problem is a firewall blocking the port (UDP port 1234 used in this example).