Posts Tagged ‘linux’

How to resize a disk in VirtualBox (ubuntu host/windows XP guest)

April 28, 2011 3 comments

I have Virtual Box 3.2.12 installed on ubuntu 10.10. I have several guest OSes, and one of them is a Windows XP installed on a 8 GB virtual hard disk. This size has become too small and I want to resize it (I created dinamically but I need now more space than it’s 8GB).

This are the steps to resize it. I’ll try to make a complete guide with screenshots to be as clear as possible:

  • Create a new virtual disk (dinamically expanding storage). In my case 20GB would be ok.
  • Set your windows virtual machine to have the new disk image as it’s second hard disk (Settings -> Storage)

Adding the secondary disk

  • Get a bootable linux CD and boot the virtual machine from the CD
  • Open GParted
  • Select the first partition (the one which has data): /dev/sda1

GParted, first partition is sda1

  • Select Partition -> Copy
  • Select the second disk (/dev/sdb) that still is unformatted, and click to select the unallocated partition.
  • Select Partition -> Paste and this dialog appears. Choose Advanced to create an msdos partition table:

GParted sdb partition - create a msdos partition table

  • This seems to do nothing, but it creates the partition table to the new disk. So  repeat the copy-paste and you’ll get this dialog:

GParted - pasting the partition to the new disk

  • Resize the size slider to its maximum size and click Paste.
  • Apply the pending operations:

GParted - copying sda1 to sdb

  • When all operations are completed this dialog appears:

GParted - all pending operations sucessfully completed

  • Assign the boot flag to this new partition (/dev/sdb1): Partition -> Manage flags:

GParted - assign the boot flag to the new partition

  • Exit GParted and poweroff the VM
  • Go to Settings -> Storage again and remove the old (smaller) disk (right click on the disk)

Remove the first disk

  • Assign the big disk to the IDE Primary Master (right pane)
  • Power on the VM, a checkdisk is performed because of the new disk assignment, and finally you have the new disk on your Windows guest machine.

Install Edimax Wireless 802.11b/g (EW-7318USG) wifi dongle on ubuntu linux

April 26, 2011 1 comment

I’ve moved at home to a room with no internet connection. I had an Edimax wifi usb adapter (EW-7318USG) that stands for being compatible with Linux OS.

The documentation and the installation CD is only for windows 😦

I plugged in the USB to check the type of adapter:

$ lsusb -v
<pre>Bus 001 Device 003: ID 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter</pre>

That is a Ralink RT73 chipset:

So I installed the module and now I’m ready to surf!

$ sudo modprobe rt73usb
[sudo] password for miquel:
$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

vboxnet0  no wireless extensions.
Categories: communications Tags: , , , ,

A great sed tutorial

September 14, 2010 Leave a comment

Here you can find a great sed tutorial, the unix stream editor. It’s divided

into several parts. Here you have the first one:

Categories: linux, tutorial Tags: , , ,

gunzip to different directory

March 17, 2010 1 comment

I need to gunzip a file.gz to a different directory because it’s a huge file and I have no enough disk space. So, I need to uncompress to another partition. This partition hasn’t enough disk space to allocate the compressed and uncompressed files, so I need to redirect the output to another directory.

I’ve been checking man gunzip but found nothing.

I’ve found this post (thanks Nayyar) with a nice solution:

The solution, as explained in the link above, is:

$ zcat filename.gz > /path/to/unzipped/file
Categories: linux Tags: ,