Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* How to Move Root(/) to Alternate Drive?
@ 1999-03-29  5:00 John Allen
  1999-03-29  5:00 ` Mgros
  1999-03-29  5:00 ` Adam Price
  0 siblings, 2 replies; 5+ messages in thread
From: John Allen @ 1999-03-29  5:00 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to Move Root(/) to Alternate Drive?
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Mgros @ 1999-03-29  5:00 UTC (permalink / raw)


Hi John, 

I would try a tape restore of the root 
directory to the new disk and then 
try booting from that location. If it 
works change your boot location and 
you're off and running. 

Mike

John Allen wrote:
> 
> 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to Move Root(/) to Alternate Drive?
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Adam Price @ 1999-03-29  5:00 UTC (permalink / raw)



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







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to Move Root(/) to Alternate Drive?
  1999-03-29  5:00 ` Adam Price
@ 1999-04-01  5:00   ` Christian Krackowizer
  1999-04-02  5:00     ` Adam Price
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Krackowizer @ 1999-04-01  5:00 UTC (permalink / raw)


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                                       |
+-----------------------------------------------------------------+




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to Move Root(/) to Alternate Drive?
  1999-04-01  5:00   ` Christian Krackowizer
@ 1999-04-02  5:00     ` Adam Price
  0 siblings, 0 replies; 5+ messages in thread
From: Adam Price @ 1999-04-02  5:00 UTC (permalink / raw)



Christian Krackowizer wrote in message
<922979782.679620@hpwp3.technodat.co.at>...
>
>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 ...
Well in that case boot from genvmunix instead, the rebuild a new kernel.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-04-02  5:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
1999-04-02  5:00     ` Adam Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox