Linux learnings

I made progress on my Linux install a few nights ago. I had run out of space on my VMware disk image I originally created for Linux so I “grew” it using one of the VMware utilities. But, I never figured out how to get Linux to recognize that the hard disk could go beyond the original 3GB that I allocated it. So, instead, I just added a new virtual disk. Then, using parted and fdisk, I figured out how to create a file system on that new disk.
Then I created a directory and mounted that to the new disk. Next, I moved my /usr, /home, and /opt directories to the new directory/disk and created symbolic links to point there.
Below are some learning points…
1. I need to study up on mount points
It hadn’t clicked with me that if you mount a file system like /dev/sdb1 to /opt as well as /usr, you are pointing to the exact same thing. Obviously, that’s not what I wanted. I either needed to create separate file systems for each of those or what I ended up doing which is to create a higher level directory (I called it /vol2 for no good reason) and then put opt, usr, and home inside that with symbolic links from root pointing to those. I have a sneaking suspicion that the “right” way for me to create that directory was to put it under /mnt instead of the root, but I’ll fix it later.
2. Always RTFM
Even though it reminds you to do so in parted/fdisk, I neglected to update /etc/fstab with the new mount so when I restarted, it obviously couldn’t find any of my relocated volumes.
3. tar is your friend
I learned how to use tar to move files with the directories and permissions intact. I obviously could have used mv but I wanted to keep the old stuff around in case something tanked. For future reference it is: tar cvf – *|(cd /somedir; tar xpf – )
4. VMware networking modes really do work
I can now successfully switch between “bridged” and “nat” network mode in VMware. The trick is to remember to run /etc/config/network-scripts/ifdown eth0, ifup eth0 after reconfig’ing the network in VMware. Moving to NAT lets me VPN to Navigator on XP and then leverage that connection from my Linux image.
5. Living without the Microsoft OS is actually within reach
There is now seemingly no need for me to run X-Win32 on my machine. I can just use Linux all of the time. In fact, if Open Office lives up to expectation, and if I get Firefox installed plus my other dev tools, the *only* reason to use XP during a day is for web sites that require MSIE, for MS Office incompatibilities, or to use software that doesn’t yet run on Linux. I know there are bridging technologies that would allow me to clear even those hurdles but I’m not ready for that yet.
6. Living in emacs for the past few weeks is paying off.
Emacs is OOTB with RedHat Enterprise Linux WS 3 so I can use it for all of my editing in both Linux and XP. Another great tool that comes pre-installed is The Gimp. I haven’t had to do enough graphics editing lately to be completely comfortable with it but it’s there if I need it.
7. Moving files between the host XP OS and guest Linux OS is easy–provided vmware tools is config’d
I need to reinstall “VMware Tools” so I can move files between XP and my Linux image using the “shared folders” feature. I’ve got it enabled but it isn’t working. I think I need to re-run the install and possible re-compile it.
8. Maybe moving my /usr directory wasn’t such a great idea
After I ran up2date to get all of the latest fixes for the OS, my X stopped working. I thought it had to do with a newer version of XFree86 and an incompatibility in the VMware video driver. Today I realized that either the update or my relocating of the /usr directory fouled up some links. Once I fixed them, I was able to start up without any problems. For future reference, you can use symlinks to find broken links. An example searching recursively from root is: symlinks -r / | grep ^dangling
9. Back in business with Ant and Cocoon on Linux
I finally got Cocoon to build. Way back when I first installed Linux I tried to get Cocoon to build so I could try out some of my Documentum-Cocoon integration components but I couldn’t get Ant to run. All path and classpath variables were seemingly correct but Ant couldn’t find its launcher class. This evening I realized that there’s an ant.conf file in /etc. The file declares an ANT_HOME which overrides the ANT_HOME set in the profile. As soon as I commented that out ant started working and the build worked great (and about 25% faster than the build on my host XP OS).
I think I’m damn close to doing a “live in Linux” experiment. Too bad Radio Userland doesn’t have a Linux distro. I suppose I could enable the “remote posting” feature and hit it via the network between my Linux OS and XP.
This entry was posted in Linux. Bookmark the permalink.