cvs commit: hints xfs.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Sat Jan 18 08:32:35 PST 2003


timothy     03/01/18 11:32:35

  Modified:    .        xfs.txt
  Log:
  Not ext2 specific anymore. Added a FAQ and new command instructions.
  
  Revision  Changes    Path
  1.2       +282 -70   hints/xfs.txt
  
  Index: xfs.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/xfs.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xfs.txt	14 Jan 2002 12:58:19 -0000	1.1
  +++ xfs.txt	18 Jan 2003 16:32:35 -0000	1.2
  @@ -1,13 +1,13 @@
  -TITLE:		Changing from ext2 to xfs hint
  -LFS VERSION:	3.1+
  +TITLE:		Migrating to the xfs Filesystem
  +LFS VERSION:	3.3+ (3.1+ with Kernel >= 2.4.18)
   AUTHOR:		Carsten Menke <bootsy52 at gmx.net>
   
   SYNOPSIS:
  -	How to change from ext2 to xfs after the LFS is installed.
  +	How to migrate LinuxFromScratch to xfs after LFS is installed.
   	
   HINT:
  -ext2 to xfs hint
  -Jan 13th 2002 Ver. 1.0b
  +migrate to xfs hint
  +Jan 18th 2003 Ver. 1.0
   
   Intro
   -----
  @@ -16,38 +16,56 @@
   how to get your LFS working with journaled filesystem. I have choosen xfs, 
   because I find it reliable and stable.
   
  +Changelog
  +----------
  +Ver 1.0 released Januar 04th 2003:
  + - Added the 'p' option to the tar command so that
  +   the file permission are saved and restored.
  + - changed hint to not be only ext2 specific
  + - added note to inform about xfs snapshots
  + - added small faq
  + - added build instructions to install cmd_tar's.
  +
  +Ver 1.0b released January 13th 2002 - initial release
  +
   Requirements
   ------------
   
   You need your Host Linux Distribution, you had as well needed for the LFS
  -Installation.
  +Installation. The procedure described here is for the i386 architecture.
   
   You need the kernel patch, which matches your Kernel version. e.g. for the
  -3.1 Book you need xfs-2.4.16-all-i386.bz2 (asuming you have the kernel 
  -of the book installed and your architecture is i386). Look that you download
  -the package named xfs-kernelversion-all-architecture.bz2 and NOT the splitted 
  +3.3 Book you need xfs-2.4.18-all.patch.bz2. Look that you download
  +the package named xfs-kernelversion-all-architecture.bz2 and *NOT* the splitted
   ones. 
   
   You can download the kernel patches at:
   
  -ftp://oss.sgi.com/projects/xfs/download/patches/
  +ftp://oss.sgi.com/projects/xfs/dowload/patches
   for a 2.5 kernel
   ftp://oss.sgi.com/projects/xfs/download/patches-2.5
   
  -Further more you need the xfs tools, which can be downloaded here:
  +NOTE: Releases are normally only available for the kernel version
  +which was up to date when the release came out. So the above patches are
  +usually snapshots, and not xfs releases. So if you want to be safe you'll
  +better download a xfs-RELEASE from (assuming you have the correct kernel):
  +
  +ftp://oss.sgi.com/projects/xfs/download/Release-*
  +
  +Further more you'll likely want the xfs tools, which can be downloaded here:
   
   ftp://oss.sgi.com/projects/xfs/download/cmd_tars
   
  -Shortcuts
  ----------
  +Conventions
  +-----------
   
  -I will use the following shortcuts in this document, so I explain them here.
  +I will use the following conventions in this document, so I explain them here.
   
   $LFS = the Mountpoint to your LFS installation (e.g. /mnt/LFS )
   $MNT = Mountpoint directory (e.g. /mnt )
   $K-VERSION = Your Kernel version
   $XFS-PATCH = the patch you dowloaded for your kernel version. 
  -	    (xfs-2.4.16-all-i386.bz2)
  +	    (xfs-2.4.18-all-i386.bz2)
   $HOST-DISTRO = Host Distribution, from where you make the changes to LFS.
   	    (Mandrake,SuSE,Redhat or whatever)
   $LFS-DEVICE = The device your LFS Partition is on (e.g. /dev/hda8)
  @@ -55,31 +73,41 @@
   
   Description
   ------------
  -1.	 Boot your $HOST-DISTRO system.
   
  -Mount your LFS partition
  +1 MIGRATING LINUXFROMSCRATCH TO XFS
  +2 BUILDING XFS ADDITIONAL TOOLS
  +3 FAQ
  +
  +1 MIGRATING LINUXFROMSCRATCH TO XFS
  +-----------------------------------
   
  -2.	mount -t ext2 $LFS-DEVICE $LFS
  +1.1	Boot your $HOST-DISTRO system.
   
  -----------------------------------------------------------
  -3. 	!! Enter the chroot'ed area as described in the book !!
  ------------------------------------------------------------
  +1.2	Mounting the LFS partition
  +	
  +	mount -t ext2 $LFS-DEVICE $LFS
  +
  +(Replace ext2 with the appropriate filesystem if you have another fileystem
  +then ext2 installed)
  +---------------------------------------------------------------
  +1.3 	!! Enter the chroot'ed area as described in the book !!
  +---------------------------------------------------------------
   
  -4. 	Download the necessary packages.
  +1.4 	Download the necessary packages.
   
   After you have downloaded all packages, copy $XFS-PATCH to the directory
   where your kernel Sources are located. (e.g. /usr/src/linux ) contrary to 
  -other kernel patches, you have to copy this patch in the kernel directory 
  -NOT to the top directory of the kernel sources.
  +other kernel patches, you have to copy this patch *INTO* the kernel directory.
   
  -5. 	Patch your kernel by running:
  -  	bzip2 -dc $XFS-PATCH | patch -p1
  +1.5 	Patch your kernel by running:
  +	
  +	bzip2 -dc $XFS-PATCH | patch -p1
   
   If you have dowloaded the correct patch everything should go well.
   
  -Now recompile your kernel by running:
  -
  -6.	make mrproper &&
  +1.6	Recompile your kernel by running:	
  +	
  +	make mrproper &&
   	make menuconfig &&
   	make bzImage &&
   	make modules &&
  @@ -87,9 +115,9 @@
   	cp System.map /boot &&
   	cp arch/i386/boot/bzImage /boot/lfs-kernel
   
  -**Site Note: mrproper deletes your config settings, so make sure you have them
  -  saved somewhere, make menuconfig is to check that under menu <File-Systems> 
  -  SGI xfs is checked.**
  +** Site Note: mrproper deletes your config settings, so make sure you have them
  +  saved somewhere, use "make menuconfig" to enable SGI xfs, in the menu
  +  <File Systems> **
   
   To save ourselves some hassle we do compile the xfs filesystem NOT as a module,
   but directly into the kernel. Feel free to change that on your own.
  @@ -97,98 +125,282 @@
   The next step is to build the xfsprogs package, to do so unpack it somewhere
   with:
   
  -7.	tar xvfj xfsprogs-version.tar.bz2 
  +1.7	Build the XFS Programs
   
  -and compile xfsprogs with:
  +	tar xvfj xfsprogs-version.tar.bz2 
   
  -8.	make configure &&
  -	./configure --prefix=/usr --exec-prefix=/ --localstatedir=/var \
  -	--mandir=/usr/share/man &&
  -	make &&
  -	make install &&
  -	make distclean
  +1.8	Compile xfsprogs with (see also section 2.4):
  +	
  +	./configure --prefix=/usr --exec-prefix=/ --bindir=/usr/sbin \
  +	--libexecdir=/usr/libexec --localstatedir=/var \
  +	--mandir=/usr/share/man && \
  +	make && \
  +	make install && \
  +	make install-dev
  +
  +optionally you can run (see FAQ 3.2 why possibly not)
  +	make clean
   
   That's it for the first.
  --------------------------------------- 
  -9.	!!Exit the chroot'ed Area with exit !!
  ----------------------------------------
  +---------------------------------------------- 
  +1.9	!!Exit the chroot'ed Area with exit !!
  +----------------------------------------------
   
   Now, you have 2 options, either copy your Kernel from
  -LFS to your $HOST-DISTRO or to patch and recompile the kernel of your
  +$LFS to your $HOST-DISTRO or to patch and recompile the kernel of your
   $HOST-DISTRO as well as you have done right before.
   
   I assume you want to copy the kernel from your LFS distribution. To do so:
   
  -10. cp $LFS/boot/lfs-kernel /boot
  +1.10	Copy the Kernel to the $HOST-DISTRO
  +
  +	cp $LFS/boot/lfs-kernel /boot
   
   modify /etc/lilo.conf of your $HOST-DISTRO so that you could boot your
   $HOST-DISTRO with your lfs-kernel.
   
  -11.	image = /boot/lfs-kernel
  -   	label = LFS
  -  	root = $HOST-DEVICE
  -  	read-only
  +1.11	Modify the $HOST-DISTRO's lilo.conf
  +
  +	image = /boot/lfs-kernel
  +	label = LFS
  +	root = $HOST-DEVICE
  +	read-only
      
   after that run /sbin/lilo
   
  -Now repeat step 8 and compile the xfsprogs package again.
  +Now repeat step 1.8 and compile the xfsprogs package again..
  +
  +1.12	Repeat Step 1.8
   
   When you have reached so far, you should now be awake, drink enough coffee,
   what now follows is the dangerous part.
   
   Pack your complete partition and save it somewhere where you have enough room
   for the COMPLETE LFS Partition. You should check the amount of disk space
  -which LFS uses bye:
  +which LFS uses by:
   
  -12.	df -h 
  +1.13	Checking for Disk Space
  +
  +	df -h 
   
   Mine was already 1.2 GB. But fortunatley bzip2 has a strong 
   compression, so that I shrinked it down to 227 MB.
   
  -To finally pack your partiton:
  +1.14	Pack the $LFS Partition
   
  -13.	tar cfj /path/to/enough-Room/LFS.tar.bz2 $LFS/*
  +	tar cfjp /path/to/enough-Room/LFS.tar.bz2 $LFS/*
   
   This will take some time.
   
   When finished, reboot your system with your lfs kernel.
   
  -14. reboot
  +1.15	Rebooting the System
   
  -Create the xfs filesytem for your LFS Partition by:
  +	reboot
   
  -15.	/sbin/mkfs.xfs -f /dev/$LFS-DEVICE
  +1.16	Creating the XFS Filesytem for the $LFS Partition
  +	
  +	/sbin/mkfs.xfs -f /dev/$LFS-DEVICE
   
  -Mount the newly created filesystem with:
  +1.17	Mount the newly created Filesystem
   
  -16.	mount -t xfs /dev/$LFS-DEVICE $LFS
  +	mount -t xfs /dev/$LFS-DEVICE $LFS
   
  -Change to the Mount directory:
  +1.18	Change to the Mount directory
   
  -17.	cd $MNT
  +	cd $MNT
   
  -unpack your partition to your newly created filesystem:
  +1.19	Unpack the archive containing the $LFS Data, we have packed in 1.14
   
  -18.	tar xvfj /path/to/LFS.tar.bz2
  +	tar xvfjp /path/to/LFS.tar.bz2
   
   Head's up your nearly done.....
   edit the fstab from your LFS:
   
  -19.	edit $LFS/etc/fstab
  +1.20	Editing the $LFS fstab entry using your favorite editor (joe,vi,emacs)
  +
  +	edit $LFS/etc/fstab
   
  -and change ext2 to xfs for the / Mountpoint.
  +and change ext2 (or whatever the / filesystem is) 
  +to xfs
   
   Change your lilo.conf from your $HOST-DISTRO back so that it points
   to the $LFS-DEVICE of your LFS Partition again:
   
  -20.	image = /boot/lfs-kernel
  -   	label = LFS
  -   	root = $LFS-DEVICE
  -   	read-only
  +1.21	Changing back lilo.conf of the $HOST-DISTRO
  +	
  +	image = /boot/lfs-kernel
  +	label = LFS
  +	root = $LFS-DEVICE
  +	read-only
      
   run /sbin/lilo
   
   
  -21. reboot
  +1.22	Rebooting the System
  +	
  +	reboot
   
   WELCOME to Journalized LFS :-)
  +
  +
  +2 BUILDING XFS ADDITIONAL TOOLS
  +-------------------------------
  +
  +2.1 Dowload the appropiate packages
  +	
  +	attr-2.1.1.src.tar.gz
  +	acl-2.1.1.src.tar.gz
  +	xfsprogs-2.3.6.src.tar.gz
  +	dmapi-2.0.5.src.tar.gz
  +	xfsdump-2.2.4.src.tar.gz
  +
  +from
  +
  +ftp://oss.sgi.com/projects/xfs/download/cmd_tars
  +
  +alternativley if you build a Release (Release-1.1 for example)
  +you could download the cmd_tars also from
  +
  +ftp://oss.sgi.com/projects/xfs/download/Release-1.1/cmd_tars
  +
  +if you use the cmd_tars of the Release-1.1 please read also FAQ 3.2
  +
  +2.2	Building attr-2.1.1
  +
  +unpack the file by 
  +	tar xvfz attr-2.1.1.src.tar.gz
  +
  +change into the attr directory by
  +	cd attr-2.1.1
  +and run
  +	./configure --prefix=/usr --localstatedir=/var \
  +	--mandir=/usr/share/man && \
  +	make && \
  +	make install && \
  +	make install-dev && \
  +	cp libattr/.libs/libattr.so.1.0.1 /usr/lib && \
  +	(cd /usr/lib;ln -sf libattr.so.1.0.1 libattr.so.1)
  +
  +optionally you can run (see FAQ 3.2 why possibly not) 
  +	make clean
  +
  +** Here we got a classical case of FAQ 3.2, the make program
  +fails to copy all files from libattr/.libs/ and do the 
  +correct symlinking. **
  +
  +2.3	Building acl-2.1.1
  +
  +unpack the file by
  +	tar xvfz acl-2.1.1.src.tar.gz
  +change into the directory by
  +	cd acl-2.1.1
  +and run
  +	./configure --prefix=/usr --localstatedir=/var \
  +	--mandir=/usr/share/man && \
  +	make && \
  +	make install && \
  +	make install-dev && \
  +	cp libacl/.libs/libacl.so.1.0.3 /usr/lib && \
  +	(cd /usr/lib;ln -sf libacl.so.1.0.3 libacl.so.1)
  +
  +optionally you can run (see FAQ 3.2 why possibly not) 
  +	make clean
  +
  +** This is another example for FAQ 3.2 **
  +
  +2.4	Building xfsprogs-2.3.6
  +
  +unpack the file by
  +	tar xvfz xfsprogs-2.3.6.src.tar.gz
  +change into the directory by
  +	cd xfsprogs-2.3.6
  +and run
  +
  +	./configure --prefix=/usr --exec-prefix=/ --bindir=/usr/sbin \
  +	--libexecdir=/usr/libexec --localstatedir=/var \
  +	--mandir=/usr/share/man && \
  +	make && \
  +	make install && \
  +	make install-dev && \
  +	cp libdisk/.libs/libdisk.la /usr/libexec && \
  +	cp libxfs/.libs/libxfs.la /usr/libexec && \
  +	cp libxlog/.libs/libxlog.la /usr/libexec && \
  +	cp libxfs/.libs/libxfs.so.0.0.0 /lib && \
  +    (cd /lib; ln -sf libxfs.so.0.0.0 libxfs.so.0; ln -sf libxfs.so.0 libxfs.so)
  +
  +optionally you can run (see FAQ 3.2 why possibly not) 
  +	make clean
  +
  +** This is the worst example of the library copy,linking,moving wirrwarr **
  +
  +2.5	Building dmapi-2.0.5
  +
  +unpack the file by 
  +	tar xvfz dmapi-2.0.5.src.tar.gz
  +change into the directory by
  +	cd dmapi-2.0.5
  +and run
  +	./configure --prefix=/usr --localstatedir=/var \
  +	--mandir=/usr/share/man && \
  +	make && \
  +	make install && \
  +	make install-dev
  +
  +optionally you can run (see FAQ 3.2 why possibly not) 
  +	make clean
  +
  +2.6	Building xfsdump-2.2.4
  +
  +unpack the file by
  +	tar xvfz xfsdump-2.2.4.src.tar.gz
  +change into the directory by
  +	cd xfsdump-2.2.4
  +and run
  +	./configure --prefix=/usr --exec-prefix=/ \
  +	--localstatedir=/var --mandir=/usr/share/man && \
  +	make && \
  +	make install && \
  +	make install-dev && \
  +	rm -f /bin/xfsdump && \
  +	rm -f /bin/xfsrestore
  +
  +optionally you can run (see FAQ 3.2 why possibly not) 
  +	make clean
  +
  +Huuh! That was hard, but finally you got it all
  +
  +3 FAQ
  +-----
  +
  +3.1	Do I have to modify any boot scripts ?
  +	Does fsck still work ?
  +		
  +	A: You have to modify nothing in your bootscripts :-)
  +	Because fsck works in that way that
  +	it searches for the corresponding fsck to run for your filesystem
  +	(e.g /sbin/fsck.ext2 for an ext2 system and /sbin/fsck.xfs for a
  +	xfs based filesystem).
  +    	Additionally, the fsck.xfs is only a dummy because fsck'ing happens
  +	automatically during boot.
  +		
  +3.2	After installing the cmd_tar's and additional xfs progs, the installed
  +	program complains about not finding a library, how could that be ?
  +		
  +	A: Unfortunatley (especially in older releases of the cmd_tar's), the
  +	"make install" step seems to be a bit buggy. 
  +	That means that the symlinks are (or worse only partly)
  +	created but it does not copy the actually library file. 
  +	To fix this copy the file manually to the destination directory 
  +	after "make" finished
  +			 
  +	Usually you'll find that library in
  +			 /path/to/programSourcedir/libdir/.libs/library.so
  +	where libdir is libacl,libattr,libxfs for example.
  +	
  +	IMPORTANT: "make clean" will also delete the content of the .libs 
  +	directory so that you have to perform these steps 
  +	before issuing "make clean".
  +	
  +	See also:
  +	http://oss.sgi.com/bugzilla/show_bug.cgi?id=205
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list