From: kra1@technodat.co.at (Christian Krackowizer)
Subject: Re: How to Move Root(/) to Alternate Drive?
Date: 1999/04/01 [thread overview]
Message-ID: <922979782.679620@hpwp3.technodat.co.at> (raw)
In-Reply-To: 922732652.20159.0.nnrp-12.c2deb51d@news.demon.co.uk
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 |
+-----------------------------------------------------------------+
next prev parent reply other threads:[~1999-04-01 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-29 5:00 How to Move Root(/) to Alternate Drive? John Allen
1999-03-29 5:00 ` Mgros
1999-03-29 5:00 ` Adam Price
1999-04-01 5:00 ` Christian Krackowizer [this message]
1999-04-02 5:00 ` Adam Price
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox