Xref: utzoo comp.sys.att:10188 unix-pc.general:5900 Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!n8emr!uncle!celebr!jbm From: jbm@celebr.uucp (John B. Milton) Newsgroups: comp.sys.att,unix-pc.general Subject: Re: New Root disk for UNIXPC Message-ID: <1990Aug13.203103.2841@celebr.uucp> Date: 13 Aug 90 20:31:03 GMT References: <1990Aug11.184541.273@ivucsb.sba.ca.us> Organization: Celebrezze Committee Lines: 98 In article <1990Aug11.184541.273@ivucsb.sba.ca.us> todd@ivucsb.sba.ca.us (Todd Day) writes: >I've been thinking about getting the John Milton disk mod >and getting two hard drives. I'd like to get about a 100MB >(formatted) drive with under 20ms access time. Then, I want >to retire my current 67MB(formatted) drive and use it for >news only. It has served me well these last three years, but >I think it's time to move on (plus, it is fragmented as hell). > >Anyway, what I am wondering, is: What is the least painful way >to copy my entire 67MB drive to the 100MB drive and then make >the 100MB drive my new root drive? Keep in mind that I want to >somehow unfragment the files in the process, so I think using >dd is out of the questiong. > >Also, any comments or suggestions concerning my choice of new >drive would be appreciated... Setup the hardware so that the new 100 meg disk (will be root disk) is the second hard drive. Format it from the diag disk: use "s4test" to get to expert mode, then use the commands "2,2" to format and "2,23" to check. Use the new diag if you want to partition it. Reboot with the original 67M as (still) the first disk. Make the new disk bootable: # /etc/ldrcpy /dev/rfp000 /dev/rfp010 # mkfs /dev/rfp012 # fsck /dev/rfp012 Probably the best way to transfer the files is to generate a list of files first, making sure the target disk is NOT MOUNTED. Do everything with root permission. # cd / # find . -type d -print > /tmp/dlist # find . ! -type d -print > /tmp/dlist Edit the lists into the order you want things to be created. Put things like /bin/sh and /bin/ls first. Put programs that are not used by shell scripts (or not used at all) further down. Put news last on both the directory list and the file list. Delete files in /tmp, /usr/tmp from the list. One could agonize over the correct ordering of the list forever. # mount /dev/fp012 /mnt # cd / # : <1k blocks> is the number from the iv command. can be as big as 65500. # fsck /dev/rfp012 # mv /usr/spool/news /usr/spool/onews # mkdir /usr/spool/news # new mount point # chmod 775 /usr/spool/news # fix the mount point # chown news /usr/spool/news # chgrp news /usr/spool/news # mount /dev/fp012 /usr/spool/news # mount the second disk # chmod 775 /usr/spool/news # fix the root dirs on the 2nd disk # chown news /usr/spool/news # chgrp news /usr/spool/news Setup mountable and checklist: # cat >>/etc/mountable mount /dev/fp012 /usr/spool/news ^D # cat >>/etc/checklist /dev/rfp012 ^D # cd /usr/spool/onews # find . -depth -print|cpio -pdm ../news Check to make sure news is really there in the /usr/spool/news tree. # rm -rf /usr/spool/onews Reboot to make sure everything gets FSCKed and MOUNTed properly. Everything will be, of course, unfragmented. John -- John Bly Milton IV, jbm@uncle.UUCP, n8emr!uncle!jbm@osu-cis.cis.ohio-state.edu (614) h:252-8544, w:469-1990; N8KSN, AMPR: 44.70.0.52; Don't FLAME, inform!