This application note details how to install/upgrade RedHat Linux with /usr as a symlink to a directory in another partition.
I have some otheroriginal linux pages, as well.
/usr --> /disk0/usr /var --> /disk0/var /tmp --> /disk0/var/tmp /local --> /disk0/local /usr/local --> /disk0/local /home/user1 --> /disk0/home/user1 /home/user2 --> /disk0/home/user2 /home/user3 --> /disk0/home/user3 etc.
Under Redhat 4.0, install normally but name your big disk partition /usr and then after the install is complete, boot single user and move /usr to /disk0/usr using the script movestuff which must be run in single user mode.
Note that moving /usr on a running system is somewhat dangerous since you are moving some of the tools which the system needs to operate and it needs to operate while moving those tools. I have used this script successfully on many systems. If you type the commands by hand, however, be warned that a single typo can lead to much chaos. The script expects you to confirm each line by pressing return.
Note that the movestuff script creates a couple symbolic links:
/disk0/etc --> /etc /disk0/etc --> /binThese links are workarounds for all the buggy RedHat packages which inappropriately use relative symbolic links over too large a distance. You should not use relative symbolic links which cross the traditional mount points (or even outside a single packages directory tree) as there is a high probability of failure if any directory is moved or happens to be imported from an NFS server. The relative link trick is sometimes used on NFS systems to force a path to be evaluated relative to the filesystem on the server and not the client but what sane person would want that to happen for, in particular, /etc?
This was initially tested on a system with a JAZ drive and an Adaptec 2940au controller (this controller is incompatible with the normal 2940 which caused install problems on redhat 4.x systems). It had two partitions (not counting swap): a small root ("/") and large "/disk0" with virtually everything.
In real life, performing a major upgrade can be very dangerous. It might go smoothly but if anything goes wrong it can go very wrong. You should have multiple backups (preferrably using more than one backup program) before proceeding with an upgrade; you should expect that your primary copy (hard disk) may effectively be destroyed. Some of the disasters which may occur include symbolic link confusion, and disk full errors. Be sure to check the root partition and the partition which contains /usr to make sure they have enough space for an upgrade. /usr will probably grow by a couple hundred megabytes for a 4.0 to 5.0 upgrade. The root partition may be used for some temporary files, and may grow some due to rpmsaves, new kernels, new /etc files, new files in /bin, /lib, etc.etc. After the sample upgrade, I had 20573 kilobytes used and 27MB free (it may have required somewhat more space during the transition); I don't remember what it started at, so these numbers may not be terribly useful.
This upgrade was from RedHat 4.0 (full install) to RedHat 5.0 (full install except howto-translations). The system was a virgin install except that two scripts had been run( movestuff and services) to reorganize the filesystem as described in this document and disable any unwanted services. (Note that this is an old version of the services script. I have a newer one for RedHat 5.0 systems).
ln -s /mnt/disk0/ /disk0Then switch back to console 1 using Alt-F1.
cd /disk0 rm etc; ln -s /sysroot/etc etc rm bin; ln -s /sysroot/bin bin ln -s /mnt /sysroot ln -s / /mnt/sysroot cd /The last "cd /" is so the installer won't have problems later unmounting the filesystem because it is busy due to the current directory for your shell. A major component of this trick is the two /sysroot links which insure that a symbolic link which references /sysroot/some/where will point to /some/where on your target system regardless of whether it is being interpretted in the bogus install root filesystem or an environment chroot()ed to the root partition in your target environment
RPM install of xxxx failed: execution of script failedwhere xxx=automake, bc, bison, cvs, diffutils, ed, emacs, findutils, etc. (about 5% of the packages) then you probably did not do something correctly regarding the symbolic links for /disk0/etc and /disk0/bin via /sysroot. These errors probably are the result of install scripts that recklessly use or rely on relative symbolic links over too large a distance.
Failed to install gettext. Gettext0.10-5 (which is newer) is already installed.
Failed to install rdate. rdate-10.10-94.4 (which is newer) is already installed.These errors are likely the result of the version numbering system changing for a particular package and do not have anything to do with /usr being in a different place. Note that these errors somehate evenly spaced out during the one hour upgrade operation that is normally unattended so you can't just go home and expect it to be finished the next day.
This file is maintained by Mark Whitis (whitis@freelabs.com).
|
Software Development - Electronic Design - Embedded Systems - Device Drivers - System/Network Administration and Security - Motor Control, RobotCNC - Linux/Un*x - 25+ years experience The author of these pages is looking for a new gig. [RESUME] |
| Engineers and electronic hobbyists: The new Open Symbol Project is creating open schematic symbols and PCB footprints for a variety of different CAD packages. |
| Mark Whitis's Website | Home Page | Linux | Book: Linux Programming Unleashed | My Resume | Genealogical Data | Contact Info | Security | About |
All email messages received must pass the turing test or they will be considered SPAM. If it could have been written by a machine, it was.
Under no circumstances are you to email me with questions regarding windoze, any other microsoft operating system or application, or any software which runs under any form of windoze.
*