On Mon, 3 Apr 2006 08:41:54 +0300, Geoffrey S. Mendelson wrote: > > Hi, I want to copy the complete disk from a Fedora core 4 system > to another disk. The new disk needs to be bootable. > > The disks are different sizes (original 6gig, new 320gig), so dd is out. > > In the old days, it was simple, you just make three partitions (boot, swap > and root), copy the contents of boot and root, run grub and you are done. > > FC4 uses a logical volume manager. Is there a how to? A web page? a wiki? > I could not find one. :-( > > It would be easiest to copy the data over the network after booting the new > system from the rescue or install disk. I could physicaly put the second > drive in the first computer, but that would be less desirable. > > I can also tar the entire disk and put the tar file on a dvd. > > Are there any problems with doing it the old way (three partitions) > besides fixing /etc/fstab and grub.conf?
I do install FC4 from tar archive over the net. My personal Howto (which is specific for our partition strategy is below). >From my (limited) experience the following will work: 1. Partition the new system with same partitions (labels, not size) as the system you are copying from. 2. With a live CD (or older system on the new machine), copy the installed files to the new FSs (you must copy with tar, rsync or similar tool that preserve all file attributes and does not do dereferencing, if you use cp, use cp -a). 3. You should copy (create) /proc /dev but NOT there content. 4. Do grub install on this disk. 5. Fix the /boot/grub/grub.conf for the drive numbering on the actual machine it will run on (if it is the only disk there it is probably hd0). My partition strategy is even simpler than yours: just / and swap, so boot is always the same partition as the root. I did install new OS on a spare partition by copying it and just adding it to the grub.conf on the existing boot/grub directory. Ehud. Notes. Please remember - this is internal script, so some things are specific to us (e.g. the partition sizes). The check for arg1 and Step 5 (ulnx09-to-nn.sh) are administrative check/tool. If you have only 1 or 2 machines to install use the script as a check list / guide. It is not worth the trouble to adjust it. ============================================= Howto for using MVS FC4 install script ============================================= Boot from rescue disk with IP=10.0.0.100 Skip "try to mount old system" ! mount /FC4-net from sw-gib (10.0.0.6) mkdir /mnt/FC4-net mount 10.0.0.6:/ldsk /mnt/FC4-net run install-from-net.sh from the mounted disk cd /mnt/FC4-net/install-FC4 ./install-from-net.sh <NN> - number of ulnx ================================================== install-from-net.sh ================================================== #! /bin/sh -e # Compile by: /bin/sh -e $* # -------------------------------------------------- Yes_or_Abort () { echo "See the above results, Is it OK ?" while [ 1 ] do echo -e "Type Y(es) to continue, anything else to abort \c" read ANS case "$ANS" in "" ) echo "Empty answer ignored !!" ;; [yY]* ) echo -e "\n" # Y(es) - OK, 2 lines space break ;; # Continue with commands * ) echo "Answer was $ANS, Aborted !!!" exit 1 ;; esac done } # ---------------------------------------------------------------------- Run_check () { echo "Next step to execute:" >&3 echo -e " $1\n" >&3 echo -e "Type R(un) to run it, S[top]/Q[uit]/E[xit] to end all, else skip it \c" >&3 read ANS case "$ANS" in [Rr]* ) echo "Run" ;; # R(un) - answer to caller [SsQqEe]* ) echo "Stopped by user" >&3 exit 1 ;; * ) echo "Skip" ;; # skip this step esac } # ---------------------------------------------------------------------- Run_Command () { echo "+ $1" # show the command eval $1 # Run it if [ "$2" != "" ] ; then Yes_or_Abort # Ask user if OK fi } # ---------------------------------------------------------------------- case "$1" in 0[1-8] | [1-8] ) NN=$1 ;; # 1st arg OK XX ) NN=0 ;; # not ULNX<NN> * ) echo -e "\n Argument ($1) not 01-08 or XX\n" exit 1 ;; esac exec 3>&1 # current stdout RC=`Run_check "1) Build the disk (fdisk /dev/hda) as follows"` if [ "$RC" = "Run" ] ; then echo " Device Start End Blocks Id System size " echo " /dev/hda1 1 1566 12578863+ 83 Linux 12880M " echo " /dev/hda2 1567 2088 4192965 82 swap 4294M " echo " /dev/hda3 2089 4865 22306252+ 83 Linux (21.3G)" Run_Command 'fdisk /dev/hda < fdisk-input' fi RC=`Run_check "2) Make file systems / swap"` if [ "$RC" = "Run" ] ; then Run_Command 'mkfs.ext2 -v -j -L "/" -m 0 /dev/hda1' Run_Command 'mkfs.ext2 -v -j -L "/ulnx" -m 0 /dev/hda3' Run_Command 'mkswap -L "SWAP-hda2" /dev/hda2' fi RC=`Run_check "3) mount the new created root (/dev/hda1)"` if [ "$RC" = "Run" ] ; then Run_Command 'mkdir -p /mnt/ulnx66' Run_Command 'mount /dev/hda1 /mnt/ulnx66' Ask fi RC=`Run_check "4) copy (by tar) complete installation from /FC4-net"` if [ "$RC" = "Run" ] ; then Run_Command 'cd /mnt/ulnx66' Run_Command 'tar -xjvf /mnt/FC4-net/install-FC4/ulnx09-disk.tar.bz2' fi RC=`Run_check "5) Replace 09 by new ulnx number - run ulnx09-to-nn.sh"` if [ "$RC" = "Run" ] ; then Run_Command 'cd /mnt/FC4-net/install-FC4' Run_Command 'mount /dev/hda3 /mnt/ulnx66/ulnx' Run_Command "./ulnx09-to-nn.sh $NN" fi RC=`Run_check "6.1) create /dev/hda<xxx> devices on /mnt/ulnx66/dev"` if [ "$RC" = "Run" ] ; then Run_Command 'mknod /mnt/ulnx66/dev/hda' Run_Command 'mknod /mnt/ulnx66/dev/hda1' Run_Command 'mknod /mnt/ulnx66/dev/hda2' Run_Command 'mknod /mnt/ulnx66/dev/hda3' fi RC=`Run_check "6.2) chroot & grub-install"` if [ "$RC" = "Run" ] ; then Run_Command 'chroot /mnt/ulnx66 "/sbin/grub-install /dev/hda"' fi RC=`Run_check "7) umount & reboot"` if [ "$RC" = "Run" ] ; then Run_Command 'umount /mnt/ulnx66/ulnx' Run_Command 'umount /mnt/ulnx66' fi echo -e '\nTake out the rescue CD now !!!' echo -e '\nIf everything is OK type "exit" to exit rescue mode (reboot)' ############################## install-from-net.sh ############################## ================================================== fdisk-input ================================================== p n p 1 1 +12880M n p 2 +4294M n p 3 t 2 82 p w q ================================================== -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]