Wednesday, August 14, 2013

Dual boot Debian 7 Wheezy on existing Win8 UEFI machine


I don't want to bother giving a lengthy background or info... So I'll just try to make this post a short mash up of what you need to know.

Prelude: Dual-booting a laptop/machine wherein there is an existing Windows 8 installed in a UEFI boot-up environment

First off, you'll probably need to do some shrinking of existing partitions. In my case, I just shrank my Windows8 drive C: using the disk manager build-in under the "Computer Management".

Afterwards, you'll need to use a UEFI-bootable linux image. For me, I used a PXE bootable Debian 7 Wheezy-stable image and created a root, swap, and home partition from the unused space. Do take note that you need to use the new GPT partitioning (for those with fresh hard drives); this option is usually asked or selected when using the "advanced mode" when installing.

Now here is the tricky part... after you proceed to install GRUB, that grub instance will not work later after finishing the installation. You will need to use an external USB linux image or disk that can boot as UEFI. This is not necessarily need to be a Debian USB image as I used a Kubuntu 13.04 image and placed it in a USB stick.

Use the USB stick to boot the machine up and use its GRUB rescue to manually boot the already installed Debian. For those a bit lost on using the GRUB rescue command line, below are the lines I used.

set prefix="(hdX,gptX)/boot/grub"
set root="(hdX,gptX)"
insmod normal
normal


Note that the prefix is just to denote the location of the grub installation folder, so the value might change depending on your partition layout. On the example I gave, I only have a root partition so I had to specify the "boot" folder. If your case is that you created a separate "/boot" partition, the prefix would probably look like...

set prefix="(hdX,gptX)/grub"


