Replace Laptop Harddrive

My Dell Latitude d830 shipped with an 80GB, 7200 RPM 2.5″ SATA HDD, but when I decided to dual-boot Solaris and Linux, I found I needed more drive capacity. I replaced it with a 160GB, 7200 RPM 2.5″ SATA drive, and photographed the process. (Apologies for less-than-stellar pictures, I’m working on my photography skillz.)

First, flip the laptop over. The harddrive is on the lower right-hand side.

laptop_bottom.jpg

There are three screws that need to be removed, and then you can slide the drive out.

hpim0632.jpg

After the drive has been pulled, the mounting bracket can be removed by loosening the screws on the sides.

hpim0635.jpghpim0636.jpg

This is the drive I replaced the stock one with, though I have no particular reason to recommend it.

hpim0652.jpghpim0651.jpg

Changing a user’s UID/GID on a Unix-like system

On Unix-like systems, each user has a UID, or user ID, to uniquely identify the user, and all users belong to groups, which are also represented with a number, the GID. If it ever becomes necessary to change the UID/GID of a user, the /etc/passwd file will need to be updated, and all of the files owned by that user will have to have their owner updated to reflect this new UID/GID.

In Ubuntu, updating /etc/passwd can probably be accomplished with the System -> Administration -> Users and Groups GUI, by highlighting the user, clicking on Properties, then on the Advanced tab, and entering the new UID into the User ID field. Note, however, that via this interface, the highest UID achievable is 65535; apparently, the GUI thinks that UIDs are a still 16-bit, which is no longer true. Therefore, using a UID > 65535 will require editing the /etc/passwd file directly. In a shell, enter the following:

$ sudo vi /etc/passwd

/etc/passwd will contain a line for each user of the system, and each line will have 7 fields seperated by a colon(:). The third field contains the UID for that user; the fourth contains the GID. Replace them with the desired values.

Updating the UID on user’s files can be accomplished by issuing the following command in a shell, which will find all files associated with the old UID, and associate them with the new one:

$ find / -user <old UID> -exec chown <new UID> {} \;

Similarly, to change the user’s GID:

$ find / -user <UID or username> -exec chgrp <new GID> {} \;

Problem mounting /net/hostname with Ubuntu automounter

I have set up NIS and autofs on my laptop so that it will automount certain filesystems from my intranet at work. One of the cooler ones is /net, which allows me to get at portions of a filesystem a remote host has exported by cding to /net/<remote host>/path/to/file.

That’s the way it’s supposed to work, anyway. After I set it up, I kept getting an error:

$ cd /net/hostname
bash: cd: /net/hostname: No such file or directory

No good. Other mount points were working; in fact, this was the only one that was not. I eventually found a way to debug this a little. We can check that the fs can be seen by passing the hostname to the /etc/auto.net script:

$ sudo /etc/auto.net hostname
-fstype=nfs,hard,intr,nodev,nosuid,nonstrict,async \
……
/etc/auto.net: line 47: /net: No such file or directory

I have clipped the output for the host, but I could see that it was printing correct path information. Then, I noticed that last line. It looked like a problem in the script, so I commented line 47 out in /etc/auto.net, which looked out of place anyways…

/net /etc/auto.net

and tried it again. It worked! So now I can cd to /net/<hostname>. So, this is a bug with the script, and I will look into filing it unless someone beats me to it.

Widescreen resolution in VMWare guest on Linux host

My laptop, on which I run Ubuntu, has a native resolution of 1680×1050. I created a Windows guest in VMWare Server, but found that this widescreen resolution was not supported. I found the answer in this forum post; run:

$ vi /var/lib/vmware-server/Virtual Machines/Windows XP Home Edition/Windows XP Home Edition.vmx

and enter the lines:

svga.maxWidth = "1680"
svga.maxHeight = "1050"

VMWare guest’s clock runs too fast on Linux host

I just installed a Windows guest in VMWare, which is running on an Ubuntu host, and noticed that the time in the guest was getting significantly ahead of that of the host. After some googling, I found the answer in this blog, which references this VMWare post.

