ddddddddddddddddddddddd먼저..
target disk의 partition정보를 source disk와 맞춰줍니다.
1. format utility를 실행 시킨다.
[aculab:/export/home/aculab]# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <QUANTUM-ATLAS10K3_18_SCA-020W cyl 31014 alt 2 hd 2 sec 579>
/pci@1f,0/pci@1,1/scsi@2/sd@0,0
1. c0t3d0 <SEAGATE-ST318436LC-0004 cyl 14340 alt 2 hd 6 sec 417>
/pci@1f,0/pci@1,1/scsi@2/sd@3,0
2. 파티션 정보를 새롭게할 target disk를 선택한다.
Specify disk (enter its number): 1
selecting c0t3d0
[disk formatted]
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
3. partition table menu를 선택한다
format> p
PARTITION MENU:
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
4. modify menu를 선택한다.
partition> mo
5. partitioning base를 선택한다. (어떤걸 선택해도 상관없음)
Select partitioning base:
0. Current partition table (backup)
1. All Free Hog
Choose base (enter number) [0]? 1
Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 - 14339 17.11GB (14340/0/0) 35878680
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
6. 아래의 질문에 답한다 (yes)
Do you wish to continue creating a new partition
table based on above table[yes]? y
7. Free Hod Partition을 선택한다. (7번 partition을 선택한다) default 값은 6번
Free Hog partition[6]? 7
8. 필요에 따라 partitioning을 한다.
(단위는 쉽게 Giga Byte를 사용한다.)
7번 (/export/home)은 0번부터 6번을 지정하고 나머지 값을 자동으로 갖게된다.
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]: 1gb => /
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]: 1gb => swap
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]: 1gb => /var
Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]: 2gb => /usr
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 838 1.00GB (839/0/0) 2099178
1 swap wu 839 - 1677 1.00GB (839/0/0) 2099178
2 backup wu 0 - 14339 17.11GB (14340/0/0) 35878680
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 1678 - 2516 1.00GB (839/0/0) 2099178
6 usr wm 2517 - 4193 2.00GB (1677/0/0) 4195854
7 unassigned wm 4194 - 14339 12.10GB (10146/0/0) 25385292
9. 지정값을 확인하고 맞으면 yes를 선택한다.
Okay to make this the current partition table[yes]? y
10. table name을 설정해 준다.
Enter table name (remember quotes): backup
11. disk를 label 할 준비가 되어 있으면 yes를 선택한다.
Ready to label disk, continue? y
12. print menu를 사용하여 확인해 본다
partition> p
Current partition table (backup):
Total disk cylinders available: 14340 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 838 1.00GB (839/0/0) 2099178
1 usr wm 839 - 1677 1.00GB (839/0/0) 2099178
2 backup wm 0 - 14339 17.11GB (14340/0/0) 35878680
3 var wm 0 0 (0/0/0) 0
4 swap wu 0 0 (0/0/0) 0
5 unassigned wm 1678 - 2516 1.00GB (839/0/0) 2099178
6 usr wm 2517 - 4193 2.00GB (1677/0/0) 4195854
7 home wm 4194 - 14339 12.10GB (10146/0/0) 25385292
partition>
13. 위와같이 "Tag"부분이 엉망인것을 볼 수 있다, Tag를 설정 하려면 아래와 같은
partition menu에서 Tag를 수정할 slice를 선택하여 준다.
PARTITION MENU:
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
ex)
partition> 5 => 5번 slice 선택
Part Tag Flag Cylinders Size Blocks
5 unassigned wm 1678 - 2516 1.00GB (839/0/0) 2099178
Enter partition id tag[unassigned]: var => tag 수정
Enter partition permission flags[wm]: => permission은 default값을 사용
Enter new starting cyl[1678]: => starting cyl는 전 partition의 끝 cyl값보다 1 많게 하여 쓴다
Enter partition size[2099178b, 839c, 1024.99mb, 1.00gb]: => partition size는 default값을 사용
14. 설정이 변경 되었는지 확인한다.
partition> p
Current partition table (unnamed):
Total disk cylinders available: 14340 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 838 1.00GB (839/0/0) 2099178
1 usr wm 839 - 1677 1.00GB (839/0/0) 2099178
2 backup wm 0 - 14339 17.11GB (14340/0/0) 35878680
3 var wm 0 0 (0/0/0) 0
4 swap wu 0 0 (0/0/0) 0
5 var wm 1678 - 2516 1.00GB (839/0/0) 2099178
6 usr wm 2517 - 4193 2.00GB (1677/0/0) 4195854
7 home wm 4194 - 14339 12.10GB (10146/0/0) 25385292
15. label menu를 선택하여 설정을 저장한다.
partition> la
Ready to label disk, continue? y
16. partition utility에서 빠져 나온다
partition> q
17. newfs utility를 사용하여 target disk에 새로운 file system을 생성한다.
(각 slice별로 해줘야 함)
[aculab:/export/home/aculab]# newfs /dev/dsk/c0t3d0s5
newfs: construct a new file system /dev/rdsk/c0t3d0s5: (y/n)? y
/dev/rdsk/c0t3d0s5: 839 트랙, 6 섹터의 2099178 실린더에 있는 -4262695 섹터
1025.0MB (27 실린더 그룹) (32 c/g, 39.09MB/g, 9728 i/g)
수퍼 블록 백업 (fsck -F ufs -o b=#의 경우):
32, 80528, 161024, 241520, 322016, 402512, 483008, 563504, 640544, 721040,
801536, 882032, 962528, 1043024, 1123520, 1204016, 1281056, 1361552, 1442048,
1522544, 1603040, 1683536, 1764032, 1844528, 1921568, 2002064, 2082560,
[aculab:/export/home/aculab]#
18. ufsdump를 실행시킬 partition을 mount 시킨다.
(mount point는 아무거나 사용 가능, 여기서는 /mnt를 사용한 예를 들고 있다)
#[aculab:/export/home/aculab]# mount /dev/dsk/c0t1d0s0 /mnt => target disk의 5번째 slice를 /mnt에 mount 시킴
#[aculab:/export/home/aculab]# ufsdump -0f - /dev/rdsk/c0t0d0s0 | ( cd /mnt; ufsrestore xf - )
** 위에서 /dev/rdsk/c0t0d0s0는 source disk의 partition이고
/mnt 로 표현된 곳은 target disk가 mount 되어있는 mount point이다.
※ partition dump가 끝난 후 나오는 두개의 질문에는 "NO"로 대답한다.
set owner/mode for '.'? [yn] set owner/mode for '.'? [yn] n
Directories already exist, set modes anyway? [yn] n
19. 위와같이 각 partition별로 ufs dump 를 실행시킨다.
20. boot 블록을 카피 한다.
#[aculab:/export/home/aculab]# /usr/sbin/installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0 <- sparc
#[aculab:/export/home/aculab]# /usr/sbin/installboot /usr/platform/i86pc/lib/fs/ufs/bootblk /usr/platform/i86pc/lib/fs/ufs/pboot /dev/rdsk/c1d0s0 <- intel(x86)
** space에 주의!!! 명령어 마지막 부분의 /dev/rdsk/c0t1d0s0는 target disk의 root 영역이다.
이걸 안해주면 disk 부팅이 안됨!!!
21. 마지막으로 target disk의 root영역을 다시한번 mount 시켜 /etc/vfstab 정보를 바꾸어 준다.
[aculab:/etc]# vi vfstab
"vfstab" 12 행, 477 문자
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /var ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes -
swap - /tmp tmpfs - yes -
이곳에서 모든 target 번호를 0에서 1로 수정해준 후, 저장하고 빠져 나온다.
target disk의 partition정보를 source disk와 맞춰줍니다.
1. format utility를 실행 시킨다.
[aculab:/export/home/aculab]# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <QUANTUM-ATLAS10K3_18_SCA-020W cyl 31014 alt 2 hd 2 sec 579>
/pci@1f,0/pci@1,1/scsi@2/sd@0,0
1. c0t3d0 <SEAGATE-ST318436LC-0004 cyl 14340 alt 2 hd 6 sec 417>
/pci@1f,0/pci@1,1/scsi@2/sd@3,0
2. 파티션 정보를 새롭게할 target disk를 선택한다.
Specify disk (enter its number): 1
selecting c0t3d0
[disk formatted]
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
3. partition table menu를 선택한다
format> p
PARTITION MENU:
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
4. modify menu를 선택한다.
partition> mo
5. partitioning base를 선택한다. (어떤걸 선택해도 상관없음)
Select partitioning base:
0. Current partition table (backup)
1. All Free Hog
Choose base (enter number) [0]? 1
Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 - 14339 17.11GB (14340/0/0) 35878680
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
6. 아래의 질문에 답한다 (yes)
Do you wish to continue creating a new partition
table based on above table[yes]? y
7. Free Hod Partition을 선택한다. (7번 partition을 선택한다) default 값은 6번
Free Hog partition[6]? 7
8. 필요에 따라 partitioning을 한다.
(단위는 쉽게 Giga Byte를 사용한다.)
7번 (/export/home)은 0번부터 6번을 지정하고 나머지 값을 자동으로 갖게된다.
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]: 1gb => /
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]: 1gb => swap
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]: 1gb => /var
Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]: 2gb => /usr
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 838 1.00GB (839/0/0) 2099178
1 swap wu 839 - 1677 1.00GB (839/0/0) 2099178
2 backup wu 0 - 14339 17.11GB (14340/0/0) 35878680
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 1678 - 2516 1.00GB (839/0/0) 2099178
6 usr wm 2517 - 4193 2.00GB (1677/0/0) 4195854
7 unassigned wm 4194 - 14339 12.10GB (10146/0/0) 25385292
9. 지정값을 확인하고 맞으면 yes를 선택한다.
Okay to make this the current partition table[yes]? y
10. table name을 설정해 준다.
Enter table name (remember quotes): backup
11. disk를 label 할 준비가 되어 있으면 yes를 선택한다.
Ready to label disk, continue? y
12. print menu를 사용하여 확인해 본다
partition> p
Current partition table (backup):
Total disk cylinders available: 14340 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 838 1.00GB (839/0/0) 2099178
1 usr wm 839 - 1677 1.00GB (839/0/0) 2099178
2 backup wm 0 - 14339 17.11GB (14340/0/0) 35878680
3 var wm 0 0 (0/0/0) 0
4 swap wu 0 0 (0/0/0) 0
5 unassigned wm 1678 - 2516 1.00GB (839/0/0) 2099178
6 usr wm 2517 - 4193 2.00GB (1677/0/0) 4195854
7 home wm 4194 - 14339 12.10GB (10146/0/0) 25385292
partition>
13. 위와같이 "Tag"부분이 엉망인것을 볼 수 있다, Tag를 설정 하려면 아래와 같은
partition menu에서 Tag를 수정할 slice를 선택하여 준다.
PARTITION MENU:
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
ex)
partition> 5 => 5번 slice 선택
Part Tag Flag Cylinders Size Blocks
5 unassigned wm 1678 - 2516 1.00GB (839/0/0) 2099178
Enter partition id tag[unassigned]: var => tag 수정
Enter partition permission flags[wm]: => permission은 default값을 사용
Enter new starting cyl[1678]: => starting cyl는 전 partition의 끝 cyl값보다 1 많게 하여 쓴다
Enter partition size[2099178b, 839c, 1024.99mb, 1.00gb]: => partition size는 default값을 사용
14. 설정이 변경 되었는지 확인한다.
partition> p
Current partition table (unnamed):
Total disk cylinders available: 14340 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 838 1.00GB (839/0/0) 2099178
1 usr wm 839 - 1677 1.00GB (839/0/0) 2099178
2 backup wm 0 - 14339 17.11GB (14340/0/0) 35878680
3 var wm 0 0 (0/0/0) 0
4 swap wu 0 0 (0/0/0) 0
5 var wm 1678 - 2516 1.00GB (839/0/0) 2099178
6 usr wm 2517 - 4193 2.00GB (1677/0/0) 4195854
7 home wm 4194 - 14339 12.10GB (10146/0/0) 25385292
15. label menu를 선택하여 설정을 저장한다.
partition> la
Ready to label disk, continue? y
16. partition utility에서 빠져 나온다
partition> q
17. newfs utility를 사용하여 target disk에 새로운 file system을 생성한다.
(각 slice별로 해줘야 함)
[aculab:/export/home/aculab]# newfs /dev/dsk/c0t3d0s5
newfs: construct a new file system /dev/rdsk/c0t3d0s5: (y/n)? y
/dev/rdsk/c0t3d0s5: 839 트랙, 6 섹터의 2099178 실린더에 있는 -4262695 섹터
1025.0MB (27 실린더 그룹) (32 c/g, 39.09MB/g, 9728 i/g)
수퍼 블록 백업 (fsck -F ufs -o b=#의 경우):
32, 80528, 161024, 241520, 322016, 402512, 483008, 563504, 640544, 721040,
801536, 882032, 962528, 1043024, 1123520, 1204016, 1281056, 1361552, 1442048,
1522544, 1603040, 1683536, 1764032, 1844528, 1921568, 2002064, 2082560,
[aculab:/export/home/aculab]#
18. ufsdump를 실행시킬 partition을 mount 시킨다.
(mount point는 아무거나 사용 가능, 여기서는 /mnt를 사용한 예를 들고 있다)
#[aculab:/export/home/aculab]# mount /dev/dsk/c0t1d0s0 /mnt => target disk의 5번째 slice를 /mnt에 mount 시킴
#[aculab:/export/home/aculab]# ufsdump -0f - /dev/rdsk/c0t0d0s0 | ( cd /mnt; ufsrestore xf - )
** 위에서 /dev/rdsk/c0t0d0s0는 source disk의 partition이고
/mnt 로 표현된 곳은 target disk가 mount 되어있는 mount point이다.
※ partition dump가 끝난 후 나오는 두개의 질문에는 "NO"로 대답한다.
set owner/mode for '.'? [yn] set owner/mode for '.'? [yn] n
Directories already exist, set modes anyway? [yn] n
19. 위와같이 각 partition별로 ufs dump 를 실행시킨다.
20. boot 블록을 카피 한다.
#[aculab:/export/home/aculab]# /usr/sbin/installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0 <- sparc
#[aculab:/export/home/aculab]# /usr/sbin/installboot /usr/platform/i86pc/lib/fs/ufs/bootblk /usr/platform/i86pc/lib/fs/ufs/pboot /dev/rdsk/c1d0s0 <- intel(x86)
** space에 주의!!! 명령어 마지막 부분의 /dev/rdsk/c0t1d0s0는 target disk의 root 영역이다.
이걸 안해주면 disk 부팅이 안됨!!!
21. 마지막으로 target disk의 root영역을 다시한번 mount 시켜 /etc/vfstab 정보를 바꾸어 준다.
[aculab:/etc]# vi vfstab
"vfstab" 12 행, 477 문자
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /var ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes -
swap - /tmp tmpfs - yes -
이곳에서 모든 target 번호를 0에서 1로 수정해준 후, 저장하고 빠져 나온다.
'9. 도서관 > __사. Network' 카테고리의 다른 글
ufsdump dd (0) | 2008.10.14 |
---|---|
hostname 변경 (0) | 2008.10.14 |
voip 전망 (0) | 2008.10.10 |
usb ubuntu install (0) | 2008.10.08 |
Voip soft Phone Download (0) | 2008.09.27 |
댓글