[SUMMARY] - booting from spare root disk

From: Susan Rodriguez <SUSROD_at_HBSI.COM>
Date: Tue, 07 Oct 1997 21:08:21 -0700

Managers,

Thanks to all who responded. This mailing list is fantastic. I have
had over 10 responses in 4 hours. All were very helpful.

1 - How can I get the filesystems to mount to the spare devices?

mount -u /dev/rz10a /

2 - Can't seem to lose the swap partition from the original device

How to change the default swap partition:

Edit rc.config PAGEFILE and PARTITION parameters and
set the symlink in /sbin: ln -s /dev/rz10b swapdefault


I have included the script I wrote as a result of the multitude of
suggestions. It's a little rough, but covers the topic. I tested the
script and successfully backed up / and /usr, replaced fstab, rc.config,
and the symlink in /sbin and rebooted from the spare disk. The whole
thing took about 20 minutes. I was very impressed. (A few of your
responses at the end.)

Kudos to:

Kurt Carlson
Craig Makin
Ian Mortimer
Karim Keshavee
Tom Blinn
A. Mahendra Rajah
Robert McMillin
Rob Hamm
alan_at_nabeth.cxo.dec.com
Jeff Beck
those I've yet to receive



 

>How can I get the filesystems to mount to the spare devices?
>

try (under b -fl s):

# mount -u / # will mount root as writable
# ed /etc/fstab # set to new device
1,$s/old/new/
w
q
# # or, keep a spare fstab available:
# mv /etc/fstab /etc/fstab.old
# mv /etc/fstab.spare /etc/fstab
# # finally:
# /sbin/bcheckrc # or 'init 3'

>2. Can't seem to lose the swap partition from the original device.

What is /sbin/swapdefault set to?
If there, relink it as appropriate.
If not there, there's an rc.config paramter something like PAGEFILE
which
can be set | reset.

kurt

_____________________________________________________________________
Kurt Carlson University of Alaska, ARSC snkac_at_java.sois.alaska.edu
(907)474-5763 910 Yukon Drive #108.84 Fairbanks, AK 99775-6200






susan,

to overcome your / update problem in single user mode issue a
mount -u /
this makes the root filesystem read/write...

I do a simlar thing, the way I overcome it is to have two fstabs, one
for
the booted system
as fstab, the other a copy pointing to the right swap for the new boot
disk
etc....I swap
these around as part of my script that builds my other boot disk (ie.
/mnt/etc for new boot
disk). Also make sure you change /sbin/swapdefault to point to your new
swap!

Its really handy to have this as i use it as a mechanism to apply
patches
and upgrades,
I have a get out back to the old version....

any more questions send me an email

                              Regards Craig Makin

=================================================================
Craig Makin, UNIX Systems Administrator, GE Capital IT Solutions
Perth, WA Australia http://www.gecits-ap.com
Ph: +61 8 9429 6405 craig.makin_at_gecits-ap.com
=================================================================


Hi Susan

> I have created a spare root disk on my Alpha 3000. I used dump -0f -
/
> <snip>
> single-user from the spare disk brought / up as a read-only file
system.
> How can I get the filesystems to mount to the spare devices?

When you first boot into single user do this to get the / file
system mounted read-write.

   mount -u /dev/rz3a /

Obviusly you should replace /dev/rz3a with the correct device name
for your spare root partition.
 

> 2. Can't seem to lose the swap partition from the original device.

If you're running in eager swap mode you will have a link in
/sbin which looks something like this:

   lrwxrwxrwx 1 root system 11 Jul 3 1995 swapdefault -> ../dev/rz3b

You will need to set this to point to the swap partition on the spare
device.


Ian

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Ian Mortimer _/
_/ mortimer_at_physics.uq.edu.au ,-_|\ Department of Physics _/
_/ Tel : +61 7 3365 3436 / *\ University of Queensland _/
_/ Fax : +61 7 3365 1242 \_,-._/ St. Lucia, Brisbane _/
_/ v Queensland, Australia 4072 _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Disclaimer: Any opinions expressed are my own.

Hi there,

        There is another file you will have to edit on your
        spare disk to move the swap:
        /etc/rc.config
        has two swap related entries, PAGEFILE="/dev/rz1b"
        and PARTITION="rz1b".
        You need to change both of these entries
        to say rz10b.
        Also look out for the swapdefault link in /sbin
        such as
        swapdefault -> ../dev/rz1b
        This link is used as a switch to decide which swap
        algorithm the system will use. If the link is there
        it will use immediate mode, if no link is there
        it will use over-commitment mode.
        It is probably easiest to just delete the link on your
        spare disk, unless the swap mode is critical for your system.
        See man (8) swapon for info about swap methods.
        Note that this link does not decide WHERE the swap partition
        is, it just decides which swap method to use on the swap
        partitions defined in fstab and rc.config.
        I'm not sure of the effect of pointing the link to
        a partition which has not been defined as a swap area.


Cheers.

Karim.



-- 
------------------------------------------------------------------------
---
Karim Keshavjee			 |e-mail:  keshavje_at_cwr.uwa.edu.au
Network Systems Officer		 |Room:    G11, CWR Atrium
Centre for Water Research	 |phone:   +61 08 9380 2408
University of Western Australia	 |fax:     +61 08 9380 1015
------------------------------------------------------------------------
---

Received on Wed Oct 08 1997 - 06:21:47 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT