Switching to Viostor: QEMU/KVM after Windows (XP) installation

This process is not as hard as one would expect. Once it’s completed, there is a big performance increase. (At least in my case there was.) I did this in XP, but I see no reason why it won’t work in Windows 2003, Vista, 7, etc.

A requirement is to have the Viostor drivers on your virtual machine before you continue. They can be downloaded on the KVM Driver Download page.

Before I explain anything, my configuration in the beginning looks as follows…
qemu-kvm \
-drive file="./WindowsXP.qcow2",if=ide,boot=on \
-m 1024M \
-smp 1 \
-soundhw ac97 \
-vga std \
-name "Windows XP Professional" \
-net nic,model=virtio \
-net user \

  1. To start off, we need to create an empty disk image file, or temporarily link an existing one to the XP virtual machine. That can be done by adding -drive file="./temp.qcow2",if=virtio,boot=off \ to the configuration.
  2. Launch the VM with that configuration option added, and once Windows XP loads, it will ask for the drivers for the SCSI controller, which is Viostor. Point it to the directory that you extracted the drivers to, and it should install.
  3. After Windows XP installs the drivers, shut down Windows XP.
  4. Remove that temporary line that you added in Step 1 and change your real drive to say “if=virtio” instead of “if=ide”.
  5. After making that change, startup Windows XP again, and when Windows loads, it will reinstall the Viostor driver for that hard drive.
  6. Reboot, and you are finished.

In the end, my configuration looks like:
qemu-kvm \
-drive file="./WindowsXP.qcow2",if=virtio,boot=on \
-m 1024M \
-smp 1 \
-soundhw ac97 \
-vga std \
-name "Windows XP Professional" \
-net nic,model=virtio \
-net user \

Possible gnome-cups-manager README file improvement

A realistic ending to the gnome-cups-manager README file, courtesy of Kevin Warns. Somebody should submit this back to Gnome SVN…

New (sad, morbid, realistic) ending:

43 The little girl looked up at him. “What are you?” she asked.
45 “I’m a printer!” said the printer.
47 “A what?” asked the little girl.
49 “A printer! Surely you’ve heard of me. I make paper copies of things
50 on your computer!”, replied the printer.
52 “In today’s all-digital world, there is no reason for you to exist!” said
53 the little girl.
55 The printer was devastated. He spent the rest of the day slitting his cables
56 and praying for the cold darkness to overcome him and take away his pain.

Upgrading the BIOS on an EEE PC (with Linux)

This took me a while to figure out, so I wrote directions to hopefully make it easier for other people.

  1. First, you need to get the proper firmware for the EEE PC you are going to flash. Go to http://www.asus.com/ and find the latest firmware for your model.
  2. Extract the *.ROM file from the *.zip file, and place it on your Desktop.
  3. Rename the *.ROM file to [MODEL].ROM. (For example, the EEE PC 1000 would be named “1000.ROM”, 1000H would be “1000H.ROM”) Due to how the boot block was written, the name is case sensitive apparently.
  4. Insert your flash device, unmount it (if it gets automatically mouted,) and open it with fdisk. Set it up like the following:
    #fdisk /dev/sdd
    Command (m for help): p
    Disk /dev/sdd: 129 MB, 129499136 bytes
    17 heads, 32 sectors/track, 464 cylinders
    Units = cylinders of 544 * 512 = 278528 bytes
    Disk identifier: 0xc3072e18
    Device Boot      Start         End      Blocks    Id   System
    /dev/sdd1               1         465      126448    6  FAT16
  5. Now that you have the drive properly partitioned, we need to format it.
    #mkfs.msdos -F 16 /dev/sdd1
  6. After the format completes (and your device activity comes to a halt), unplug the flash drive, plug it back in, and if necessary, unmount the device if it automatically mounts.
  7. Mount it with the following command:
    #mount /dev/sdd1 /mnt/temp/ -o rw,flush,uid=1000,utf8,shortname=win95
  8. Now, copy the renamed *.ROM file to the flash device. After you copy it, refresh the listings to make sure everything is in uppercase. If not, rename it, and try again.
  9. If everything is good, then we can unmount the device.
    #umount /dev/sdd1
  10. Now we can start the flashing process. With the flash device still plugged into the system, restart the system. As soon as you see the BIOS screen, hold down Alt, and hit F2. This should load up the BIOS updater from the boot block.
  11. Now just wait for it to find your flash device, and the *.ROM file on it. If it halts at “Reading file 1000.ROM”, or similar, you did something wrong. Otherwise, it should look similiar to this:
    Boot Block Compatible Version Ver.026
    Please do NOT insert any disc into CD-ROM or Floppy drive
    if you want to recovery with an USB device.
    EZ-Flash starting BIOS update.....
    DO KEEP the power supply on and NOT touch the system while performing BIOS
    Checking for USB Device...
    USB Device found.
    Reading file "1000.ROM".  Completed.
    Start Erasing...\
    Start Programming.../
    Start Erasing EC Firmware...
    Start Programming EC Firmware...
    The BIOS update is finished.
    Please press power button to shut down the system.
  12. After the BIOS update is completed, your BIOS settings will revert back to factory defaults. It will prompt you when you restart that the settings were lost, and everything was reverted. It will ask you to hit F1 to enter Setup. Do that.
  13. Change everything back to how it was. One thing I should note: It disables the Wireless, Camera, and Bluetooth for some reason. Enable these again in the BIOS if you want them.

Linux Kernel Video Modes

I figured this may be of some use to someone, as you can’t really find these in any obvious spot. To use any of these codes, all you need to do is add vga=code to the kernel parameters when booting. Using 1600×1200@32 bits as an example, the kernel parameter would be vga=799. If you want to be asked every time you boot the kernel, use vga=ask.

320×200 640×400 640�480 800×500 800�600 896×672 1024×640 1024�768 1152�720 1280�1024 1440�900 1600�1200
4 bits 770 (302) 774 (306)
8 bits 768 (300) 769 (301) 879 (36F) 701 (303) 815 (32F) 874 (36A) 773 (305) 869 (365) 775 (307) 864 (360) 796 (31C)
15 bits 781 (30D) 801 (321) 784 (310) 880 (370) 787 (313) 816 (330) 875 (36B) 790 (316) 870 (366) 793 (319) 865 (361) 797 (31D)
16 bits 782 (30E) 802 (322) 785 (311) 881 (371) 788 (314) 817 (331) 876 (36C) 791 (317) 871 (367) 794 (31A) 866 (362) 798 (31E)
24 bits 783 (30F) 803 (323) 786 (312) 882 (372) 789 (315) 818 (332) 877 (36D) 792 (318) 872 (368) 795 (31B) 867 (363) 799 (31F)
32 bits 804 (324) 809 (329) 883 (373) 814 (32E) 819 (333) 878 (36E) 824 (338) 873 (369) 829 (33D) 868 (364) 834 (342)

Edit: For the record, I do realize that this table does not fit entirely within this layout. If you want to see the whole thing, just copy and paste it into a spreadsheet or something. Otherwise, I may make it into it’s own page or something eventually.

RAZR2 (V9m) in Linux as a Modem

Before we start, make sure your phone is in Data / Modem mode, and that it is not plugged in.

  1. Open a terminal, and make yourself a super-user.
    > su
  2. Now remove the usbserial module if it is loaded.
    # rmmod usbserial
  3. Let’s register the phones vendor and product ID with the usbserial module.
    # modprobe usbserial vendor=0x22b8 product=0x2b24
  4. Plug in your phone.

If you type in ‘dmesg’ now, you should see that your phone was assigned a tty pointer. If so, your phone is now a modem.