* convert root filesystem to AdvFS
@ 1998-06-22 4:00 Tom Goessi
1998-06-23 4:00 ` Mark & Suzanne (gcs might work)
0 siblings, 1 reply; 6+ messages in thread
From: Tom Goessi @ 1998-06-22 4:00 UTC (permalink / raw)
Hi out there.
I want to convert the root filesystem from UFS to AdvFS.
In the manual there is a description how to convert, but another
harddrive is used there.
My plan is either to copy the root filesystem with vdump to another
partition on the same disk and then to boot from this partition, convert
the old partition to AdvFS and then restore the root filesystem on the
old partition or to boot from a CDROM and then to backup the root
filesystem, to convert the partition then and to restore the root
filesystem.
The harddrive has four partitions: a,b,g,h
a is root, b is swap, g is /usr and h is an empty partition formated
with UFS.
My questions are:
Can I copy the root filesystem to h and then make a bootable partition
from h?
I cannot see my partitions, when I boot from CDROM. The partitions are
not
shown in the /dev directory and cannot be mounted then. If I use the
disklabel
command, I can see all partitions on the harddrive.
What can I do, that I can mount partitions a and h, so that I can copy
the root
filesystem from a to h, convert partition a to Advfs and then copy the
root data
back from h to a?
Thank you very much.
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: convert root filesystem to AdvFS
1998-06-22 4:00 convert root filesystem to AdvFS Tom Goessi
@ 1998-06-23 4:00 ` Mark & Suzanne (gcs might work)
1998-06-23 4:00 ` Nikola Milutinovic
0 siblings, 1 reply; 6+ messages in thread
From: Mark & Suzanne (gcs might work) @ 1998-06-23 4:00 UTC (permalink / raw)
Tom Goessi wrote:
>
> Hi out there.
>
> I want to convert the root filesystem from UFS to AdvFS.
>
> My questions are:
> Can I copy the root filesystem to h and then make a bootable partition
> from h?
just vdump -0f /usr/root.vdump /
I assume /usr is on advfs and is usr_domain#usr
ls -l /etc/fdmns/usr_domain and note which patition(s) are used
boot from the CD-ROM
>
> I cannot see my partitions, when I boot from CDROM. The partitions are
> not
> shown in the /dev directory and cannot be mounted then. If I use the
> disklabel
You need to create the paritions/dev
cd /dev
./MAKEDEV rz0
You don't mention which disk you boot from if its not ID0 then you need
to know what it is to
make the correct devices
assuming from hereon in that it was rz0 and that usr_domain contained
rz0g
mkfdmn -r /dev/rz0a r
That -r is very important for root domains it prevents the domain from
being expanded!
mkfset r root
Note that this has only create the domain pointers in the memory
filesystem not on your new target
root volume!!
DO NOT !! make file domain on usr !!!!
cd /etc/fdmns
mkdir u
cd u
ln -s /dev/rz0g .
mkdir /tmp/r
mkdir /tmp/u
mount r#root /tmp/r
mount u#usr /tmp/u
cd /tmp/r
vrestore -xf /tmp/u/root.vdump
Now that you have the root back you need to fix its /etc/fdmns and
/etc/fstab
cd /tmp/r/etc/fdmns
mkdir root_domain
cd root_domain
ln -s /dev/rz0a .
cd ../..
vi fstab
{root_domain#root / advfs rw 1 0} <- This should now
replace you mount of /
umount /tmp/u
cd /
umount /tmp/r
You can now hit the reset and boot your new advfs root
Cheers
Mark :)
ps.
Did I say backup first, The wrong command at the wrong moment and kiss
you data good buy!
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: convert root filesystem to AdvFS
1998-06-23 4:00 ` Mark & Suzanne (gcs might work)
@ 1998-06-23 4:00 ` Nikola Milutinovic
1998-06-24 4:00 ` Mark & Suzanne (gcs might work)
0 siblings, 1 reply; 6+ messages in thread
From: Nikola Milutinovic @ 1998-06-23 4:00 UTC (permalink / raw)
Mark & Suzanne (gcs might work) wrote:
>
>
> You need to create the paritions/dev
> cd /dev
> ./MAKEDEV rz0
> You don't mention which disk you boot from if its not ID0 then you need
> to know what it is to
> make the correct devices
>
> assuming from hereon in that it was rz0 and that usr_domain contained
> rz0g
> mkfdmn -r /dev/rz0a r
!!!!!!!!!!!!!!!!!!!!
Ahhh. You are forgeting something (I am not, since I had a "privilege"
of restoring root file sistem from backup). You must make that disk
AdvFS bootable.
Tom asked if he could make partition h bootable. Well,...
For a partition to be bootable, it must have offset of 0. AFAIK, any
partition starting from 0 can be bootable, if you have a proper
bootstrap loader (I'm not sure if it looks at the label). But, tradition
is tradition, let us make it partition a.
Since there are 2 posible FSs for root, there are TWO bootstrap loaders.
Each is installed via disklabel command. The problem is, I couldn't make
it work with -R option (restore form a file). I had to zero label,
install new and then restore the old. So, supposing you have RZ29
disk...
# disklabel rz0 > /usr/disklabel.RZ0
# dikslabel -z rz0
# disklabel -wr -t advfs rz0 RZ29
# disklabel -R rz0 /usr/disklabel.RZ0
Of course, this is "open hart surgery" WITHOUT anaestethics. This
actually deletes and writes a disklabel on the disk with live file
systems, namelly root and usr. You could really mess things up this way.
My advice (and the way I did it) is:
1. backup root FS thoroughly, 2 or 3 copies.
2. boot from OS CD-ROM, get to System Maintainance/Root Shell
3. cd /dev ; ./MAKEDEVrz0
4. play with disklabels as above
5. create AdvFS for root
6. mount it
7. restore root from backup
8. ammend root (you need to change /etc/fdmns, /etc/fstab)
> Did I say backup first, The wrong command at the wrong moment and kiss
> you data good buy!
Couldn't agree more.
Nix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: convert root filesystem to AdvFS
1998-06-23 4:00 ` Nikola Milutinovic
@ 1998-06-24 4:00 ` Mark & Suzanne (gcs might work)
1998-06-24 4:00 ` Nikola Milutinovic
0 siblings, 1 reply; 6+ messages in thread
From: Mark & Suzanne (gcs might work) @ 1998-06-24 4:00 UTC (permalink / raw)
Nikola Milutinovic wrote:
>
> Mark & Suzanne (gcs might work) wrote:
> >
> >
> > You need to create the paritions/dev
> > cd /dev
> > ./MAKEDEV rz0
> > You don't mention which disk you boot from if its not ID0 then you need
> > to know what it is to
> > make the correct devices
> >
> > assuming from hereon in that it was rz0 and that usr_domain contained
> > rz0g
> > mkfdmn -r /dev/rz0a r
>
> !!!!!!!!!!!!!!!!!!!!
>
> Ahhh. You are forgeting something (I am not, since I had a "privilege"
> of restoring root file sistem from backup). You must make that disk
> AdvFS bootable.
>
> Tom asked if he could make partition h bootable. Well,...
>
> For a partition to be bootable, it must have offset of 0. AFAIK, any
> partition starting from 0 can be bootable, if you have a proper
> bootstrap loader (I'm not sure if it looks at the label). But, tradition
> is tradition, let us make it partition a.
>
> Since there are 2 posible FSs for root, there are TWO bootstrap loaders.
> Each is installed via disklabel command. The problem is, I couldn't make
> it work with -R option (restore form a file). I had to zero label,
> install new and then restore the old. So, supposing you have RZ29
> disk...
>
> # disklabel rz0 > /usr/disklabel.RZ0
> # dikslabel -z rz0
> # disklabel -wr -t advfs rz0 RZ29
> # disklabel -R rz0 /usr/disklabel.RZ0
>
You need to know the type of the disk
eg rz0 which is a RZ29
disklabel -r rz0 > rz0.lab
disklabel -R -r -t advfs rz0.lab RZ29
Well forgetting that was like leaving the cars keys behind - you
don't get far away before you are reminded :)
Cheers
Mark :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: convert root filesystem to AdvFS
1998-06-24 4:00 ` Mark & Suzanne (gcs might work)
@ 1998-06-24 4:00 ` Nikola Milutinovic
1998-06-25 4:00 ` Mark & Suzanne (gcs might work)
0 siblings, 1 reply; 6+ messages in thread
From: Nikola Milutinovic @ 1998-06-24 4:00 UTC (permalink / raw)
Mark & Suzanne (gcs might work) wrote:
>
> > # disklabel rz0 > /usr/disklabel.RZ0
> > # dikslabel -z rz0
> > # disklabel -wr -t advfs rz0 RZ29
> > # disklabel -R rz0 /usr/disklabel.RZ0
> >
> You need to know the type of the disk
> eg rz0 which is a RZ29
>
> disklabel -r rz0 > rz0.lab
> disklabel -R -r -t advfs rz0.lab RZ29
I tried this and IT DIDN'T WORK. I was surprized myself, but I had to do
what I wrote.
Also, when you restore the label from the file, you dont need to specify
the disk type, it's already in the label, in that file. You need it only
when creating a new label, for lookup in /etc/disktab.
Nix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: convert root filesystem to AdvFS
1998-06-24 4:00 ` Nikola Milutinovic
@ 1998-06-25 4:00 ` Mark & Suzanne (gcs might work)
0 siblings, 0 replies; 6+ messages in thread
From: Mark & Suzanne (gcs might work) @ 1998-06-25 4:00 UTC (permalink / raw)
Nikola Milutinovic wrote:
>
> Mark & Suzanne (gcs might work) wrote:
> >
> > > # disklabel rz0 > /usr/disklabel.RZ0
> > > # dikslabel -z rz0
> > > # disklabel -wr -t advfs rz0 RZ29
> > > # disklabel -R rz0 /usr/disklabel.RZ0
> > >
> > You need to know the type of the disk
> > eg rz0 which is a RZ29
> >
> > disklabel -r rz0 > rz0.lab
> > disklabel -R -r -t advfs rz0.lab RZ29
Missed the device disklabel -R -r -t advfs rz0 rz0.lab RZ29
>
> I tried this and IT DIDN'T WORK. I was surprized myself, but I had to do
> what I wrote.
>
> Also, when you restore the label from the file, you dont need to specify
> the disk type, it's already in the label, in that file. You need it only
> when creating a new label, for lookup in /etc/disktab.
What version of UNIX are you using ??
# disklabel -R -r -t advfs rz8 rz8.lab
Must specify either disktype or bootfiles with -r flag of RESTORE option
Yes I know the types in the label only wish disklabel looked for it :(
However look at the above error status!
# disklabel -R -r -t advfs rz8 rz8.lab RZ28D
#
rz8 is my boot disk on my 4.0D and its worked this way for as long as I
can remember.
Cheers
Mark :)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1998-06-25 4:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-06-22 4:00 convert root filesystem to AdvFS Tom Goessi
1998-06-23 4:00 ` Mark & Suzanne (gcs might work)
1998-06-23 4:00 ` Nikola Milutinovic
1998-06-24 4:00 ` Mark & Suzanne (gcs might work)
1998-06-24 4:00 ` Nikola Milutinovic
1998-06-25 4:00 ` Mark & Suzanne (gcs might work)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox