Wednesday, April 23, 2014

Cisco AnyConnect reconnection on Mac

My Cisco AnyConnect thingy would complain whenever I lost an internet connection. I enabled reconnection by looking in /opt/cisco/anyconnect.

First I made a backup of AnyConnectLocalPolicy.xsd.

Then, inside that file, I added the following block inside the <xs: all minOccurs="0"> tag (line 5 for me, above the tag name="FipsMode"):

<AutoReconnect UserControllable="true">true
  <AutoReconnectBehavior UserControllable="true">ReconnectAfterResume</AutoReconnectBehavior>
</AutoReconnect>

C'est tout.

Wednesday, April 16, 2014

Using a usb for Mac and then Linux

I've been using a usb stick on my Mac and I wanted to use it to boot a different machine for Linux. After fiddling with a bunch of file formats and partitions on my Mac, I decided I had done something bad to the usb stick that even mkfs couldn't fix.

I got around this by cleaning out the usb stick (mine is at sdc):

sudo dd if=/dev/zero of=/dev/sdc bs=4M (not sdc1, since I want to kill the whole stick; bs is to speed things up)
sudo fdisk /dev/sdc

There should be no existing partitions, so pressing d should say "No partition defined yet".
Make a new partition (n, then p, then 1, then default, then default, then w).

sudo mkfs.vfat /dev/sdc1
umount /dev/sdc1 (if it got mounted)
sudo dd if=/path/to/iso.iso of=/dev/sdc bs=4M

Should work.