Centos AMI on Amazon EC2 – How To Resize The Disk

When using the official CentOS Linux AMI on EC2, it comes (currently) with only an 8GB partition.  Want to resize that?  Here is how…

First make sure you start a small (t2.micro or similar) instance to do this work with.  It should be based on the Amazon Linux AMI.  You should have root access to it.  Let’s call it “fix-the-disk-instance”.

  1. Stop the NEW instance
    1. Go to EC2 > Instances
    2. Select the Instance
    3. Make sure the Instance has a name that makes sense (e.g. snap.appcove.net)
    4. Click “Actions” > “Instance State” > Stop
  2. Detach the block device
    1. Go to EC2 > Volumes
    2. Find the volume by looking under Attachment Information for the instance name (e.g. snap.appcove.net)
    3. Select the volume
    4. Click “Actions” > “Detach Volume”
  3. Attach the block device to “fix-the-disk-instance”
    1. Go to EC2 > Volumes
    2. Find the volume by looking under Attachment Information for the instance name (e.g. snap.appcove.net)
    3. Select the volume
    4. Click “Actions” > “Attach Volume”
    5. Attach it to “fix-the-disk-instance” so we can fix it up
  4. Start “fix-the-disk-instance” and login
    1. Go to EC2 > Volumes
    2. Select the Instance “fix-the-disk-instance”
    3. Click “Actions” > “Instance State” > Start
    4. Wait for it to start
    5. SSH into it and escalate to root
  5. Run `parted` command and print list
    1. As root, run the following command: parted
    2. Type the following command: print all<enter>
    3. Find your disk in the output and note the path (e.g. /dev/xvdf)
    4. Quit the program by typing: quit<enter>
  6. Resize the partition:
    1. Run fdisk on the device path found above (e.g. fdisk /dev/xvdf)
    2. List the partitions
      1. Type: p<enter>
      2. Take note of the “Start” column (e.g. 2048)
    3. Delete the partition
      1. Type: d<enter>
    4. Create a new one by typing:
      1. n (for new)
      2. p (for primary)
      3. 1 (for first partition)
      4. Type first sector the same as the Start column above (e.g. 2048)
      5. Last sector should be the default (end of disk)
      6. w (for writing to disk)
  7. Now check the partition and resize it
    1. Run this command making sure to use the right device path (but add a 1 to the end for the first partition)
      1. e2fsck -f /dev/xvdf1
    2. Resize the partition making sure to use the right device path (but add a 1 to the end for the first partition)
      1. resize2fs /dev/xvdf1
  8. Shutdown the instance “fix-the-disk-instance”
    1. Go to EC2 > Instances
    2. Select the Instance “fix-the-disk-instance”
    3. Click “Actions” > “Instance State” > Stop
  9. Detach the block device and reattach it to the original server
    1. Go to EC2 > Volumes
    2. Find the volume by looking under Attachment Information for the instance name (e.g. fix-the-device-instance).
    3. Make sure it is the right volume by looking at the ID/Size.
    4. Select the volume
    5. Click “Actions” > “Detach Volume”
    6. Click “Actions” > “Attach Volume”
    7. IMPORTANT: enter “/dev/sda1” as the device so it attaches as the root volume
    8. Attach it to the original server
  10. Start “fix-the-disk-instance” and login
    1. Go to EC2 > Volumes
    2. Select the original instance (e.g. “snap.appcove.net”)
    3. Click “Actions” > “Instance State” > Start
    4. Wait for it to start

 

And that’s all!

 

 

2016-03-20 - B162957

2016-03-20 - B164242

2016-03-20 - B164338

 

 

CNC Gears Made From Baltic Birch

If I have a CNC router and haven’t made wooden gears – isn’t that a crime?

http://geargenerator.com -> SVG -> InkScape -> EPS -> VCarve Pro -> WinCNC -> CAMaster CNC Router -> Baltic Birch -> Gears

20160307_222245.jpg

They run very smoothly.  Next I need to improve the mounting.  I’m thinking either real bearings or HDPE bushings.

Unicode — The Beginnings

“For me, the need for Unicode first struck about 12 years ago [1985]. While I had done some internationalization while working in Europe, I hadn’t worked on any of the more interesting scripts.  Two programmers, Ken Krugler and I were working on a “skunkworks” project in Sapporo, Japan. Our goal was to produce the first Kanji Macintosh.

Working with our Japanese counterparts was made somewhat more challenging because of the translation issues. In the best of all possible worlds, we would all have spoken a common language. Second best would have been having a technically savvy translator, experienced with software engineering design and concepts. What we actually had was one, lone Apple marketing person, who happened to be bilingual.

Imagine yourself in that situation, having to discuss how to combine Huffman encoding and run-length encoding to compress Japanese input dictionaries. We soon learned the full impact of the phrase “to lose something in translation!”

But then our translator had to leave, and we were left with just vestiges of English on their side, and miniscule Japanese on ours. We then found out just how useful a white-board can be.

Yet one day we hit a stumbling block, and were just not making progress. We had known that Japanese needed two bytes to encompass the large character set, and we had prototyped how to adapt the system software to use two-byte characters. However, we were having trouble figuring out exactly how things fit together with our counterparts’ data formats.

Remember [that] we were new to this, so it didn’t hit us right away. But all of a sudden, we could see the light go on in both of our faces: we had assumed that the standard Shift-JIS character set was a uniform two-byte standard. We were so, so wrong. You needed a mixture of single and double bytes to represent even the most common text. Worse yet, some bytes could be both whole single byte-characters, and parts of double-byte characters. We weren’t in Kansas anymore!

We persevered, and ended up producing a successful product [Apple KanjiTalk].  But — although we kicked around different ideas for a radically new kind of character set — we never did anything with these ideas. That is, not until we heard about a proposal from colleagues at Xerox for such a new kind of character set, a character set originated by Joe Becker, a character set that he baptized ‘Unicode’.”

Mark Davis, President and Co-founder of the Unicode Standard and the Unicode Consortium:
Quoted from Keynote Address,“10 years of Unicode”
September 1997 Eleventh International Unicode Conference #11 (©Unicode, Inc. 1997)

http://www.unicode.org/history/earlyyears.html