Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Wednesday, March 02, 2011

Resizing VirtualBox Virtual Hard Disk (vdi image)

بسم الله الرحمن الرحيم


Assalamualaikum WBT. Today I stumbled upon my VirtualBox hard disk problem. I wanted to install Adobe Photoshop CS5 however, the space available was too small for the disk hogged software. I googled around and luckily found a blog as if it was created to solve my not so little problem. Here is the exact url http://www.modhul.com/2008/10/21/re-sizing-a-virtualbox-virtual-disk-image-file/. I will try to make it easier to understand. I am using Crunchbang linux (Statler) as the host and a closed source VirtualBox (I need USB support).


What You Need?
  1. Shut down the Virtual Box that uses the disk you want to resize.
  2. Remove any snapshots you have.
  3. Backup your vdi image (the VirtualBox hard disk).
  4. Download GParted LiveCD iso here.
  5. Create a new larger disk (according to size that you need).
  6. Attach the new created disk to your VirtualBox as slave.
  7. Mount the GParted iso to your VirtualBox.

Next Steps
  • Boot the virtual machine from the mounted ISO – you may need to reconfigure your VirtualBox to ensure that you boot from the CD-ROM drive before the HDD, so change the VirtualBox settings as shown below or hit F12 at boot and change there.

  • During the boot process the gparted Live CD will prompt you to select the correct keymap – if you are using a QWERTY keyboard, simple select the ‘Don’t Touch Kepmap’ option; next, you will be prompted for the language settings to be used – select the appropriate language code, in my case ’02′ for British English; finally, you will be prompted for the X-Windows mode – select ’0′ to automagically start gparted in an X-Windows session.

  • Once gparted starts, you will be presented with a graphical representation of your disks – left-click the left-to-right bar named /dev/sda1 (your primary hard disk that is to be expanded) and then click on the Copy icon.

  • Select the drop-down-box to the right of the tool-bar and select the second (currently empty) disk – /dev/sdb (possibly /dev/hdb in your environment), the graphical representation of your disks will change to show you the second slave disk which is currently empty. Click on the Paste icon.

  • gparted will will prompt you that all data on the new partition will be erased and if you’re happy, subsequently prompt you on how the disk should be formatted. For a Windows environment, select MSDOS (this will give you an NTFS partition, trust me!).

  • gparted will finally present you with a slider dialog indicating the desired size of the new disk. Drag the slider to the right to select the maximum size of the new partition on this new disk (I’d just drag it so the partition consumes the whole disk), as shown in the screenshot below:


  • Click the Apply icon, you’ll be presented with something along the lines of the screenshot below as the contents of the source disk are copied to the new, larger, disk:
  • Once the copy has completed (approx. 35 mins to create a 30Gb disk from an original 20Gb disk), you will need to mark the new disk as bootable (if this is to be a bootable partition – if not, simply skip the next step).

  • To mark the partition as bootable, right-click the graphical representation of the new disk and left-click Manage Flags. In the dialog that appears, select Boot and click Ok to close. gparted will apply the necessary flag and re-scan your disks.

  • Close gparted and click the Exit icon to shutdown the system.

Completing the Re-Sizing
  • Once the virtual machine has powered off, re-configure the hard disks to use the newly created/copied disk as the primary and remove the old primary disk from the system; finally, unmount the System Rescue ISO from the CD-ROM.

  • Power on your new VM and you should be presented with the the usual Windows boot sequence; if you are just presented with a black screen with a flashing cursor at the top left-hand corner of the screen, there isn’t a boot sector on the disk, so restart gparted and add the boot flag as directed above.

  • Hopefully, your virtual machine will start without issue. Windows may perform a check of the disk during boot. Once logged-in, open Windows Explorer and confirm that the newly created drive is the new larger size.

Saturday, January 22, 2011

Nak Pakai Mac OS X Tapi Tak Mampu? Mari Install Kat PC!

بسم الله الرحمن الرحيم


