Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/documentation/manual-pages/ru/man8/bsdlabel.8
18093 views
.\" Copyright (c) 1987, 1988, 1991, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Symmetric Computer Systems.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"	@(#)disklabel.8	8.2 (Berkeley) 4/19/94
.\" %FreeBSD: src/sbin/bsdlabel/bsdlabel.8,v 1.68 2006/12/29 16:28:38 ru Exp %
.\" $FreeBSDru: frdp/doc/ru_RU.KOI8-R/man/man8/bsdlabel.8,v 1.1 2006/12/29 16:33:54 ru Exp $
.\" $FreeBSD$
.\"
.Dd 29 ������� 2006
.Dt BSDLABEL 8
.Os
.Sh ��������
.Nm bsdlabel
.Nd ������ � ������ ����� BSD
.Sh ���������
.Nm
.Op Fl A
.Ar ���� | Fl f Ar ����
.Nm
.Fl w
.Op Fl \&An
.Op Fl B Op Fl b Ar ���������
.Op Fl m Ar ������
.Ar ���� | Fl f Ar ����
.Op Ar ���
.Nm
.Fl e
.Op Fl \&An
.Op Fl B Op Fl b Ar ���������
.Op Fl m Ar ������
.Ar ���� | Fl f Ar ����
.Nm
.Fl R
.Op Fl \&An
.Op Fl B Op Fl b Ar ���������
.Op Fl m Ar ������
.Op Fl f
.Ar ���� | Fl f Ar ����
.Ar ����_���������
.Sh ��������
�������
.Nm
�������������, ��������� ��� �������� �����
.Bx
� ������� ����� ��� � �����, ���������� ����� �������.
����� ����,
.Nm
����� ���������� �� ���� ��� ����������.
.Ss ��� ��������� ����������
��� �������� ���������� (�.�., ����� �����
.Fl f
�� ������������) �������
.Pa /dev/
����� ���� ������ �
.Nm
������� ��� �������������.
.Ss ����� �����
�����
.Fl A
�������� ��������� ������������ ������ �����
.Bx .
���� ����� �� �������, ��� ���� ������������� ����������������
����������� ����������.
.Pp
�����
.Fl f
�������
.Nm
� ���, ��� ������ ������� ����� ����� ����� ����������� � ������.
.Pp
�����
.Fl n
��������� ������
.Nm
����� ����� ���, ��� ���� ��� �� �������������, � ������ ������
���������� �� ���� ������ ���������� ���.
.Pp
�����
.Fl m Ar ������
����������
.Nm
������������ ������ ������ �����������.
� ��������� ����� ����������� ���������� ��������
.Cm i386 , amd64 , ia64 , pc98
�
.Cm alpha .
���� ��� ����� ����������, �������
.Nm
����� ������������ ������ ������, �� ������� ��� ��������.
.Ss ������ ����� �����
����� ����������� ��������� ����� �����, �����������
.Nm
���:
.Pp
.Nm
.Op Fl A
.Op Fl m Ar ������
.Ar ����
.Pp
��������
.Ar ����
��������� �� �������� ����, � ����� ���� ����� � ����
.Pa da0
���
.Pa /dev/da0 .
��� ������� ��������� ������� ������������ ��������.
.Ss ������ ����������� �����
����� �������� ����������� �����, �����������
.Nm
���:
.Pp
.Nm
.Fl w
.Op Fl \&An
.Op Fl m Ar ������
.Ar ����
.Op Ar ���
.Pp
���� ������
.Ar ���
�����, ����� ������������ ��������������� ������ �� �����
.Xr disktab 5 ,
� ��������� ������ ����� �������� ����������� �����.
.Ss �������������� ������������ ����� �����
����� ��������������� ������������ ����� �����, �����������
.Nm
���:
.Pp
.Nm
.Fl e
.Op Fl \&An
.Op Fl m Ar ������
.Ar ����
.Pp
��� ������� ��������� �������� ����� � ��������� �� ���������, �����
�������������� ��������� ţ �� ������������ � ���������� ţ �� ����.
.Ss �������������� ����� ����� �� �����
����� ������������ ����� ����� �� �����, �����������
.Nm
���:
.Pp
.Nm
.Fl R
.Op Fl \&An
.Op Fl m Ar ������
.Ar ���� ����_���������
.Pp
�������
.Nm
��������� ������������ ����� �����, ������� ���� ��������������
��������� � ���� � �������
.Tn ASCII .
���� ��������� ������ ����� ��� �� ������, ��� ������������
��� ������ ��� �������������� �����.
����������� ���������� �� �����
.Ql #
� ������������ �� ����� ������.
.Ss ��������� ����������
���� ������� �����
.Fl B ,
��� ���������� ����� c����� �� �����
.Pa /boot/boot
� ������� �� ����.
�����
.Fl b Ar ���������
��������� ������ ������ ���� � ����� ����������.
.Sh �����
.Bl -tag -width ".Pa /etc/disktab" -compact
.It Pa /boot/boot
����� ������������ ����������.
.It Pa /etc/disktab
���� �������� ������.
.El
.Sh ������ ������������ �����
�������
.Nm
����������
.Tn ASCII
������ ��� ������, �������������� � �������������� ����� �����.
������ ����� ���������:
.Bd -literal -offset 4n

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:    81920       16    4.2BSD     2048 16384  5128
  b:  1091994    81936      swap
  c:  1173930        0    unused        0     0         # "raw" part, don't edit
.Ed
.Pp
���� ������� �����
.Fl A ,
�� ������ ����� �����:
.Bd -literal -offset 4n
# /dev/da1c:
type: SCSI
disk: da0s1
label:
flags:
bytes/sector: 512
sectors/track: 51
tracks/cylinder: 19
sectors/cylinder: 969
cylinders: 1211
sectors/unit: 1173930
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:    81920       16    4.2BSD     1024  8192    16
  b:   160000    81936      swap
  c:  1173930        0    unused        0     0         # "raw" part, don't edit
.Ed
.Pp
������, ������������ � �������
.Ql #
�������� �������������.
.Pp
������� �������� ����� ����� �� 8 ��������.
������ ������ �������� ��������� ����������:
.Bl -tag -width indent
.It Ar #
������������� �������.
������������ ����� ��������� ������ � ��������� ��
.Ql a
��
.Ql h .
�� ������ң������, ������
.Ql c
�������������� ��� �������� ����� � �����.
.It Ar size
������ ������� � ��������,
.Cm K
(���������� - 1024),
.Cm M
(���������� - 1024*1024),
.Cm G
(���������� - 1024*1024*1024),
.Cm %
���������
.Em �����
�������� ���� �������� � ������������� ��������, ����� �������
.Ql c ) ,
���
.Cm *
(�ӣ ��������� �����, ����������
.Em �����
�������� � ������������� �������� � ��������, ��������� � ���������).
��� �������
.Ql c
������
.Cm *
���������� ���� ����.
��������� �������� ���������
.Cm K , M
�
.Cm G
� ������ ��������.
������ � ������� ������ ���� ������� ��� �������� ����� ����.
.Pp
������: 2097152, 1G, 1024M � 1048576K ��� ���������� ���� � ��� �� ������
(� �ޣ��� 512-�������� ��������).
.It Ar offset
�������� ������ ������� ������������ ������ �����
� ��������, ���
.Cm * ,
����� �������
.Nm
���� ��������� ���������� �������� (����� ����������� ������� ����
����, ������
.Ql c
������������).
��� �������
.Ql c ,
.Cm *
���������� ������� ��������.
������ ������ ������ ����� �������� 16, ������ ��� ������ 16 ��������
��������������� ��� ����������.
.It Ar fstype
��������� ���������� �������.
������ ���� ���������� ��� ������������ � ���������
������ ���� ��������.
��� �������� ������
.Tn UFS
� ��������
.Xr ccd 4
������������ ���
.Cm 4.2BSD .
��� ������ Vinum ������������ ���
.Cm vinum .
� ������ ����� ������������� ����� ���������
.Cm swap
�
.Cm unused .
�� ����������, ������
.Ql c
������������ ����� ���� ����� � ������ ����� ���
.Cm unused ,
���� �������
.Nm
�� ���������� �������������� ����� ����������.
�������
.Nm
����� ����� � ������ ����� ��������, ������� ��
������������ � ��������� �����.
(�������� �����������, ������������ �
.Dv FS_UNUSED ,
�
.In sys/disklabel.h
��� ����� ���������� ������������.)
.It Ar fsize
������ ��� �������� ������
.Cm 4.2BSD ,
������ ���������; ��.\&
.Xr newfs 8 .
.It Ar bsize
������ ��� �������� ������
.Cm 4.2BSD ,
������ �����; ��.\&
.Xr newfs 8 .
.It Ar bps/cpg
������ ��� �������� ������
.Cm 4.2BSD ,
���������� ��������� � ������; ��.\&
.Xr newfs 8 .
.El
.Sh �������
�������� ����� ������� ������ �����
.Pa da0 ,
���������� �����
.Pa /dev/da0s1 :
.Pp
.Dl "bsdlabel da0s1"
.Pp
�������� �����
.Pa da0s1 ,
���������� � ����, � ����
.Pa savedlabel .
� ���������� ���� ���� ����� ���� �����������
��� �������������� ����� � ������� �����
.Fl R :
.Pp
.Dl "bsdlabel da0s1 > savedlabel"
.Pp
������� ����� ��
.Pa da0s1 :
.Pp
.Dl "bsdlabel -w /dev/da0s1"
.Pp
��������� ����� �
.Pa da0s1 ,
��������������� ţ � �������� ��������� �� ����:
.Pp
.Dl "bsdlabel -e da0s1"
.Pp
��������� �����
.Pa da0s1 ,
��������������� ţ, � ��������, ����� �� ���� ����� ����� (� ��������).
��� �������
.Em ��
���������� ����� �����, �� � ����, �� �� ����:
.Pp
.Dl "bsdlabel -e -n da0s1"
.Pp
�������� ����������� ����� ��
.Pa da0s1 .
����� ������������ ��������������� ������� � ��������� ��������
������, �������������� ������ ��������,
.Nm Fl e :
.Pp
.Dl "bsdlabel -w da0s1"
.Pp
������������ ����� ����� ��
.Pa da0s1
�� ������ ����������, ���������� �� �����
.Pa savedlabel :
.Pp
.Dl "bsdlabel -R da0s1 savedlabel"
.Pp
��������, ����� �� ���� ����� ��
.Pa da0s1 ,
��������� ������������ �������� � �����
.Pa label_layout .
������� ��� ����������� ����������� ��������� ������������,
����������� ��� �������, ��� ������������� ����� ��������� ��
������� �� ������
.Cm %
�
.Cm * :
.Pp
.Dl "bsdlabel -R -n da0s1 label_layout"
.Pp
���������� ����� ��������� ��
.Pa da0s1 .
��� ���������� ��ң��� �� �����
.Pa /boot/boot :
.Pp
.Dl "bsdlabel -B da0s1"
.Pp
���������� ����� ����� � ���������.
��� ���������� ��ң��� �� �����
.Pa newboot
� ������� ������� ��������:
.Pp
.Dl "bsdlabel -w -B -b newboot /dev/da0s1"
.Pp
��������� ������� ��� ���������� ���������� �� �����,
������ �� ţ ����� ����� ����������� ���� � �������� DOS-��������,
��������� �� ������ ������ �� ���� ����.
���������������� ����� �� ���� ������,
����� ��������������� ţ.
�������
.Xr dd 1
�� �������� �������������, �� ����� �������������,
����� ���������
.Tn BIOS Ns �
��������� ���������� ����:
.Bd -literal -offset indent
dd if=/dev/zero of=/dev/da0 bs=512 count=32
fdisk -BI da0
dd if=/dev/zero of=/dev/da0s1 bs=512 count=32
bsdlabel -w -B da0s1
bsdlabel -e da0s1
.Ed
.Pp
������ ����� ����� � �������������� ����� ����� ������� ��������,
����� ���
.Cm % , M , G
�
.Cm * ,
������� ����� ���� ����������� � �������� ��������� ����� ���
.Dq Li "bsdlabel -R ad0s1 new_label_file" :
.Bd -literal -offset 4n
# /dev/ad0s1:

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   400M       16    4.2BSD     4096 16384    75 	# (Cyl.    0 - 812*)
  b:     1G        *      swap
  c:      *        *    unused
  e: 204800        *    4.2BSD
  f:     5g        *    4.2BSD
  g:      *        *    4.2BSD
.Ed
.Sh �����������
�������� ��������� ���� �� �������� ��������� ������ ������� �����
��� �������� ��� ��������, ���� ������ ������������ ��������.
.Sh �������������
��������� ��� �������� ���������� �������� ������������ ���
.Vt u_int32_t ,
.Bx
�����
���������� ���������� � 2^32-1 ��������.
������ ��� �������� 2 ��������� ��������� ������������.
����� �������� ������� ����� ���� �������� �� �����,
��������� ������ ������, ��������
.Xr gpt 8 .
.Pp
������ ������������ ������� ���������
.Bx
���������� ������� ������������ ������ �����,
������� � ����� ������������ ���� � ������.
.Sh ������ �����
.Xr ccd 4 ,
.Xr geom 4 ,
.Xr md 4 ,
.\" Xr bsdlabel 5 ,
.Xr disktab 5 ,
.Xr boot0cfg 8 ,
.Xr fdisk 8 ,
.Xr gpt 8 ,
.Xr newfs 8