Once you have managed to boot-up to your installed Debian partition, log-in to your root (or use sudo if that's your preference) and install the following packages:

# apt-get install grub-efi-amd64 efibootmgr

We then have to mount temporarily the partition containing the already existing EFI loader of Windows. This is usually around 250-300MB in partition size and contains files and folders with names like "Boot" and "EFI". I'll leave it up to you which or what partition number that may be.

# mkdir /boot/efi
# mount /dev/sdaX /boot/efi

Next is loading the driver/module for the EFI support, which will then aid with the re-install and detection of GRUB of the existing EFI Windows 8 partition and creating a Debian EFI entry.

# modprobe efivars
# grub-install /dev/sda
# update-grub

Kindly check if there is a new EFI entry present on the output displayed upon executing the "update-grub". Also, check inside /boot/efi if there is a new folder or entry that matches in terms of the name of the EFI entry listed a while back.

If all goes well, you will see a new UEFI boot priority inside your BIOS apart from the UEFI Windows Boot Manager.

Hope this helps!


Other resources that you might find useful:



Sunday, July 21, 2013

GAM: basic scripting for Google Apps Admins

Hi everyone! It has been a while since I posted something useful in this blog site of mine...

I'm currently kept busy by one of my on-the-side projects recently, in particular deploying Google Apps for Education. One thing that I noticed is a need by some admins to automate some bulk task in managing and keeping up-to-date user accounts management in their respective domains. Since time is usually at the essence, and also a luxury, for most IT administrators... they don't have too much time to develop their own robust apps to deal with this kind of work.

One solution that I suggest that you guys can try out is using something called the "Google Apps Manager" (or GAM). It similarly works like the provisioning API of Google Apps but already ready for CLI usage (in my case, it works like a charm in linux).

To sum what GAM is, it is a python based library/command that you can use to connect to your Google Apps Admin Console and make the necessary administrative or user management work. Now the good thing with this is if you combine this with some basic scripting magic, you can now automate some bulk tasks like massive user creation or moving a huge amount of people to a mailing list.

For more info or to check what the Google Apps Manager can really do, check this link out.

Sunday, June 3, 2012

Amazon AWS as a good help for start-ups

I was quite happy and satisfied for being able to attend a talk about a demo/intro about Amazon's cloud-as-a-service solution, the Amazon Web Services. Apart from acquire more technical knowledge, it sort of gave some options to prevent too much cost on set-up of a server for public-viewable production use.

I don't want to bother talking and putting more details on what's the technical differences and the pros and cons of AWS from traditional in-house or other cloud-hosting providers since there is really no absolute truth or "standard" that can explain this in concrete sense. But one thing that I'm actually keen is on their "free tier usage" for new AWS account holders.

Well, on a marketing standpoint, the "free tier usage" is their proof-of-concept or demo-to-purchase to reel in customers and use their offered service... which is all true perhaps. But for tech-enterpreneurs who are looking for ways to deploy their apps or products over the net and be accessible to their target customers, I could really say that AWS should be there on the potential list for achieving it.

The "free tier usage" from what I understand is good for 12 months upon sign-up of a new AWS account... which for the record requires you to provide a credit card. But despite of that uneasiness for people that are not entirely comfortable of letting someone save your credit card credentials... it is a gamble worthwhile. The main agenda at the end of the day is to try out if the 1-year free trial service that AWS offer can meet the requirements of your start-up tech project. In turn, it will make you actually move forward to realization of launching your start-up project into production.

Everyone would like to spend (too much) money on a start-up that has to prove its value, and releasing it to the public market is the driver or decision-block on determining a winning formula or just another rubbish in the bin. Of course, when it does become a huge hit upon release to the public, you would likely need to think of scaling the capacity and performance. In AWS, you can scale your set-up as convenient as you can, and as their saying goes "pay for what you only use".

For more info on this matter, I suggest you to read their program details at Amazon's own website at this link.

Monday, April 30, 2012

[Bug] adding gateway route but with different subnet from network

I encountered a weird behavior from my recent projects that were related to some setup of gateway servers, for both Linux-based (Debian) and BSD-based (FreeBSD) systems... wherein there is an issue when adding static gateway routes that does not match or fall within the defined subnet network configured on a network interface.

To give a better detail or explanation of this predicament of mine, below is a sample network configuration scenario...
  • Network IP address subnet is 10.10.1.0/24, so that's basically 10.10.1.X correct?
  • Gateway IP address is... let's say 10.50.1.27...
Clearly on the scenario given, the IP address of the gateway is outside of the network subnet defined for a network interface. Here in the Philippines, this is a common case for leased-line internet connections coming from telco providers. 

From previous engagements, I don't have a problem hard-coding this on either the interfaces config file or in the rc.conf... but in the recent turn of events and experience, it seems that the latest linux kernels and BSD builds have incorporated a sort-of mechanism that prohibits this kind of configuration to be enabled and up upon start-up of the operating system. I've experienced this issue with a Debian Squeeze server and a FreeBSD version 8 I think (am not really a BSD proficient guy, just the basic UNIX made me survive).

The setup still works with this kind of interface configuration, but upon boot-up, you have to manual place the static routes (using "route" command) for it to recognize and see the gateway IP you want it to use.

My initial solutions involved adding static routes on the interfaces config or on the rc.conf files.

For Linux-based:

post-up route add -net 10.50.1.27 netmask 255.255.255.255 dev eth0
post-up route add default gw 10.50.1.27
post-down route add 10.50.1.27 netmask 255.255.255.255 dev eth0
post-down route add default gw 10.50.1.27

For BSD:

defaultrouter="10.50.1.27"
static_routes="net1"
route_net1="-net 10.50.1.27/32"

Sadly though, my attempts in fixing the BSD-based system ended up in failure. As for the Linux machine, well I have yet to fully test it out since the project suddenly reached the end without further testing.

Hope this rather weird post of mine helped to shed some light to their problem and looking for an answer.

Thursday, August 25, 2011

Finally part of the "exclusive club"

This is just a short brag-out post...

Finally, I was able to convince and treat myself into getting a Macbook Pro. Since I was still eyeing much on the budget, I just got the entry mode 13" with i5 processor. The unit came with a pre-installed Snow Leopard but I was able to register and get the Lion OS upgrade for free.

All I can say is... no wonder a lot of people like to have and own a Mac. The feel, look, the power and convenience...

Simply bliss!

At least I could now say that I know how to use a Windows, a Linux, and now a Mac.

Thursday, February 10, 2011

Toshiba Folio AS100 mod-ding

To those who were able to purchase and get their hands on a quite rare Toshiba Folio AS100 and are suffering greatly on the poor performance of the stock Android OS, there is someone who just saved us from almost throwing our tablets off the window.

A guy by the name (or screen name, not sure) Dexter Picard was very kind enough to develop and release a good and working "FolioMod" image for our tablet PC. There's an active thread running in the XDA Developers forum which discusses further about the actual ROM created and how to install it to your Folio device. Refer to Post #1 on this thread and follow the instructions.

Some key features that you get when using the FolioMod are:
  • fully working and somewhat latest Google Apps (Gmail, Maps)
  • a working Android Marketplace App (Yes, the same market app we have come to love and familiar to any Android device)
  • better tweaked response and performance
  • root privileges of course (very useful for uninstalling the crap-ware pre-bundled by Toshiba, but still it's up to you to remove them)
I'm currently using the FolioMod v1.3c and frankly, I'm quite happy with it. Hope that you will also do and feel the same.

A great deal of thanks and cheers to Dexter and the rest of the people who have contributed heavily on developing and improving the FolioMod image.


Rooting my HTC Desire

Disclaimer: This is not a fool-proof guide on rooting your HTC Desire phone, so using my guide is at your own risk. I won't be held responsible should something goes wrong and bricked your phone throughout the process. I personally did all these preparation and setup and it worked just fine on me.

Just want to share my experience as to how I rooted my HTC Desire (A8181 GSM).

Before I continue further, some key factors and reasons for rooting the phone:
  • A better or functional "recovery" menu compared to the stock
  • With the recovery, I could create/restore a backup image via Nandroid.
  • Using a different OS image available around the net (i.e. CyanogenMod, Oxygen, etc.), but you can stick with your stock rom like I did (HTC sense lol!)
  • replacing my stock Baseband version (for signal and battery performance)
  • Root permissions of course
Some stuff needed to perform/download/install before rooting your phone:
  • USB cable
  • phone must be at least 30% charged (but don't push your luck on this, just charge it to the most you can)
  • "unrevoked" application (you can search it via Google or get it here)
  • RA-desire-v2.0.0 recovery image (highly suggested; Google it)
  • HBoot Drivers (only for Windows users; can be downloaded on the unrevoked website)
  • extreme levels of caution and patience
One main reason why I used the RA-desire-v2.0.0 image compared to the stock ClockworkMod (v3.0 at my time) recovery image that came together with the unrevoked application was that it did not support some mod images available in the web, most especially the Oxygen Gingerbread mod (for those itching to try Android 2.3).

Once you have all these stuff prepared, you have to perform the following changes in your phone...
  • enable USB debugging inside "Settings" -> "Applications" -> "Development"
  • enable Unknown sources inside "Settings" -> "Applications"
  • set default connection type to "charge only" and uncheck "ask me" in "Settings" -> "Connect to PC"
  • backup your sms messages and other stuff (your data in the SD card is safe)
  • no need to remove your SIM card and SD card
These are the steps I performed for the actual rooting...
  1. Run the unrevoked3 application (for Linux users, it should be in "sudo")
  2. [For Windows only] install the HBOOT drivers, so that your PC can correctly detect your device
  3. On the menu, select "Custom recovery" (similar to this wording) and select the RA-desire-v2.0.0 image from the directory you saved it. There will be a "custom" indicated in the bottom center of the unrevoked application if you did this part correctly.
  4. with your Desire turned on, connect the phone with your data cable and onto the PC
  5. upon connecting the phone, the unrevoked application should detect it and prompt a message in which it will be a go or no-go confirmation. Hit the ok button or yes (or whatever)
  6. the unrevoked application will now commence the rooting, just watch your phone and application, and NOT touching your phone or anything
  7. wait for it to finish
  8. yes... wait a bit more... it will restart on its own and do some stuff by itself even more...
  9. it will probably be already at a portion testing or doing a "root"... wait for it...
  10. it should be then loading and replacing your recovery menu
  11. wait for the unrevoked application to be "Done" (literally)... just wait until there's a "Done" shown on your PC screen.
If all is good, it should have landed on your new recovery menu. Congratulations!

To resume to your normal usage, just let it "reboot" and you're good to go again.