Last Update: "2007/06/04 09:22:18 makoto"
shell
http://spirea.ddo.jp/debian02.html
# help
Built-in commands:
-------------------
. : alias bg break builtin cd chdir continue eval exec exit export
false fc fg hash help jobs kill let local pwd read readonly return
set setvar shift times trap true type ulimit umask unalias unset
wait
mfdisk
mfdisk は PC で良く使われる fdisk を玄箱/LinkStation/TeraStation 用
にしたものと考えるのが理解しやすいでしょう。良く見れば、機能は全然違う
のですが、MBR を編集するという意味では同じものです。
まず、mfdisk とのつき合い方で注意することがあります。
mfdisk は最初、HD-LAN ver 1. 用に
mfdisk /dev/hda
のようにして初期化をするために用意されたものであることです。
何が問題かと言って、「一番簡単な書式で入力すると、全て初期化してしまう」
ことです。現に僕も一度それをやってしまったことがあります。
逆に言えば、もし fdisk が使えるなら、それを使う方が簡単かも知れません。
# mfdisk -h
(説明)
Partition table manipulator for BUFFALO INC. Link Station series. ver 1.5, 2003.10.3
Usage: mfdisk DISK Create partition tables for HD-LAN ver 1.xx
mfdisk -f DISK Create partition tables for HD-LAN ver 2.xx
mfdisk -h DISK Create partition tables for HD-HLAN
mfdisk -g [1:2:3:5:10:20:50] DISK Create partition tables
mfdisk -a DISK Create partition table for HD-HLAN's USB Disk
mfdisk -c DISK Create partition table(s) with menu
mfdisk -p DISK Check partition table(s)
mfdisk -e DISK Deleate all partition tables
mfdisk -d [1:2:3:4] DISK Create partition tables for Link Station
Here DISK is something like /dev/hda or /dev/sda
# mfdisk -c /dev/hda
区画作成の説明
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Command (m for help): help
Partition table manipulator for BUFFALO INC. HD-LAN Series.
create partitions...
limit = 257039
start = 63, stop(limit) = 257039
limit = 771119
start = 257040, stop(limit) = 771119
limit = 321669494
start = 771120, stop(limit) = 321669494
The partition table has been altered!
Syncing disks.
# mfdisk -p /dev/hda
(確認)
Units = /dev/hda, 1417MB
/dev/hda1 = Linux, (null)
/dev/hda2 = Linux swap, (null)
/dev/hda3 = Linux, (null)
# mfdisk -e /dev/hda
(消去)
delete partition 1
delete partition 2
delete partition 3
create partitions...
deleate all partitions.
The partition table has been altered!
Syncing disks.
# mfdisk -p /dev/hda
Units = /dev/hda, 1417MB
# mfdisk -c /dev/hda
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-20023, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-20023, default 20023): 600
Command (m for help): p
Disk /dev/hda: 255 heads, 63 sectors, 20023 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 600 4819468+ 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (601-20023, default 601):
Using default value 601
Last cylinder or +size or +sizeM or +sizeK (601-20023, default 20023): 120
Value out of range.
Last cylinder or +size or +sizeM or +sizeK (601-20023, default 20023): 720
Command (m for help): p
Disk /dev/hda: 255 heads, 63 sectors, 20023 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 600 4819468+ 83 Linux
/dev/hda2 601 720 963900 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (721-20023, default 721):
Using default value 721
Last cylinder or +size or +sizeM or +sizeK (721-20023, default 20023):
Using default value 20023
Command (m for help): p
Disk /dev/hda: 255 heads, 63 sectors, 20023 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 600 4819468+ 83 Linux
/dev/hda2 601 720 963900 83 Linux
/dev/hda3 721 20023 155051347+ 83 Linux
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
Command (m for help): w
The partition table has been altered!
Syncing disks.
#
|