Assalamualaikum WBT. Memandangkan aku dah lama tak mengemaskini Hijrah Huzaifah lantaran kesibukan dan juga idea yang tak berapa nak ada. Dalam kesihatan yang kurang memberansangkan, aku cuba untuk berkongsi dengan semua pembaca macam mana cara-caranya kalau nak pakai Mac OS X walaupun tiada Mac. Sebenarnya, cara install Mac OS X ke dalam pc, orang panggil Hackintosh dan dah lama pun cara ni. Cuma aku sekadar nak kongsikan kepada sesiapa yang tak pernah tahu. Tutorial ini aku ambil dari sini http://lifehacker.com/5360150/install-snow-leopard-on-your-hackintosh-pc-no-hacking-required .

Aku gunakan contoh Mac OS X versi Snow Leopard memandangkan ia yang terkini di kala ini. Harap maaf kerana aku meng'copy-paste' sahaja tutorial ini (agak malas tika ini, heheh).

-----------------------------------------------

What You'll Need

  • Supported hardware. I laid out my list of supported hardware in my previous posthere. It's not the only hardware that will work with OS X, but it's the only hardware that's guaranteed to work with this guide.
  • A USB thumb drive that's at least 8GB in size (I'm using this 16GB Corsair drive, but obviously any sufficiently sized thumb drive should do just fine.)
  • A copy of the Snow Leopard Install DVD. You can use the $29 "Upgrade" disc to install, even though this is a fresh installation. Note: If you feel like being completely honest, go ahead and buy the Mac Box Set-though, honestly, Apple's practically made it hard *not* to buy the fully functional install disc.
  • Another Mac to prepare your thumb drive. (You'll only need this other Mac for a few steps. I used my MacBook Pro, but you could also borrow a friend's for an hour or so, too.)
  • The EP45UD3P Snow Leopard install package. This package allows you to skip all the command line work in my last guide, and you can download it here.

Step One: Prepare Your Thumb Drive

Install Snow Leopard on Your Hackintosh PC, No Hacking RequiredIn this step, you're going to format your thumb drive and then restore the Snow Leopard DVD image to the thumb drive because later we'll be installing Snow Leopard to your hard drive using this thumb drive rather than the DVD. "Why?" you ask. Because in order to boot the installer, we need to customize the disk image with some special helper files of our own.

I went into great detail on this process last time, so this time I'm just going to include the step-by-step video below (made by the same generous man who created the EP45UD3P Snow Leopard installer package). If you want to read the very detailed version for a thorough explanation of how to rip the Snow Leopard install DVD to a disk image and then restore that image to your thumb drive, go here. (Come back when you get to the "Semi-heavy Terminal work" warning. That's when you're ready for the new and improved easy part.)


Note: Watch the video in HD and fullscreen to get a closer look at everything that's happening.

As you can see in the video, after you restore the Snow Leopard install DVD to your thumb drive, all you've got to do is fire up the EP45UD3P Snow Leopard.pkg file (if you haven't already downloaded and unzipped it, you can grab it here), select your thumb drive, and, let the installer take care of all the dirty work that you previously had to do one line at a time in Terminal.

Once you've finished there, you're ready to set your BIOS and install Snow Leopard.

Step 2: Set Your BIOS

Before you can boot into or install OS X on your Hackintosh, you've got to make some small adjustments to your system BIOS (press Delete at system startup to tweak your BIOS settings). Rather than taking you step by step through every change you need to make, I've simply snapped a picture of the relevant BIOS screens and added some notes. Just click through these images and make sure your BIOS settings match up.

Step 3: Install Snow Leopard

If you've made it this far, the hard part is over. Now it's time to install Snow Leopard, which—unlike what we've done so far—is extremely easy.

Make sure you've set the boot priority in your BIOS to boot from your thumb drive (you can see how in this pic), then simply plug your prepared thumb drive into your Hackintosh and power it up. Since screenshots aren't really an option—and since it's a fairly easy process—my install instructions come in video format:

