Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ufsdumping '/' to new disk - new boot disk

Status
Not open for further replies.

thomgreen

IS-IT--Management
Sep 4, 2002
56
US
I work mostly on the db side but have been tasked with restructuring the setup of hardrives in our SUN E450. I need to move '/' root to a new disk/slice. I booted cdrom mount / and another slice, then used a ufsdump/ufsrestore command. I then used the installboot command. I tried to boot up using this disk and recieved an error.

Do I not have to run some type of boot sector command as well for this drive to be bootable. Please advise.
 
The following error:
The file just loaded does not appear to be executable
Boot device:disk File and args
Boot load failed
The file just loaded does not appear to be executable

Is there not another step to prep a boot drive. Something about updating the Master Boot Record (MBR)? Does this sound right?
 
Solaris is very touch about changing the Boot Slice.
Boot up in single user mode BOOT -S. This will give you a chance to fix anything that should not be there.
You need to boot from your install CD. Insert the Solaris Software CD in your CDROM drive. If your CDROM drive/bios isn't bootable, first insert the "Device Configuration Assistant" (DCA) diskette. At the "Boot Solaris" menu, choose "CD."

At the "Type of Installation: Interactive or Jumpstart" menu, type "b -s"

Or, after the video configuration, network, time and date you'll notice one of the menu's has a button: [Exit] Select Exit and, when it asks you again "do you want to exit?," just say yes.

Once you're at the UNIX root prompt #, you can mount the boot drive with "mount /dev/dsk/c0t0d0s0 /mnt"" and view anything wrong with the boot drive (omit the "t0" for ATAPI).

1. Boot from CD-ROM and get the root prompt, #,

2. Determine the controller, disk number, and partition. The boot disk is /dev/rdsk/c?t?d?p? where ? is the controller #, target ID, and disk #, and partition #. Omit "t?" for ATAPI E.g., /dev/rdsk/c0d0p0

3. Verify it's the correct device correct with prtvtoc for the drive: This is VERY important; if it's wrong, you you may hose another partition: prtvtoc /dev/rdsk/c0t0d0p0 (omit "t0" for ATAPI, always use p0, which means the "entire drive"). The prtvtoc prints out the map for the Solaris partition on the hard drive, if found. The partitions shown on the output are actually "slices" within the Solaris partition.

4. Restore the boot block as follows:

/sbin/fdisk -b /usr/lib/fs/ufs/mboot (raw disk dev)

E.g., for SCSI it might be:
/sbin/fdisk -b /usr/lib/fs/ufs/mboot /dev/rdsk/c0t0d0p0

(omit "t0" for ATAPI)

5. Finally, remove your CDROM and diskette media and type "reboot". The Solaris Multiple Device Boot Menu should appear after rebooting. If not, you can always to an upgrade (re-)install.

Note: This procedure does NOT make your Solaris partition active again (sometimes needed after installing another operating system, such as Windows, on the same disk), it just writes to your bootblock IN your Solaris partition. To learn more about the Solaris boot process, read the boot(1M) man page.
Well, actually, the "Boot Assistant". The interface is similar, but not identical, to SPARC Solaris' OpenBoot 'boot' command. The main differences I notice are:


It's "b -r", not "boot -r", if you want to force reconfiguration. Why would you want to do that? Well sometimes, if your devices have changed a LITTLE, you might want to do this. You can also invoke it with a "touch /reconfigure" as root before rebooting.

You don't have nice device aliases like you do with Sparc hardware. That being said, if you do nothing, it should autoboot into the actual OS in a few seconds. Or you can type something quickly within 5 seconds, and force a "reconfiguration boot", as mentioned earlier.

The "Driver Assistant" or whatever, really looks for major changes, like adding or removing a card. However, if, say, you add another disk drive, you'll probably want to just do "b -r". Note that the Device Assistant will itself trigger a "b -r", after it has autodetected hardware changes.



 
At the OK prompt type HELP there is whole size of tools there to help you.
 
thomgreen,

Here is the procedure how to move your root partition to new disk (or slice), I'll assume the old root disk is on /dev/dsk/c0t0d0s0 nad new root disk is on /dev/dsk/c0t1d0s0:

1. boot up old root disk as signal user mode.
2. newfs /dev/rdsk/c0t1d0s0
3. mount /dev/dsk/c0t1d0s0 /mnt
4. ufsdump 0f - / | (cd /mnt; ufsrestore xf - )
4.1 answer "1" for the backup volume.
4.2 answer "no" and "no" for two questions.
5. installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
6. vi /mnt/etc/vfstab to modify the new filesystems location
7. shutdown old root disk and modify your boot-device

It's very easy and straight forward procedures, enjoy.


Cheers,

achech
 
Thanks for the help. it is working as per your instructions. Actually the disk had issues, your confirming the process convinced me to look at the hardware.

Your help is much appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top