Friday, August 21, 2009

Forcing an NTFS mount in Ubuntu

Command line:
sudo mount -t ntfs-3g /dev/sda2 /media/disk -o force
To do the same thing in /etc/fstab:
/dev/sda2 /media/disk ntfs-3g force 0 0

Thursday, August 20, 2009

Fix Screen resolution in Ubuntu under Virtual PC

http://helpdeskgeek.com/virtualization/fixing-screen-size-resolution-in-virtual-pc-running-ubuntu/

Useful Windows Shortcut Keys

Windows + E -> Load Windows Explorer
Windows + D -> Minimize/restore all windows (show desktop)
Windows + L -> Lock the PC
Windows + R -> Bring up the Run menu
Windows + Pause/Break -> Load System Properties

Create/Delete Mapped Harddrive in Windows via command line

To Create:
net set [drive]: \\[Host]\Path
Sometimes adding the option /persistent:no is useful. This causes the mount to go away after a reboot.

To Delete:
net set [drive]: /delete

Installing Ubuntu 9.04 on MS-Virtual PC

Sources
http://nemesisv.blogspot.com/2009/04/installing-ubuntu-904-on-microsoft.html

Get Ubuntu
http://www.ubuntu.com/getubuntu

Get Virtual PC 2007 SP1
http://www.microsoft.com/downloads/details.aspx?familyid=28C97D22-6EB8-4A09-A7F7-F6C7A1F000B5&displaylang=en

Start up the install
Boot Ubuntu 9.04 up. On the first screen, choose [English].
Then press [F4] and select [Safe Graphics].
Then press [F6], but do not select any option. Instead press [Escape] and it will allow you to change the command line. Remove the option "quiet splash --" and replace it with "vga=791 noreplace-paravirt" instead.
Press [Enter] to start the installation.
It will take a while for it to start.
Sitting at the squashfs line for a while is normal.

Broken Mouse?
At this point if your mouse isn't working. Then do the following.

Hit Alt+F1. Use the arrow keys to browse to Applications->Accessories->Terminal

Then type:
sudo modprobe -r psmouse
sudo modprobe psmouse
Install Ubuntu

After the install completes Ubuntu will ask if you want to restart. Click on restart. It will probably hang.

Restart the Virtual PC and log back into the system via the CD (like we did above).

Mount your harddrive by going to Places->82.4GB Media (You'll probably have a different size here).

Then start up a new terminal Applications->Accessories->Terminal

Type:
sudo gedit /media/disk/boot/grub/menu.lst
Then look for the text that is the first in the list of kernels it should look like the following (mine starts on line 131):
## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid deb6d999-eb4f-4424-abd9-c146e26afea1
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=deb6d999-eb4f-4424-abd9-c146e26afea1 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet
Replace the 'quiet splash' part with 'vga=791 noreplace-paravirt':
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=deb6d999-eb4f-4424-abd9-c146e26afea1 ro vga=791 noreplace-paravirt
Save, close gedit then shut down the Virtual PC. It will probably hang on shutdown. Unmount the CD, then do an Action->Reset. The system should boot into UBuntu! If your mouse works then you are done!

Mouse Broken Again?
Once installed the mouse might be broken again. If it is then follow the "Mouse Broken?" step above. Then from the same terminal window do:
sudo gedit /etc/modprobe.d/options
options psmouse proto=imps
Save and close gedit. Next time you reboot the mouse will work.