From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2ed5793b8eedb52b X-Google-Attributes: gidfee84,public From: kra1@technodat.co.at (Christian Krackowizer) Subject: Re: How to Move Root(/) to Alternate Drive? Date: 1999/04/01 Message-ID: <922979782.679620@hpwp3.technodat.co.at>#1/1 X-Deja-AN: 461594964 Cache-Post-Path: hpwp3.technodat.co.at!unknown@pc01.technodat.co.at References: <36ff9402.460612909@news.mtt.net> <922732652.20159.0.nnrp-12.c2deb51d@news.demon.co.uk> Content-Type: Text/Plain; charset=US-ASCII X-Complaints-To: abuse@Austria.EU.net X-Trace: fleetstreet.Austria.EU.net 922979782 3848 193.81.3.164 (1 Apr 1999 15:16:22 GMT) Organization: Technodat CAD/CAM - Systeme fuer Moebel X-Cache: nntpcache 2.3.3b4 (see http://www.nntpcache.org/) Mime-Version: 1.0 NNTP-Posting-Date: 1 Apr 1999 15:16:22 GMT Newsgroups: comp.unix.osf.osf1 In article <922732652.20159.0.nnrp-12.c2deb51d@news.demon.co.uk>, adam+usenet@pappnase.demon.co.uk says... > > >John Allen wrote in message <36ff9402.460612909@news.mtt.net>... >>Hi: >> >>Is there a resonably uncomplicated method of changing the >>location(drive) for the root(/) dir? >> >>I presently am running 3.2C with the root on my 1GB drive. >> >>I'd like to move my root to my 2GB drive. >> >>Other than a system re-install, is there another way to do this >>safely? >> >>Thanks, >> >>John L. Allen >OK Here goes. > >1G drive has scsi ID 0 on bus 0, and uses a standard partition layout. >2G drive has scsi ID 1 on bus 0, is empty and has not been in the machine >before. > >At the console prompt: > >>>> boot -flags s -file vmunix >This will boot to single user mode. > >When in single user mode > ># fsck / # Check the root filesystem ># bcheckrc # Check and mount other filesystems in >/etc/fstab ># swapon -a # Turn on swapping ># cd /dev ># ./MAKEDEV rz1 # create special devices for rz1 ># cd /tmp ># disklabel rz1 > rz1.safe # save current rz1 disklabel in a file, it is ok >if this fails, > # but it is always better to be able to undo >something if you can. ># disklabel -z rz1 # wipe current disklabel ># disklabel -rw rz1 rz1 # write default disklabel and bootblocks on rz1 ># disklabel -e rz1 # edit disklabel (editor chosen based on $EDITOR >or vi if unset). ># newfs /dev/rz1a # write filesystem on new partition. ># mkdir /newroot ># mount /dev/rz1a /newroot # mount new root partition. ># vdump -0f- / | (cd /newroot && vrestore -xf -) # copy root partition. ># sync ># cd /newroot/etc ># sed 's/rz0a/rz1a/' fstab >fstab.new # change fstab on new disk. ># mv fstab.new fstab ># cd / ># umount /newroot ># init 0 > >This should take you back to the chevrons > >boot the new disk using, >>>> boot dka100 > >This should boot from your new disk into whatever runlevel you normally get. >If this works then on many of the alphas you should change the console >variable bootdef_dev to dka100, which will change the default boot device. > >If you want to move /usr then you can use a similar technique. > >Hope this helps >Adam > Hmm, I'm not sure if there aren't some scsi-id specific settings in the kernel or some config files. It would be more safe to switch scsi-id's ... -- +-----------------------------------------------------------------+ | Krackowizer Christian mailto:kra1@technodat.co.at | | TECHNODAT Phone: ++43-(0)662-454944-0 | | CAD/CAM - Systeme fuer Moebel GmbH FAX: ++43-(0)662-454944-9 | | Jakob-Haringer-Strasse 6 http://www.technodat.co.at/ | | A-5020 Salzburg / Austria | +-----------------------------------------------------------------+