how to reformat a hard disk

hi

i need help on how to reformat a hard disk. what should i do since i don't have any bootable disk. i'm using solaris 1 & 2 and also need to make a backup copy of the current hard disk. appreciate all the help i can get...

Sorry but I am not sure if I understand this post really. (maybe its my bad English;))

If you want to backup your system then use the ufsdump command and save this file on an other system or tape.

Example of the man page to write on a tape the filesystem at the c0t3d0s0 slice:
ufsdump 0cfu /dev/rmt/0 /dev/rdsk/c0t3d0s0

Your first question regarding the boot device:
Insert the Solaris install dvd or cd then the system label the disks (If there is a physical disk mounted) automatically!

Best regards
joerg

what is solaris 1 & 2?

hi joerg

your english is great. my problem is that i have very limited skills when it comes to unix that's why my question may be hard to comprehend.
i want to create a back up of my hard disk but the hard disk that i'll be using is already loaded with files as it is the back up of another system and i want to create a dedicated backup for my system. i also have limited resources since the hard disk i'm using is very hard to find here in our place. the hard disk i'm using currently is from a sparc 20 computer.
if you can give me the best alternatives to solve my problem, i would be more than grateful... by the way, i don't have a deep understanding about the c0t3d0s0 you're mentioning... all i know about this is the hard disk present but i'm not really familiiar about what the letters & numbers stand for. if you can also explain it for me, i'll be really grateful. i come from the philippines by the way...
for the meantime, i'll try reading about ufsdump...
Thanks and God Bless!!!

Hi,
I need more Information to support you.

First of all your hardware is a sparc20 is this right?

If it is a sparc20 you have two slots for disks.
So the question is you have only one or two disks inside the box?

To test this behavior please use the
format
command. Please post this output or/and the
ls -ltr /dev/dsk
output.

To determine how much diskspace is available send the output of
df -hk # If your Solaris Version is less then Solaris 9 then try it without the h option, because this option is first available in solaris 9.

One important thing inside this forum is to post the uname -a output. It is to see witch Version of solaris you use and the Hardware platform is shown.

Best regards
joerg

hi joerg

My hardware is a sparc 20 computer. I have 2 hard disk slots and I also have 2 hard disks inside b'coz I managed to ask for one from my co-worker. The good hard disk that I want to duplicate is in slot 0 when I invoke the format command. The 2nd hard disk that I want to make my back up is in slot 1. By the way, I already tried to mirror the disk but failed. I don't know where I went wrong with the process that's why I'm asking if there are still available options to solve my problem. I'll try what you advised and give you feedback asap so that I can give you a better information about my situation... Thanks and God Bless Always!!!

hi joerg,

I already tried the inputs you gave me and here are the scripts...

# format

Searching for disks...done

AVAILABLE DISK SELECTIONS:
0. c0t1d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number):

------------------------------

# ls -ltr /dev/dsk
total 32
lrwxrwxrwx 1 root root 84 Aug 9 1995 c0t3d0s0 -> ../../devicesa
lrwxrwxrwx 1 root root 84 Aug 9 1995 c0t3d0s7 -> ../../devicesh
lrwxrwxrwx 1 root root 84 Aug 9 1995 c0t3d0s6 -> ../../devicesg
lrwxrwxrwx 1 root root 84 Aug 9 1995 c0t3d0s5 -> ../../devicesf
lrwxrwxrwx 1 root root 84 Aug 9 1995 c0t3d0s4 -> ../../devicese
lrwxrwxrwx 1 root root 84 Aug 9 1995 c0t3d0s3 -> ../../devicesd
lrwxrwxrwx 1 root root 84 Aug 9 1995 c0t3d0s2 -> ../../devicesc
lrwxrwxrwx 1 root root 84 Aug 9 1995 c0t3d0s1 -> ../../devicesb
lrwxrwxrwx 1 root root 84 Feb 2 2005 c0t1d0s7 -> ../../devicesh
lrwxrwxrwx 1 root root 84 Feb 2 2005 c0t1d0s6 -> ../../devicesg
lrwxrwxrwx 1 root root 84 Feb 2 2005 c0t1d0s0 -> ../../devicesa
lrwxrwxrwx 1 root root 84 Feb 2 2005 c0t1d0s5 -> ../../devicesf
lrwxrwxrwx 1 root root 84 Feb 2 2005 c0t1d0s4 -> ../../devicese
lrwxrwxrwx 1 root root 84 Feb 2 2005 c0t1d0s3 -> ../../devicesd
lrwxrwxrwx 1 root root 84 Feb 2 2005 c0t1d0s2 -> ../../devicesc
lrwxrwxrwx 1 root root 84 Feb 2 2005 c0t1d0s1 -> ../../devicesb

------------------------------------

# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t3d0s0 47975 41567 1618 96% /
/dev/dsk/c0t3d0s6 211607 182009 8438 96% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
swap 206024 656 205368 0% /var/tmp
/dev/dsk/c0t3d0s5 96455 59527 27288 69% /export
/dev/dsk/c0t3d0s7 607086 288790 257596 53% /w.local
pylon:/export/home/vega
16068155 9052213 6855261 57% /vega
pylon:/export/home/home1
16068155 9052213 6855261 57% /home

