What Am I Doing Wrong (Copying Boot Partition)

What Am I Doing Wrong (Copying Boot Partition)

Post by Brett Frankenberg » Mon, 24 May 1999 04:00:00



Can anyone enlighten me what I'm leaving out of the following process:

I have a SPARC 5 with a 2GB disk that I need to upgrade to 4GB.  So I
obtained a 4.somthing GB drive and installed it as the second drive,
and then booted singleuser from a CDROM ("boot cdrom -s" at the Ok
prompt).  (The SPARC is running Solaris 2.5.1, and the CD I booted form
was the 2.5.1 install CD.)  From the CDROM bootup, I labeled and
partitioned the new disk, ran newfs on the partitions.  I then mounted
the partitions (from the old and the new disks) and, using cpio, moved
all the files over.  I ran "installboot" on the new root partition.  I
then removed the both drives and then installed the new 4GB drive as
the first drive.  

I then tried to boot.  It hung during boot.  A "boot -sv" showed that
the last thing it printed was messages from the video driver loading.
I then put the original disk in and did "boot -sv" and it came up fine.
After the video driver message, the next message was "configuring
network interfaces" which is printed by the first script in rcS.d.  So,
on the new disk, the system is* something after the last message
the kernel prints and the first message the init scripts print.  My
guess is that the kernel is unable to exec init, but I don't know that
for sure -- maybe init is getting started, and it just hangs.

I've tried all obvious things -- making sure all the files got copied
(the new partition is slightly larger than the old, so there's space,
and I ran diffs against all the files on the root partition that
appeared to matter.  The hang is well before /usr mounts, so it isn't
there.)

I'm not going anything very out of the ordinary.  The root partition is
small (30MB), it beging at cylinder 0, it's c0tXd0s0 (where X is 1 when
it's the second disk (which it was when I was copying stuff to it) and
3 when it's the first disk).  There's only one disk in the machine
(except there was two when I was doing the copies, of course).

A "boot -r" will cause it to hang before it prints "configured
/devices".

Any thoughts?

Thanks in advance ...
--


------------------------------------------------------------------------------
                               ... Coming soon to a      | Brett Frankenberger

 
 
 

What Am I Doing Wrong (Copying Boot Partition)

Post by Chris Thomps » Mon, 24 May 1999 04:00:00




>Can anyone enlighten me what I'm leaving out of the following process:
[snip]
>Any thoughts?

Well, you don't explicitly say that you updated the /etc/vfstab on the
new disc to refer to that rather than to the old disk, after copying it.
Did you?

Chris Thompson
Email: cet1 [at] cam.ac.uk

 
 
 

What Am I Doing Wrong (Copying Boot Partition)

Post by Brett Frankenberg » Mon, 24 May 1999 04:00:00






>>Can anyone enlighten me what I'm leaving out of the following process:
>[snip]
>>Any thoughts?

>Well, you don't explicitly say that you updated the /etc/vfstab on the
>new disc to refer to that rather than to the old disk, after copying it.
>Did you?

Nothing to change.  The new disk is partitioned the same as the old
one.  And, while the new disk was SCSI ID 1 while I was copying files
(the old disk was SCSI ID 3), I moved the new disk to SCSI ID 3 before
booting.  So everything is the same as it was before, except that some
of the partitions were larger.

Also, the hang is occurring before the startup scripts get to the point
of actually trying to mount anything, so vfstab wouldn't have even been
looked at prior to the hang (unless the kernel itself looks there)
--


------------------------------------------------------------------------------
                               ... Coming soon to a      | Brett Frankenberger

 
 
 

What Am I Doing Wrong (Copying Boot Partition)

Post by Neil Ricke » Mon, 24 May 1999 04:00:00



>I have a SPARC 5 with a 2GB disk that I need to upgrade to 4GB.  So I
>obtained a 4.somthing GB drive and installed it as the second drive,
>and then booted singleuser from a CDROM ("boot cdrom -s" at the Ok
>prompt).  (The SPARC is running Solaris 2.5.1, and the CD I booted form
>was the 2.5.1 install CD.)  From the CDROM bootup, I labeled and
>partitioned the new disk, ran newfs on the partitions.  I then mounted
>the partitions (from the old and the new disks) and, using cpio, moved
>all the files over.  I ran "installboot" on the new root partition.  I
>then removed the both drives and then installed the new 4GB drive as
>the first drive.  

I just did something similar, and the system came up clean the first
time.  The one difference what that I used 'ufsdump' and 'ufsrestore'
to copy the files.

