The ramblings of Steve-0Posts RSS Comments RSS

Archive for the 'General' Category

Mounting a xen disk image file on dom0

If you need to get in and edit some files on your xen domU instance, i.e. it isn’t booting up properly, etc, here’s how to mount it on dom0. In this case, we want to mount the second partion on the virtual disk (our root partition):

  • Print out the partition layout:
    fdisk -l /path/to/img/file.img

    Disk System.img: 0 MB, 0 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    System.img1 1 4 32098+ 83 Linux
    System.img2 * 5 619 4939987+ 83 Linux
    System.img3 620 750 1052257+ 82 Linux swap / Solaris

  • create directory to mount image under: mkdir /mnt/tmp
  • mount the image using the offset from the fdisk output, the start block (in this case 5)
    mount mount -o loop,offset=$((512*5) /path/to/img/file.img /mnt/tmp
  • Edit files as needed, and unmount when done.
  • No responses yet

    Photos from our trip now online

    I finally fought the jet-lag, and got around to posting photos from most of our trip.

    All of them are available on my main picasa page,
    http://picasaweb.google.com/stevendavidruiz

    And now for individual galleries:
    I added some underwater photos to our snorkeling gallery:
    http://picasaweb.google.com/stevendavidruiz/SnorkelingInMalaysia

    A great Hike we went on in Taiwan – Caoling Historic Trail
    Along the Chao Phraya in Bangkok – River Cruise
    Pattaya, Thailand
    Misc Thailand Photos
    Around Taipei

    No responses yet

    New photos from Malaysia

    I posted some new photos from our trip to Malaysia – I’ll be writing something about the trip in a day or two, but for now, enjoy the pictures :) .

    Picasa Photo Gallery

    No responses yet

    Blood, Sweat, and Sledgehammers

    Call us crazy, but this weekend we started on our third bathroom remodel (for those keeping count, that’s the third of three bathrooms in the house). It’s always fun when you can grab a three-pound hammer and go to town on the walls, but it does draw both blood and sweat (I sliced up my hands even with gloves on). Now that we’re seasoned pro’s when it comes to this stuff ;) , things move pretty quickly, and I’d say we spent 6 or 7 hours total on the demo, and basically stripped the bathroom to walls and floor only.

    In the weeks to come, we’ll be installing new plumbing (fixtures, etc), new tub, drywall/backer board, tile, new pedestal sink, wainscotting, etc. We’ll post photos and notes along the way, here are some pics of this weekend’s adventures.

    No responses yet

    Win a free iMac at rakxzo.com!

    My buddy Oscar recently started a contest, open to 14 – 19 year olds, to win a brand-new iMac. Contest details are available at the link below, but basically involve an original writing – research, news, opinion, etc. A great opportunity for those that qualify, and all you have to do is write! Check out the rules, and register, at:

    http://rakxzo.com/giveaway

    http://rakxzo.com/giveaway/contest-rules/

    No responses yet

    Automatic X11 forwarding with ssh

    I use ssh on a daily basis for almost all my work (and at home, for managing my linux server), and occasionally have the need to run a X11 program. In that past I have been going through the pain of setting all the variables, on both the remote server and my local machine. I start up my X server, run xhost +ip.addr.ess, and on the remote server, set the DISPLAY variable. This does work fine if you’re on a routable network, but if not there’s a lot more trickery involved.

    Finally I took the time to figure out the proper settings for forwarding X11 using ssh – they involve changing both your ssh client config, and the ssh server config, so you’ll need permissions for both ( or ask your friendly sysadmin).

    On the server side, you need the following in sshd_config (/etc/ssh/sshd_config on Centos/RHEL/Fedora/etc):

    X11Forwarding yes
    X11DisplayOffset 10

    The first line enables ssh forwarding, and the second sets the X11 display offset to start handing out to ssh clients (i.e. localhost:10).

    On the client side, there is the option to change X11 forwarding settings in the global or local config file. I recommend changing settings locally, per server, as this will minimize your security risks – if a malicious user could get access to the display device, he could snoop on all your activity, keystrokes included.
    Edit, and create if needed, ~/.ssh/config. Setup per-server entries for each server you want to enable forwarding to, like so:

    Host 10.1.2.3
    ForwardX11 yes
    Host 10.1.2.4
    ForwardX11 yes
    ForwardX11Trusted yes

    All you need is a Host entry, and ForwardX11 yes to get it working. With some applications (java), you will need to add the ForwardX11Trusted line as well, but don’t do so unless you are getting a blank box instead of your application. I needed this for my primary use of X11 forwarding, managing Veritas Netbackup.

    No responses yet

    Bathroom finished! Surfing! Boston!

    Hi all – as usual, my blog pretty much serves as a place to alert people to new photos of mine. I’ve started using google’s picasaweb because, if you haven’t noticed, my site is horribly slow. I will have to wait until my contract is up, but in the meantime, I’d recommend against webhero.com.

    That said, here’s some of the latest photos – our contractor finished our major bathroom remodel a while back, and I finally got around to putting up photos. Also included are some photos from my trip to boston, and some from the US open surfing competition. On the boston ones, make sure to click on the “View Map” button on top, I mapped each photo so you can follow my walk around the city.

    Google Photo Gallery

    One response so far

    Done with our bathroom remodel – finally

    This weekend we put the finishing touches on the bathroom we’ve been remodeling the past three or four months, so I’m happy to say its finished!. We re-did pretty much everything in the bathroom – tore it down to studs and concrete, and started building back up. It was a LOT of work, but we’re really proud of the results, and have a lot of confidence going into the next remodel (but not for a long while :) ).

    Before:
    the bathroom before

    After:
    After Remodel

    Finished bathroom

    No responses yet

    Lots of new photos

    I have posted a lot of new photos in the past couple months, take a look around the gallery.

    Some photos I just took today of our bathroom remodel (they just finished tiling):
    Remodel Photos
    Photos from our trip to Seattle a couple weeks ago:
    Seattle Photos

    One response so far

    New photo gallery

    I setup a new photo gallery for my site, and I add photos to it all the time.

    Check it out at: Ruizs.org Photo Gallery

    The link is also on the right, under “Photos”.

    No responses yet

    Done unpacking

    Well, that house is now really ours, and we love it!  Here are some new photos with our stuff in it, I’ll post a few more daytime shots as well soon.

    House photos

    No responses yet

    New home in Huntington

    We are currently in escrow for the purchase of a home in Huntington Beach :) .  Everything is still in process, but we have our fingers crossed!  It is a 4 bedroom, 3 bath, has a pool & spa (and a huge master suite).  There’s a link to some photos below, enjoy!

    HB Home Photos

    No responses yet

    Another holiday weekend – San Francisco

    We flew up to Oakland this weekend to hang out with friends – stayed at Laura’s (Angie’s sister) place, and Joe and Beth flew down from Seattle. Teo lives down the street.

    We saved monday to recover from the weekend, and we needed it.  We went to alcatraz, toured the city, hit a blues bar, saw a jazz show, went bar-hopping, went dancing, went wine tasting, bowling, and billiard-ing :) .  It was a great weekend!

    SF, Oakland, and Napa Valley Photos

    No responses yet

    Our Holiday Weekend

    Quite a busy weekend, but a lot of fun and a nice break from working life.  Among other things, we: went to a Counting Crows concert, went to an exotic car show, watched some World Cup soccer, saw Superman Returns, went wine tasting, and watched some fireworks :) .  Some photos:

    Weekend photos 

    No responses yet

    Just another Ferrari

    Angie and I are both car buffs, so we were surprised a while back to learn that there was a weekly exotic car meet, about 20 minutes from our house. The meet is every saturday, 7-9 AM, on PCH close to Crystal Cove state park. Every week about 100 – 200 cars are there to show, and many more people in attendence. You know you’ve seen some nice cars when you pass a Ferrari off as “not that special”. :)

    Some photos: Exotic Car Meet

    No responses yet

    Back to the mountain

    Biking that is. I finally took my mountain bike out for a spin today for the first time in almost a year. I’m definitely going to make a habit out of it too. The weather is perfect out (73 today), and the coastal mountains are beautiful in the springtime. Aliso Woods canyon is one of my favorite biking spots, and just happens to be a 10 minute drive from our house. I had to stop quite a few times during the climb, so I’ve got some work to do before I can ‘clean’ this hill. Anyways, check out some photos I took here:

    Aliso Woods Pics

    No responses yet

    Championship Golf!

    This past weekend, I went to a charity golf tournament put on by the Sigma Phi Epsilon alumni association. I had a blast, and somehow, I won! I’m still trying to figure out how, really. They used the ‘Callaway Scoring System’, which is a kind of one-day handicap, so I guess all those “double par’s” paid off :)

    http://golf.about.com/od/handicaps/l/blcallawaysys.htm

    I felt bad about winning too – I shot a 116!!!, and of course most of the people there shot better than me – one even had a 76. But, it was good fun and I have now have a trophy.

    Some photos:

    Golf Tournament Photos

    No responses yet

    Pictures from Rome (Paris coming soon)

    Posted some new pictures here, make sure and follow all the links on the top of the page:

    Rome Photos

    No responses yet

    Happy New Year! (Chinese, that is)

    We spent some of our Sunday in Leicester Square in London, which is the heart of Chinatown. The celebration was pretty huge, although we never really saw what was going on – too many people were there.

    From our weekend:
    Museums and Churches
    Tower of London

    Chinese New Year, London Chinese New Year, London

    No responses yet

    Amsterdam photos

    Photos from the Netherlands

    No responses yet

    Next »