However, after following these steps, the clock began to run too slowly ;) To fix this, in the Windows guest, install VMWare tools and then click on its icon in the tray.  In the Options tab, check the box labeled Time synchronization between the virtual machine and the host operating system.

Hello World! from Drivel

This is a test post created with the Drivel application. Bold. Italics. Underline.

  • List Element 1
  • List Element 2

Drivel allows you to write or edit entries in a GNOME GUI and push them to the server hosting your blog, saving you the trouble of logging into the site, or allowing you write your entries off-line.

Solaris bge driver support for BCM5755M ethernet adapter

My Dell Latitude D830 has the Broadcom NetExtreme 5755M ethernet adapter, and CR 6589496 was filed to add support for it to the Solaris bge driver. But since there’s no suggested fix yet, I thought I’d experiment with the source to see if I could hack it myself to drive the chip. Somewhat surprisingly (since I don’t have specs for this device), my modified bge works well, but there are, most likely, errata for the chip that I am unaware of, and that the changes don’t account for.

If you’re interested in the changes I made, here’s the patch. To use with your system, do the following:

  1. Patch the bge source and rebuild. See the OpenSolaris Developer’s Reference Guide if you need details.
  2. Since I have a 64bit processor, I backed up the 64bit bge module before replacing it:

    $ mv /kernel/drv/amd64/bge /kernel/drv/amd64/bge.orig
    $ mv /path/to/my/bge /kernel/drv/amd64

  3. Enter the line:

    bge "pci14e4,1673"

    into the “/etc/driver_aliases” file. This allows the system to recognize the PCI ID of the network adapter and associate the driver module with it.

  4. In a shell, type:

    $ touch /reconfigure; reboot

    The system will perform a reconfiguration reboot, in which it will rescan its hardware.

  5. You can verify that your version of bge is running by entering

    $ modinfo | grep bge

    in a shell and checking that the version number has been bumped.

Recover Linux GRUB after Solaris reinstall with Ubuntu Alternate install disc

I multiboot Solaris and Ubuntu, and I occasionally install the newest release of Solaris to try out new features. Each time I do so, however, Solaris overwrites the existing Linux GRUB install with its own, and I lose the ability to boot to Ubuntu, even though it’s still there on the disk. Here is one method to recover the Linux GRUB (using the Ubuntu Alternate install disc, since that’s what I have) and the choices I select:

  1. Boot from Alternate CD
  2. Choose “Rescue a broken system”
  3. Choose Language (English, United States)
  4. Detect Keyboard Layout (No, U.S. English, U.S. English)
  5. Detecting HW, Scanning CDROM, Additional components
  6. Configure networking (Cancel, Continue, Do not configure at this time)
  7. Hostname (Default, Continue)
  8. Detecting HW…
  9. Choose root filesystem device (/dev/sda1)
  10. Rescue Operations Mode (Reinstall GRUB boot loader)
  11. I need to install GRUB to MBR, so type hd0 and press continue
  12. System runs grub-install hd0 to write boot loader to MBR
  13. Reboot

Upon reboot, I now see my original GRUB boot menu, and I can now boot into my Ubuntu installation. Note that these steps are not specific to an Ubuntu/Solaris setup, but should also work for Ubuntu/<other OS> or even Linux/<other OS>, depending on recovery disk options.

Dell Latitude D830 added to Solaris HCL

My submission to the Solaris Express Hardware Compatibility List was published in BigAdmin, so there is now another laptop for people to choose from to run Solaris on.

Native resolution under Solaris with Intel GMA x3100 graphics adapter

Build 72 of Solaris Nevada contains the Intel 2.1.0 driver and other Xorg components necessary to successfully deliver full resolution (1680×1050) on my Dell Latitude D830 laptop, which has the Intel GMA x3100 graphics adapter. So graphics now work out of the box ;) I still believe some of the 3D acceleration components have yet to be integrated Solaris however, so we can look forward to that.