Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

?Re repartitioning boot disk: does swap need initializing (SUNOS)

6 views
Skip to first unread message

Tom Rodman

unread,
Dec 3, 1999, 3:00:00 AM12/3/99
to
I'm planning to upgrade a Sparc 2 from SUN OS 4.1.3 to 4.1.4 for y2k. To do so
I need a larger /usr partition. My plan is to
use a spare 1.3GB disk (currently with data on it) as my new boot disk
for SUNOS 4.1.4. First I'll repartition the 1.3GB disk (sd1):

/dev/sd1a for root
/dev/sd1b for swap
/dev/sd1g for usr
/dev/sd1h for home

Next I'll use newfs to setup file systems and use "restore" to
restore the my current
(sd0) versions of /, usr, and home to the (sd1) 1.3GB disk.

My questions are:

Do I need to do anything to initialize the swap partition (sd1b)?
Can the swap partition have garbage on it from a former file
system (a normal previously mountable system for example)?

How does the OS know where the swap partition is? My guess is
that it's hardcoded as the "b" partition of the boot disk.

regards, thanks much in advance,


Tom Rodman <rod...@sol.net>


Brion Leary

unread,
Dec 5, 1999, 3:00:00 AM12/5/99
to Tom Rodman
Tom,

The swap partition must be the b partition. It does not need to be
initialized.
Total swap space must be >= system ram, in Sun OS 4.x ram can not be
used unless there is available swap for it. Eg 1GB ram and 512MB swap,
the
system can only use 512MB total memory.

Brion Leary

Martin Meserve

unread,
Dec 6, 1999, 3:00:00 AM12/6/99
to Tom Rodman
Tom Rodman wrote:
>
> I'm planning to upgrade a Sparc 2 from SUN OS 4.1.3 to 4.1.4 for
> y2k. To do so I need a larger /usr partition. My plan is to
> use a spare 1.3GB disk (currently with data on it) as my new
> boot disk for SUNOS 4.1.4. First I'll repartition the 1.3GB
> disk (sd1):
>
> /dev/sd1a for root
> /dev/sd1b for swap
> /dev/sd1g for usr
> /dev/sd1h for home
>
> Next I'll use newfs to setup file systems and use "restore" to
> restore the my current
> (sd0) versions of /, usr, and home to the (sd1) 1.3GB disk.
>
> My questions are:
>
> Do I need to do anything to initialize the swap partition (sd1b)?
> Can the swap partition have garbage on it from a former file
> system (a normal previously mountable system for example)?
>
> How does the OS know where the swap partition is? My guess is
> that it's hardcoded as the "b" partition of the boot disk.
>
> regards, thanks much in advance,
>
> Tom Rodman <rod...@sol.net>

Tom,

What you propose will work fine for creating the new disk, however,
you will have to adjust the "/etc/fstab" to reflect the new
SCSI ID. Your current "/etc/fstab" should have "sd0" referenced
and that will need to be changed to "sd1".

You don't have to worry about any of the old data on the disk.
Once you repartition and newfs everything, the old data is
history. As for the swap partition, it doesn't need any
initialization.

Someone else mentioned that the swap partition must be the b
partition. It is true that "by default" the b partition is used
for swap, for the GENERIC kernal. But, it can be changed to
anything. It can even be defined on a separate disk from your
other file systems or split between two or more partitions
on separate disks.

The definition of this is hard coded into the kernal, but that
can be changed. GENERIC refers to a configuration file and
usually is visable in the login banner:

Last login: Mon Dec 6 07:51:36 from rupert
SunOS Release 4.1.4 (GENERIC) #2: Fri Oct 14 11:09:47 PDT 1994

This file is kept in "/usr/sys/sun4c/conf" and is an ascii
readable file. I don't remember what kind of architecture the
Sparc 2 has so "sun4m" might be "sun4c" or "sun4" in your
instance. An "arch -k" will tell you which one to use. In the
GENERIC kernal configuration file there is a line that reads:

config vmunix swap generic

This line can be changed to define a different swap configuration.
If, for example, you wanted to have your system on "sd0" and
your swap space exist on "sd1" you could change the configuration
file to read:

config vmunix root on sd0a swap on sd1b

When the kernal is rebuilt, which is not a process to take lightly,
"/" will be expected on sd0a and swap will be on sd1b.

To use multiple partitions you could use the above, to define the
initial system setup, and then with an entry in the "/etc/fstab"
another partition can be concatenated. The line below will add
the partition "sd0b" to the swap space defined in the kernal,
"sd1b".

/dev/sd0b swap swap rw 0 0

You can also create large empty files, anywhere on your system,
and add them to the normal swap space, using the "swapon" command.

Most of this kind of stuff was only necessary in the "olden days"
when disks were small, or when I increased a machines memory and
didn't have sufficient swap space.

Martin

--
Martin E. Meserve KB7EQS martin.e.meserve
Engineer, Program/Project Specialist AT
Lockheed Martin M&DS - Reconnaissance Systems lmco.com

I respond to news groups and E-Mail on my own time and therefore my
responses may not be as timely as you, or I, would like them to be. If
I seem to be ignoring you, send me another E-Mail to jog my memory.
Opinions are my own and do not reflect the opinions of my employer.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

0 new messages