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

Looking at Onshape

I’m a SolidWorks user and have spent considerable time with it over the past several years.  Recently I heard about Onshape.  It looks pretty fascinating – a fresh look at CAD – with full collaboration, versioning, and sharing.

Here is what they say about themselves:

CAD Anywhere, Anytime,
On Any Device.

Onshape is the first and only full-cloud 3D CAD system that lets everyone on a design team simultaneously work together using a web browser, phone or tablet.

The modern web browsers are becoming a truly powerful development platform as illustrated below.  The graphics are (about) as smooth as Solidworks – perhaps not quite so fancy.  But being able to have your CAD anywhere is kind of exciting.  They have a free plan with up to 10 drawings which would be great for schools and students and hobbyists to use.

Update From OnShape: 

Jason  – thank you for the blog post. We here at Onshape are very excited to make professional grade 3D CAD available to everyone for free. Just to clarify, a free user can have UNLIMITED FREE PUBLIC DOCUMENTS AND 5GB OF FREE ONLINE STORAGE. Thats a lot of whatever you’re into :)
In addition – free users ALSO get 10 free private documents (not to exceed 100MB) to test Onshape against a proprietary design need.
Bottom line – if you are a hobbyist or amateur, you can use Onshape for free forever.
Thank you again.
Philip …

2016-01-12 - B092504.png

The Wonder Of 3D Printing

Here is a little robot the kids and I were working on.

We designed it in Solidworks.

8-12-2013 9-57-45 PM.png

Prepared for printing in the MakerWare software.

8-12-2013 10-21-54 PM.png

Printed it on the MakerBot.  It failed halfway through and we had to re-print some of the parts.

IMG_2738.JPG

Here is a closeup of the print.

IMG_2744.JPG

And some pictures of the finished chassis.

IMG_2808.JPG

We used custom rubber bands for tires. Threads were even printed into some of the parts so 6mm bolts could screw right in.

IMG_2810.JPG

A new part for an old Bentley restoration

At Sinking Valley Woodworks, we take on odd jobs from time to time.  One of these odd jobs was some car parts for an old Bentley restoration.  Wood was a much more common material in cars in that era.

This particular piece is what goes at the top of the windshield and connects to the roof.  It has curves on all faces, and compound curves on most.  The new part was made out of Ash, carved on a CNC router, and finished by hand.

Below is some before and after pictures.20151002_141251 bentley part

20151002_141302