ringram@gargoylecc.com
Revision History | ||
---|---|---|
Revision v1.1 | 2002-05-12 | Revised by: ri |
Updated sgi cvs info to match current state; made various changes/clarifications based on reader feedback | ||
Revision v1.02 | 2001-10-08 | Revised by: ri |
Added some note, blockquote and ulink tags. Corrected error in command section of "Finishing Up". Changed note about e2fsprogs-devel to refer to libuuid. | ||
Revision v1.01 | 2001-10-04 | Revised by: ri |
Corrected error in "Finishing up" section; various formatting changes |
Please feel free to email me at <ringram@gargoylecc.com> if you have any corrections or if any imformation/URLs/etc. is missing. The more feedback I get on this HOWTO the more helpful it will be for all.
The latest version of this document can be found at Gargoyle Computer Consulting .
![]() | Note |
---|---|
two distinct trees are available:
|
Here are the steps to download the kernel source tree:
$ cd /usr/src |
B. Next, you should set the CVSROOT environment variable so that it points to the proper cvs server.
If you are running sh, bash, ksh, etc...:
$ export CVSROOT=':pserver:cvs@oss.sgi.com:/cvs' |
If you are running csh or tcsh:
$ setenv CVSROOT :pserver:cvs@oss.sgi.com:/cvs |
C. Then log in to the cvs server.
$ cvs login (the password is "cvs") |
This needs to be done only ONCE, not everytime you access CVS.
D. Now grab linux-2.4-xfs. The first time you will want to do something like:
$ cvs -z3 co linux-2.4-xfs |
After you have checked the code out, you can use:
$ cvs -z3 update linux-2.4-xfs |
to update your copy to the latest version from the CVS server.
Actually running xfs as a module isn't very hard. in the directory cmd/xfs/misc there is a modified mkinitrd the will always generate a ram disk with pagebuf xfs_support and xfs. Once that is done just add the initrd line in lilo.conf AND
The default size is 4096 which isn't nearly large enough to hold xfs. This is from my laptop.
| ||||
-- Russell Cattelan |
It seems to me that compiling the support into the kernel would be much simpler, so that is how I am doing it at this point. I will try it as a module at a later time and add more detailed instructions then. If anyone has time to document this method before I get around to it please email it to me and I will include it with credit given where credit is due. :-)
![]() | Note |
---|---|
If you have never configured and compiled a new linux kernel you might consider reading the Linux Kernel HOWTO before doing this step. It can be found at the Linux Documentation Project (LDP) or one of its mirrors. |
As with any kernel build, the following commands must be run to actually build the new kernel:
$ make dep $ make bzImage $ make modules |
Again this is standard for any kernel installation:
$ make modules_install $ cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.0-XFS |
$ vi /etc/lilo.conf |
Add a new image section to your lilo.conf file similar to the following:
image=/boot/vmlinuz-2.4.0-XFS label=xfs read-only root=/dev/hda2 |
![]() | Note |
---|---|
These tools rely on the /usr/lib/libuuid.a shared library. If you do not have this library installed you will need it in order for the XFS utilities to compile. You can find the rpm package for your version of Linux from Rpmfind.net by searching for "/usr/lib/libuuid.a." The debian package that contains libuuid is uuid-dev. There will no doubt be other distributions that package this library in another place. A good way to find the correct package on those distributions is to search on the Google Linux search engine. |
$ cd ../cmd/xfsprogs |
Build and install the xfs utilities:
$ make install |
$ reboot |
![]() | Note |
---|---|
Unless you changed the default label to boot in your lilo.conf file you will need to enter "xfs" at the "LILO Boot:" prompt in order to boot the new kernel image. |
$ mkfs -t ext2 /dev/hda4 $ mkdir /mnt/temp $ mount -t ext2 /dev/hda4 /mnt/temp $ cd / $ tar lcf - .|(cd /mnt/temp; tar xpvf - ) |
$ mkfs -t xfs /dev/hda2 |
$ mount -t xfs /dev/hda2 /mnt/temp |
And copy the original / fs back to its original home:
$ cd / $ tar lcf - .|(cd /mnt/temp; tar xpvf -) |
/dev/hda2 / xfs defaults 1 1 |
![]() | Note | |
---|---|---|
On some linux distributions the options given to the out-of-box fstab may be more in depth than just "defaults." For instance, on Debian systems they use "defaults,errors=remount-ro." The mount options are different for every filesystem with the exception of the keyword "defaults." Unless you know the specific XFS mount options you want you should stick with just the defaults option. In the Debian example given, the errors option is not available with XFS and will cause your filesystem not to mount. Additionally, filesystem labels are becoming more popular so you may see an entry in your fstab that looks something like this:
|
$ telinit 1 |
or by rebooting and asking for single user mode at the Lilo prompt:
LILO Boot: xfs single |
$ mount -t ext2 /dev/hda4 /mnt/temp $ cd /usr $ tar lcf - .|(cd /mnt/temp; tar xpvf - ) $ cd /mnt/temp $ umount /usr $ mkfs -t xfs /dev/hda3 $ mount -t xfs /dev/hda3 /usr $ tar lcf - .|(cd /usr; tar xpvf - ) |
Don't forget to change the filesystem type in /etc/fstab for /usr to xfs.