Re: Dieing or Dead /root disk
From: Walter Roberson (roberson_at_ibd.nrc-cnrc.gc.ca)
Date: 08/22/04
- Previous message: david_at_wombat.com: "Dieing or Dead /root disk"
- In reply to: david_at_wombat.com: "Dieing or Dead /root disk"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Aug 2004 02:14:54 GMT
In article <10ifqj7e1emfp6c@news.supernews.com>, <david@wombat.com> wrote:
:I have an old Indigo2 whose root drive is dieing or maybe even dead. It
:has been doing xfs_repair and scsi reset errors for the last day. It
:also sounds like it is dieing.
:I have data backups on tape. The system also has a second disk drive
:that probably has enough space to hold everything on the root drive
:but the disk is partitioned as one large partition.
:I have but can't find install media.
:I'm wondering what steps I should talk to get the second drive to
:be bootable. Obviously I have to copy stuff over, but will a dump
:restore do the right thing? Also, there is the NVRAM change which
:I have forgotten the details of. The biggest question is if I can
:boot with swap in a file.
Use dvhtool's "vd" (volume directory) command to look at your
current root disk, and for each name you see listed there, 'g' (get)
it specifying it's vd name and a pathname on the disk to write it to.
Then use dvhtool's vd on the new disk and 'add' the files onto the
second disk.
xfsdump - / | xfsrestore - /NEWDIRECTORY will copy the contents
over -- but if you have existing content on the new drive, you are
likely going to want to create a new directory there and mv the top
level files into that new directory, so that the dump/restore can
set up the right directory structures.
In theory you should also use either fx or dvhtool to set the
boot file on the new disk to /unix but if you use fx and
/label/show/all you will almost certainly find that that has
already been done for you.
After that, the easiest way to bring the new disk into operation
is to shut down, swap the scsi IDs around, and reboot. But if you
cannot do that for some reason, then if you yank the first drive
and then go into the prom and 'resetenv', the prom environment variables
should be adjusted for you. If, though, for some reason you need
to boot off the new drive while keeping the old drive in place, then
in the prom you should
setenv SystemPartition dksc(0,N,8)
setenv OSLoadPartition dksc(0,N,Y)
where N is the scsi ID of the new drive, and Y would normally
be 0 for a root partition, but if your drive happens to be all
partition 7 then you would make Y 7.
Now, there's another trick you need to know about booting off of
alternate disks, that goes beyond SystemPartition and OSLoadPartition .
If you have created the drive somehow other than by 'inst'
(e.g., you cloned it) and you are using a SCSI ID different than
what was in the kernel for the previous incarnation, then in the
prom you should set the environment variable 'root' to
dksc(0,N,Y) [Y is as discussed above], and you would set
the environment variable 'swap' to dksc(0,N,1) if you had
a normal swap partition, but you should clear the environment
variable 'swap' if you are not using a swap partition. Then
[having done the other changes I gave above], you should boot,
and once you have booted, you should autoconfig -f to force
the kernel to be regenerated. Reboot and the new kernel on that
drive will know where the root and swap are. If you don't do this
autoconfig step then the old kernel will still be in place and it
will try reading the root and swap from the previous values.
:The biggest question is if I can
:boot with swap in a file.
YES for IRIX 6.5,
NO for all previous versions of IRIX that run on the Indigo^2.
In other words, if you aren't working with IRIX 6.5, then
the fact that you do not have a swap *partition* is going to
give you grief. You just -might- be able to hack something up
for IRIX 6.2, but you have no chance with IRIX 5.*.
I would suggest that you use fx and look *very* carefully
at the size of partition #8 (the volume directory, always starts
from SCSI block #0), and at the location of the start of the
one partition you have on the drive. There is often a gap between
the end of the volume directory and the beginning of the first
partition, reflecting the fact that IRIX used to like to have the
partitions aligned on cylindar boundaries (which is pretty much
an obsolete concept as far as SCSI goes). You can also almost always
reduce the size of the volume directory (partition 8) -- delete
-all- the files in the current volume directory, put 'sash' back
in first, put in 'ide' only if you *really* need it -- and [provided
you aren't using xvm or xlv] you can grab any block past the end of
the files that you have written into the volume directory.
Use fx -x /repartition/expert -b in order to change the size
of the volume directory to the minimum you need, and then
while still in expert repartitioning mode, when it asks you which
partition you want to change, type in the number 1 . When you
type in a partition number that does not appear to exist according
to the partition list, then you essentially "create" that partition
as long as you give it a non-zero size.
For IRIX 6.2, it isn't important that you have a -big- swap
partition to get booted -- it is only important that you *have*
a swap partition. But if you are running a system that has very
little memory, then you might end up trying to swap out even just while
booting up IRIX, and then you'd be in trouble!
My recollection is that the same trick won't work on IRIX 5.3, that it
wants to grab some swap very early, but I don't recall the reasons,
and you could always -try-.
Special note: if your current root drive is the split / and /usr
one, then if you unmount /usr and then look inside /usr you will
find that there is something there (/usr/lib pointing to /lib
or something like that), You have to take an extra step in converting
a split partition system to a single partition system because of this,
but I don't recall exactly what the extra step is!
-- millihamlet: the average coherency of prose created by a single monkey typing randomly on a keyboard. Usenet postings may be rated in mHl. -- Walter Roberson
- Previous message: david_at_wombat.com: "Dieing or Dead /root disk"
- In reply to: david_at_wombat.com: "Dieing or Dead /root disk"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|