The quick version goes like this: Boot into the Snow Leopard installer, format the hard drive you want to install Snow Leopard to (go to Utilities -> Disk Utility, then click on the drive, select 1 Partition, Mac OS X Journaled (Case-Sensitive Update: Several readers have suggested that case-sensitive formatting can cause problems with some applications, like Adobe's Creative Suite, so you may be better off sticking with plain old Mac OS X Journaled.), give it a name, and make sure GUID Partition Table is set in the Options. After you Apply the new partition, go back to the installer and install like normal to that drive. When you reboot after the install completes, press the arrow keys at the graphical boot menu and select the drive you just installed Snow Leopard to.

Two Last Tweaks

You could just stop there and be pretty happy at your new Hackintosh, but there are two little, easily performed tweaks you'll want to tackle to get everything in tip top shape: The first will get your sound fully working, and the second will allow you to boot into Snow Leopard without your thumb drive.

Tweak One: Snow Leopard should be up and running on your Hackintosh like a dream—with one exception: Sound isn't entirely working yet. You may notice that sound actually does work in some instances, but not all. In the old guide, you needed to install a custom audio kext (your Mac's equivalent to a driver); the setup has been slightly tweaked in this new method, so all you should actually need to do is open up the Sound preference pane in System Preferences (/Applications/System Preferences), click the Output tab, and change the output device to Built-in Line output (I haven't tested with digital out, but it should work fine in theory).

Install Snow Leopard on Your Hackintosh PC, No Hacking Required

Tweak Two: At this point, in order to boot to your newly installed Snow Leopard installation, you need to have your thumb drive plugged in so it loads the custom bootloader, from which you can select your new Snow Leopard hard drive. To install the custom bootloader to your hard drive (so you no longer need the thumb drive to boot), again download the EP45UD3P Snow Leopard.pkg zip file and run it, but this time, instead of choosing to install the package to your thumb drive, select the hard drive you've installed Snow Leopard to. Once the installer completes, you'll no longer need your thumb drive plugged in to boot into Snow Leopard.

Install Snow Leopard on Your Hackintosh PC, No Hacking Required

Congratulations! You've Got a Fully Functional Hackintosh—the Easy Way

Install Snow Leopard on Your Hackintosh PC, No Hacking RequiredWhere the method I covered previously required a good amount of time and care in Terminal, this new and improved method is a breeze, and it works even better. (Sound works out of the box without any custom kexts, for example.)

It's also worth noting that you can go ahead and upgrade to OS X 10.6.1without any problems.

Wednesday, November 24, 2010

Lupa Password Windows? Jangan Risau. Reset dengan Ubuntu Live CD!

بسم الله الرحمن الرحيم




Assalamualaikum. Sejajar dengan permintaan seorang sahabat yang kehilangan kata laluan untuk komputer rimba miliknya (milik orang lain, jangan pandai-pandai nak reset password), maka aku lampirkan di sini cara yang paling mudah dan sesuai bagi mereset dan menukar password Windows dengan menggunakan Ubuntu Live CD.

Cara ini dipetik dari howtogeek.com

---------------------------------------------------


If you can’t log in even after trying your twelve passwords, or you’ve inherited a computer complete with password-protected profiles, worry not – you don’t have to do a fresh install of Windows. We’ll show you how to change or reset your Windows password from a Ubuntu Live CD.

This method works for all of the NT-based version of Windows – anything from Windows 2000 and later, basically. And yes, that includes Windows 7.

Note: If you have files on your hard disk encrypted using built-in Windows encryption, they may not be available after changing the Windows password using this method. Exercise caution if you have important encrypted files.

You’ll need a Ubuntu 9.10 Live CD, or a bootable Ubuntu 9.10 Flash Drive. If you don’t have one, or have forgotten how to boot from the flash drive, check out our article on creating a bootable Ubuntu 9.10 flash drive.

The program that lets us manipulate Windows passwords is called chntpw. The steps to install it are different in 32-bit and 64-bit versions of Ubuntu.

Installation: 32-bit

Open up Synaptic Package Manager by clicking on System at the top of the screen, expanding the Administration section, and clicking on Synaptic Package Manager.

sshot-1

chntpw is found in the universe repository. Repositories are a way for Ubuntu to group software together so that users are able to choose if they want to use only completely open source software maintained by Ubuntu developers, or branch out and use software with different licenses and maintainers.

To enable software from the universe repository, click on Settings > Repositories in the Synaptic window.

sshot-2

Add a checkmark beside the box labeled “Community-maintained Open Source software (universe)” and then click close.

sshot-3

When you change the repositories you are selecting software from, you have to reload the list of available software. In the main Synaptic window, click on the Reload button.

sshot-4

The software lists will be downloaded.

sshot-5

Once downloaded, Synaptic must rebuild its search index. The label over the text field by the Search button will read “Rebuilding search index.” When it reads “Quick search,” type chntpwin the text field. The package will show up in the list.

sshot-6

Click on the checkbox near the chntpw name. Click on Mark for Installation.

sshot-7

chntpw won’t actually be installed until you apply the changes you’ve made, so click on the Apply button in the Synaptic window now.

sshot-8

You will be prompted to accept the changes. Click Apply.

sshot-9

The changes should be applied quickly. When they’re done, click Close.

sshot-10

chntpw is now installed! You can close Synaptic Package Manager. Skip to the section titledUsing chntpw to reset your password.

Installation: 64-bit

The version of chntpw available in Ubuntu’s universe repository will not work properly on a 64-bit machine. Fortunately, a patched version exists in Debian’s Unstable branch, so let’s download it from there and install it manually.

Open Firefox. Whether it’s your preferred browser or not, it’s very readily accessible in the Ubuntu Live CD environment, so it will be the easiest to use. There’s a shortcut to Firefox in the top panel.

sshot-24

Navigate to http://packages.debian.org/sid/amd64/chntpw/download and download the latest version of chntpw for 64-bit machines.

Note: In most cases it would be best to add the Debian Unstable branch to a package manager, but since the Live CD environment will revert to its original state once you reboot, it’ll be faster to just download the .deb file.

sshot-17

Save the .deb file to the default location.

sshot-18

You can close Firefox if desired. Open a terminal window by clicking on Applications at the top-left of the screen, expanding the Accessories folder, and clicking on Terminal.

sshot-14

In the terminal window, enter the following text, hitting enter after each line:

cd Downloads
sudo dpkg –i chntpw*

sshot-19

chntpw will now be installed.

Using chntpw to reset your password

Before running chntpw, you will have to mount the hard drive that contains your Windows installation. In most cases, Ubuntu 9.10 makes this simple.

Click on Places at the top-left of the screen. If your Windows drive is easily identifiable – usually by its size – then left click on it.

sshot-11

If it is not obvious, then click on Computer and check out each hard drive until you find the correct one.

sshot-12

The correct hard drive will have the WINDOWS folder in it. When you find it, make a note of the drive’s label that appears in the menu bar of the file browser.

sshot-13

If you don’t already have one open, start a terminal window by going to Applications > Accessories > Terminal.

sshot-14

In the terminal window, enter the commands

cd /media
ls

pressing enter after each line. You should see one or more strings of text appear; one of those strings should correspond with the string that appeared in the title bar of the file browser earlier.

Change to that directory by entering the command

cd

Since the hard drive label will be very annoying to type in, you can use a shortcut by typing in the first few letters or numbers of the drive label (capitalization matters) and pressing the Tab key. It will automatically complete the rest of the string (if those first few letters or numbers are unique).

sshot-15

We want to switch to a certain Windows directory. Enter the command:

cd WINDOWS/system32/config/

Again, you can use tab-completion to speed up entering this command.

sshot-16

To change or reset the administrator password, enter:

sudo chntpw SAM

SAM is the file that contains your Windows registry. You will see some text appear, including a list of all of the users on your system.

sshot-20

At the bottom of the terminal window, you should see a prompt that begins with “User Edit Menu:” and offers four choices. We recommend that you clear the password to blank (you can always set a new password in Windows once you log in). To do this, enter “1” and then “y” to confirm.

sshot-21

If you would like to change the password instead, enter “2”, then your desired password, and finally “y” to confirm.

sshot-25

If you would like to reset or change the password of a user other than the administrator, enter:

sudo chntpw –u SAM

sshot-22

From here, you can follow the same steps as before: enter “1” to reset the password to blank, or “2” to change it to a value you provide.

sshot-23

And that’s it!

Conclusion

chntpw is a very useful utility provided for free by the open source community. It may make you think twice about how secure the Windows login system is, but knowing how to use chntpw can save your tail if your memory fails you two or eight times!

--------------------

Sumber dari www.howtogeek.com