-------------------------------------

# uname -a
SunOS robintc1 5.4 ksam.on494-patch.12/22/94 sun4m sparc

another confusion that I have is that the 2nd disk I put into the sparc computer is labeled to have 2.1G capacity but when I invoke the format command, it only has 1.05G of memory. Do you have any ideas about this?

Just tell me if you need further info about my problem 'coz I really need your input/s...

Thanks and God Bless!!!

It may be a count of 512 byte sectors, not a count of kilobytes.

Hi,
I hope that I can help you because there are one or two confusing thinks.:wink:

To make a note:
c0t3d0 --> This is your actual root disk.
c0t1d0 --> Your backup disk.

So fare I understand you want to backup the information of the root disk.

First of all you have four used partition on the root disk.
/root on slice 0
/usr on slice 6
/export on slice 5
/w.local on slice 7

By the way you forgot the swap -l command so I am not sure if the swap area is on 1,3 or slice 4.
Never mind! Because no one dump a swap device:D!

First step:
Partition of the backup disk:
format
0 # just type and return
p # just type and return
p # just type and return

If there is no data on this disk we have to partition the disk.
Now you can see something like this:

Part Tag Flag Cylinders Size Blocks
0 swap wu 0 - 550 1.95GB (551/0/0) 4099440
1 root wm 551 - 54520 191.47GB (53970/0/0) 401536800
2 backup wm 0 - 65532 232.49GB (65533/0/0) 487565520
3 var wm 54521 - 60026 19.53GB (5506/0/0) 40964640
4 unassigned wm 60027 - 65532 19.53GB (5506/0/0) 40964640
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0

With h you can get the help:

partition> h
Expecting one of the following: (abbreviations ok):
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit

Because you have limited disk space on the backup disk I I would say use one partition for the whole disk.
So first delete all partition like you can see in this example
!!!! But not the second partition !!!!!

So do this for all slices except the slice 2!
partition> 2 # this is for the slice 2
Part Tag Flag Cylinders Size Blocks
4 unassigned wm 60027 - 65532 19.53GB (5506/0/0) 40964640

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[60027]:0
Enter partition size[40964640b, 5506c, 65532e, 20002.27mb, 19.53gb]:0

Now create on slice 0 one partition with the whole free disk space.
It is the same procedure as delete partition but now you must insert a value for the size.

then label the disk with the label command.

then exit the format utility.
q
q

Creating of a file system:
newfs /dev/rdsk/c0t1d0s0
Mount it on the filesystem.
mount /dev/dsk/c0t1d0s0 /mnt

and use the ufsdump command to backup all the mentioned file systems at the root disk. to the /mnt folder.

Example for the /var filesystem.
ufsdump -f /mnt/dump_var /var

After you backup all the slices of the root disk you have a complete backup of the old system on the backup disk
So feel free to delete modify or new install the root disk!

Best regards and post questions if there are some!:wink:

joerg

Hi Joerg

Thanks for the inputs you gave me. However, I still have some questions/favors to ask of you...

1> What are the file systems from the root disk that I need to back up using the ufsdump command?
2> I also tried to create a back up using "mirror", however, after doing the mirror process, I got this message:
/usr/platform//lib/fs/ufs/bootblk : file not found
and the when I try to boot form the new disk, it won't boot...

I'm very grateful for the inputs you gave me and I'm exploring these things and I'm trying my best to learn/catch-up. So please bear with me if I still have confusions. Thanks and God Bless!!!

For the complete backup you need the following slices:
/root on slice 0
/usr on slice 6
/export on slice 5
/w.local on slice 7

If you have mount the second disk at /mnt you can use this:
ufsdump -f /mnt/dump_root /root
ufsdump -f /mnt/dump_usr /usr
ufsdump -f /mnt/dump_export /export
ufsdump -f /mnt/dump_w.local /w.local

Now on the second disk are four new files :
cd /mnt
ls
dump_root
dump_usr
dump_export
dump_w.local

The reason that the mirrored disk can not boot is the not available boot sector at the second disk.
This command to create a boot block.
installboot /usr/platform/sun4m/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0

Best regards
joerg

Hi Joerg,

I still have a problem...
I tried this commandinstallboot /usr/platform/sun4m/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
and rebooted disk 1 but to no avail...
This is the message that I got...
bootblk : can't find the boot program.

What do you think I should do next with my problem?
Thank you very for all the inputs you gave me and just keep them coming.
Thanks and God Bless!!!

Hi,
you are sure that you are boot from the right disk?
Please send the complete Output From the OK Prompt level till the error messages.
You are using the right devalias?

If you want to mirror the complete root disk then please follow the complete description.
BigAdmin - Submitted Tech Tip: Boot Disk Mirroring Using Solaris Volume Manager Software

Best regards joerg

hi joerg,

I still can't get it to work right. I have been studying about UNIX lately to finds ways/alternative options where I can solve my problem and found dd an interesting topic...
The thing that I'm trying to do now is to create a clone of my working disk using this command...
Can you show me how to do it if for example I just want to clone the important slices from my working disk? Will this work?
Your response is surely appreciated.
Thanks and God Bless!!!

Hi.
please search for the forum sides to find the information you are looking for.

You can use this link as first step:

Best regards
joerg