Вы находитесь на странице: 1из 39

,

.
Linux .
Windows DOS
format


:
sudo su

,

ls -l /dev/sd*
Linux 4

sda
sdb

()
(8 , )
()
(
16 : 0-15, 16-31, 32-47 )


(
)
fdisk -l


,
.
mkfs. Tab
c ext2
mkfs.ext2 /dev/sdb
,
,


..


()
sdb /mnt
mount /dev/sdb /mnt/



mount
:
/dev/sdb on /mnt/ type ext2 (rw)



cd /mnt/
ls l

lost+found 16

/etc /mnt
cp -r /etc/ /mnt/

ls

:
etc lost+found



,
,
cd

umount /mnt

umount /dev/sdb



mkdir /tmp/mnt

mount /dev/sdb /tmp/mnt/

cd /tmp/mnt/

ls
:
etc lost+found



swap-
Linux
Linux extended3
- NTFS Linux
Windows

sdb
umount /dev/sdb

fdisk /dev/sdb
:

fdisk
m

1-

n
( swap)
p

1

1 Enter
(, , ):
+512M
( )

p

/dev/sdb1
1
66
530113+
83

Linux

,
.
fdisk - q


( Linux)
:
n
:
p
:
2
:
67 Enter
:
130

p
:
/dev/sdb2
67
130
514080
83

Linux


4 ()

Linux 15
,

(extended)




4

5


( Linux Windows)
:
n
:
e
:
3
:
131 Enter
:
261 Enter

p
:
/dev/sdb3
131
261
1052257+



:
n
:
l
:
131 Enter
:
261 Enter

p
:
/dev/sdb5
131
261
1052226
83

Linux


t
( type)
:
1
:
82
( swap-)
:
82 (Linux / Solaris)

p

/dev/sdb1
1
66
530113+
82
Linux / So

5
(Linux Windows)
t
:
5
:
l
:

( )

. 7 HPFS/NTFS

:
7

p

/dev/sdb5 131 261 1052226
7
HPFS/NTFS



w

!
,
(backup)

:
fdisk -l



:
free
:
total used free shared buffers cashed
swap: 492540



,

,



Linux


:
mkswap /dev/sdb1

Setting up swapspace version 1, size=530108 KiB
,

swapon /dev/sdb1

free
:
Swap: 100648



mkfs.ext3 /dev/sdb2
:

.

NTFS

mkfs.ntfs -f /dev/sdb5
-f fast


badblocks -v /dev/sdb2
,
.
mkfs,




Linux
Windows
mkdir /mnt/linux_disk
mkdir /mnt/windows_disk

mount /dev/sdb2 /mnt/linux_disk
mount /dev/sdb5 /mnt/windows_disk

,


mount


.



.



nano

nano /etc/fstab

<file system> <mount point> <type> <options> <dump> <pass>
< > < > < >
< > < >
< >
Tab


/dev/sdb1
none
swap
sw
0

/dev/sdb2
/mnt/linux_disk
auto noatime 0
/dev/sdb5
/mnt/windows_disk auto defaults 0

2
0

atime . ,
noatime (
15%). ntfs

2 <pass>
.
,


fstab
, ,
.
:
^o ()
^X ()

:
umount /mnt/linux_disk
umount /mnt/linux_disk
, .
,
sdb
mount | grep sdb


/etc/fstab
, /etc/fstab
mount /dev/sdb2

mount | grep sdb

/dev/sdb2 on /mnt/linux_disk type ext3 (rw,noatime)

mount /dev/sdb5

mount | grep sdb

/dev/sdb2 on /mnt/linux_disk type ext3 (rw,noatime)
/dev/sdb5 on /mnt/windows_disk type fuseblk
(rw,nosuid,nodev,allow_other,blksize=4096)

Оценить