Posts tagged ‘linux’

Remapping the ‘exit full screen’ keystroke in VMware

Tonight I installed VMware Player on my Windows machine to experiment with a few things. After getting it installed, I downloaded the latest Ubuntu image and created a virtual machine with it. Everything went pretty smoothly.

VMware, by default, intercepts Ctrl-Alt to exit full-screen mode. Switching virtual workspaces in the windows manager in the new Ubuntu machine uses Ctrl-Alt-<Arrow key>, and the VMware keystroke interfered with left and right. It took a while to find it, but Ctrl-Alt-Space followed by Ctrl-Alt-Right , for example, accomplishes the switch, but this is inconvenient. Remapping the keystrokes that switch virtual workspaces is straightforward, but I am too accustomed to Ctrl-Alt-<Arrow key> to do that.

I found how to change the VMware keystroke here. The sixth box on that page had what I needed and changed the VMware keystroke to Ctrl-Alt-Shift. I only used the first three lines because the second block has some syntax error in my version of the Player.

Grub Reinstall (on Gentoo)

Last night, I reinstalled Windows XP. It had not been working for a little more than a month, and I tried a few repair approaches that did not work out. There was no urgency to do this, which is why I waited so long. Ultimately, I reinstalled Windows (but I “punished” it first by giving it a much smaller partition; I have better things I can do with that space). Of course, this means the MBR was wiped out and I needed to reinstall Grub in order to get easy access to Linux again.

This post is more of a note to myself to save time next time (not that it took that much time, but perhaps every bit counts). It assembles information from several sections of the installation portion of the Gentoo Handbook.

Here we go (the devices are specific to my current setup):

  1. I booted using the Gentoo minimal install disk.
  2. Mount partitions and change root (Sections 4 and 6).
  3. # mount /dev/sda5 /mnt/gentoo
    # mount /dev/sda2 /mnt/gentoo/boot
    # mount -t proc none /mnt/gentoo/proc
    # chroot /mnt/gentoo /bin/bash
    
  4. Make mtab and reinstall Grub (Section 10).
  5. # grep -v rootfs /proc/mounts > /etc/mtab
    # grub --no-floppy
    grub> root (hd0,1)
    grub> setup (hd0)
    grub> quit

The parameter (hd0,1) corresponds to the /boot partition (/dev/sda2). If it is not clear how to specify the partition for /boot, that information is available in Grub with

grub> find /boot/grub/stage1