How to make a bootable disk?

The second disk that I'm trying to make bootable is to hold another version of Solaris (9).

I've created the partitions with format and labeled the disk - created the filesystems with newfs - created and mounted the directories.

...but I think I've missed something out like using fdisk to create a bootable partition (8 I think?). I'm not sure how to do this; do I need to create partition 8 with format first? What fdisk command do I need for creating the boot slice?

Thanks in advance.

What architecture?

# isainfo -kv
64-bit sparcv9 kernel modules

# uname -a
SunOS icarus 5.8 Generic_117350-27 sun4u sparc SUNW,Sun-Fire-V240

Not sure what type of disks they are but here's the partition table:

Will doing an fdisk to toggle the bootability mess up my partitions?

I get this when I try the fdisk:

# fdisk /dev/dsk/c0t2d0s0
fdisk: Cannot stat device /dev/dsk/c0t2d0s0.

Any ideas will be gratefully appreciated :slight_smile:

with solaris on sparc you don't need fdisk to set a boot flag on a partition...

use "installboot" to install a bootblock on a slice:

# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t2d0s0

for more information see "man installboot"

regards pressy

Hey pressy,

Thanks for the reply. I've just tried the installboot command again (I've previously wiped the drive - this is about my third attempt :wink: ) but I got the following error:

# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t2d0s0
/dev/rdsk/c0t2d0s0: Not a character device

Have I screwed something up?

Cheers, p.

Hold the phones, I've just spotted one of my mistakes: my disk is on controller 1 (c1t2d0s0)....

The installboot command has now worked correctly.

I'm now left with an empty disk that's been partitioned ... I've now got to restore Solaris 9 from tape, will this write over the installboot area?

My previous restore was interactive and I just added all the directories and then extracted them, is this correct?

Many thanks, p.

it should not overwrite anything, but for safety reason, you can use the command again, after everything is restored...

about the restore, that depends on which backup method or software you used... you just need to know on which partition the backup-data has to go.

gP

Hi pressy,

The tape was created with ufsdump and looks like a normal directory structure from / when you ls it.

I've just gone through the list of files and directories at this level and added them to the restore (ufsrestore if /dev/rmt/0) and then extracted them.

I had previously created the /usr, /opt & /var directories but I assume the restore will overwrite them? Will this confuse my mount points? Will I have to umount them and re-mount?

Thanks for your help so far :slight_smile:

Just tried the boot again with no success.

I tried the probe-scsi command to make sure that I was trying to boot from the right partition but it complained and error'd until I restarted the box.

Anyway, I tried to the following command:

OK> boot disk2:0

Then a few minutes later it compained heavily. I couldn't catch all the information because I was on the console but it said stuff like:

"cannot assemble drivers for root"

"trying to mount vfs"

"kernel panic" - followed by lots of numbers...

I'm surprised that it mentioned vfs because I thought I was using ufs...

:frowning:

It seems that you have tried to restore a version of solaris 9 which is not supported on your hardware, you need a minimum of 12/03.

Hi Reborg,

The restore is actually the OS that the hardware came with - for some reason it was decided to backup this and install version 8.

We did find that the vfstab file was wrong but the disk is still unbootable - I think it might have something to do with the filesystem layout being different to the original installation - everything was under the root but now we have separate mount points for the /usr, /var, /opt etc directories...

Would the difference in filesystem layout make the disk unbootable?

Many thanks,

p.

as far as i know you cannot use /etc as an own partition... the kernel initialisation and the boot process need many files from there like /etc/system, the vfstab, rc/init scripts...

gP

Sorry my last post wasn't clear the etc I mentioned was the abreviation of excetera and not the UNIX directory :slight_smile:

what directories did you exclude and did you include them into your /etc/vfstab with the correct options like "mount at boot"?...

i could also think about some missing links ... not sure if there are many relations, depends on your excluded directories....

post your vfstab...

gP

Hi pressy,

Here's our vfstab:

c1t0 is the disk that's currently 'live' and contains Solaris 8. We're attempting to build a dual OS system.

The restored version was originally on the other disk - would this cause a problem now? Does the restored kernel need to be rebuilt because the hardware layout is different?

Many thanks, p

what do you exactly mean with a different hardware layout? you said that it is the same hardware, didn't you?

anyhow, you can force a kernel update/reconfiguration with the "-r" option at boot time
"boot disk2:0 -r"

have you tried to restore your backup like it was before, everything in one slice? perhaps your backup is corrupt. normally, if it is the same hw-platform, you just need to restore the file-systems, edit your /etc/vfstab, install a bootblock and everything works again.... do you have any /etc/system entries that point to the old disk, like "rootdev:/dev...."

i would try to restore the backup in one slice, to see if it would work, after that you can go step by step to see what's not working...

gP

Hi Pressy,

I think I'll try this option "boot disk2:0 -r"

Yes the HW is the same but I meant that it will look different to the OS because it's now on the other disk... Make sense?

I shall check the /etc/system entries now... nope, nothing in there mentioning disks or anything that sounds like it could be related...

Thanks again, your support is much appreciated :slight_smile: