New Root disk for UNIXPC

John B. Milton jbm at celebr.uucp
Tue Aug 14 06:31:03 AEST 1990


In article <1990Aug11.184541.273 at ivucsb.sba.ca.us> todd at 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 /
# </tmp/dlist cpio -pdm /mnt
# </tmp/list cpio -pdm /mnt

CHECK EVERYTHING ON /mnt TO MAKE SURE IT MADE IT!!

Shutdown

Set the select on the 67M for drive 2 and the select on the 100M to drive 1.
Reboot and MAKE DAMN SURE everything is ok.

Reboot to the diag disk. Reformat and verify the 67M (WHICH IS NOW THE SECOND
DRIVE!!!) with expert 2,2 and 2,23. When it asks you about the size of the
swap partition, answer 0. Our OS can only support one swap area. This will give
you another 5M for news. Reboot to UNIX.

# iv -t /dev/rfp010

Note the number of logical (1k) blocks of partition 2.
# mkfs /dev/rfp012 <1k blocks>:<inodes>
<1k blocks> is the number from the iv command. <inodes> 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 at uncle.UUCP, n8emr!uncle!jbm at osu-cis.cis.ohio-state.edu
(614) h:252-8544, w:469-1990; N8KSN, AMPR: 44.70.0.52; Don't FLAME, inform!



More information about the Comp.sys.att mailing list