At a guess, I would suspect that 'cpio' does not handle devices
special files, whereas ufsdump/ufsrestore do.  I actually used a tape
to avoid the multiple disk install.  But you can run ufsdump to
output to stdout, and pipe that to the input of ufsrestore.

 
 
 

What Am I Doing Wrong (Copying Boot Partition)

Post by John Savag » Tue, 25 May 1999 04:00:00


If you don't have identical disks you have to make your partitions, mount
the new partition(s), and do something like " cd / ; tar cvfp - | (cd /mnt ;
tar xvfp - .) "

If I remember correctly tar uses the existing block information and cpio and
ufsdump recreate whatever was on the original media, fs, files and all.

John


> Can anyone enlighten me what I'm leaving out of the following process:

> I have a SPARC 5 with a 2GB disk that I need to upgrade to 4GB.  So I
> obtained a 4.somthing GB drive and installed it as the second drive,
> and then booted singleuser from a CDROM ("boot cdrom -s" at the Ok
> prompt).  (The SPARC is running Solaris 2.5.1, and the CD I booted form
> was the 2.5.1 install CD.)  From the CDROM bootup, I labeled and
> partitioned the new disk, ran newfs on the partitions.  I then mounted
> the partitions (from the old and the new disks) and, using cpio, moved
> all the files over.  I ran "installboot" on the new root partition.  I
> then removed the both drives and then installed the new 4GB drive as
> the first drive.

> I then tried to boot.  It hung during boot.  A "boot -sv" showed that
> the last thing it printed was messages from the video driver loading.
> I then put the original disk in and did "boot -sv" and it came up fine.
> After the video driver message, the next message was "configuring
> network interfaces" which is printed by the first script in rcS.d.  So,
> on the new disk, the system is* something after the last message
> the kernel prints and the first message the init scripts print.  My
> guess is that the kernel is unable to exec init, but I don't know that
> for sure -- maybe init is getting started, and it just hangs.

> I've tried all obvious things -- making sure all the files got copied
> (the new partition is slightly larger than the old, so there's space,
> and I ran diffs against all the files on the root partition that
> appeared to matter.  The hang is well before /usr mounts, so it isn't
> there.)

> I'm not going anything very out of the ordinary.  The root partition is
> small (30MB), it beging at cylinder 0, it's c0tXd0s0 (where X is 1 when
> it's the second disk (which it was when I was copying stuff to it) and
> 3 when it's the first disk).  There's only one disk in the machine
> (except there was two when I was doing the copies, of course).

> A "boot -r" will cause it to hang before it prints "configured
> /devices".

> Any thoughts?

> Thanks in advance ...
> --


> --------------------------------------------------------------------------
----
>                                ... Coming soon to a      | Brett
Frankenberger
> .sig near you ... a Humorous Quote ...                   |


 
 
 

What Am I Doing Wrong (Copying Boot Partition)

Post by Peter Ben » Tue, 25 May 1999 04:00:00




>on the new disk, the system is* something after the last message
>the kernel prints and the first message the init scripts print.  My
>guess is that the kernel is unable to exec init, but I don't know that
>for sure -- maybe init is getting started, and it just hangs.

This is more often caused by /dev/console, or its corresponding entry
in /devices, not existing. It's not uncommon for devices to get
mangled by archive programs. Did the copy process get the right major
and minor numbers?

Peter

 
 
 

What Am I Doing Wrong (Copying Boot Partition)

Post by hume.spamfil.. » Tue, 25 May 1999 04:00:00


: the new partition(s), and do something like " cd / ; tar cvfp - | (cd /mnt ;
: tar xvfp - .) "

Tar... particularly Solaris tar... will mess up on some kinds of files, like
files with holes and the like.  Joerg Schilling's "star" might do a better
job, but I've never tried it.

ufsdump and ufsrestore should do the job best.  Its what they were meant for.
I've moved Solaris from one disk to another successfully using them.

--
Brandon Hume    - hume -> BOFH.Halifax.NS.Ca, http://WWW.BOFH.Halifax.NS.Ca/

 
 
 

What Am I Doing Wrong (Copying Boot Partition)

Post by Reinier Pos » Fri, 28 May 1999 04:00:00



>At a guess, I would suspect that 'cpio' does not handle devices
>special files, whereas ufsdump/ufsrestore do.

But, alas, cpio handles them, too.

--
Reinier

 
 
 

What Am I Doing Wrong (Copying Boot Partition)

Post by Peter Ben » Fri, 28 May 1999 04:00:00





>>At a guess, I would suspect that 'cpio' does not handle devices
>>special files, whereas ufsdump/ufsrestore do.

>But, alas, cpio handles them, too.

Depending on the arguments to cpio, it can mangle device major numbers.

Peter