- 论坛徽章:
- 0
|
一局把我的分全没了,努力罐水,拿分搞球,下面是fdisk的测试,注意fdisk.txt文件,转换成脚本(结合mkfs.ext3,mount)后可自动分区与挂载的
[root@test0 tmp]# fdisk -l
Disk /dev/hda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 913 7333641 83 Linux
/dev/hda2 914 1044 1052257+ 82 Linux swap / Solaris
Disk /dev/hdd: 2147 MB, 2147483648 bytes
16 heads, 63 sectors/track, 4161 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
[root@test0 tmp]# fdisk /dev/hdd < fdisk.txt
The number of cylinders for this disk is set to 4161.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (1-4161, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4161, default 4161):
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (1986-4161, default 1986): Using default value 1986
Last cylinder or +size or +sizeM or +sizeK (1986-4161, default 4161): Using default value 4161
Command (m for help): The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@test0 tmp]# more fdisk.txt
n
p
1
+1024M
n
p
2
w
[root@test0 tmp]# fdisk -l
Disk /dev/hda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 913 7333641 83 Linux
/dev/hda2 914 1044 1052257+ 82 Linux swap / Solaris
Disk /dev/hdd: 2147 MB, 2147483648 bytes
16 heads, 63 sectors/track, 4161 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdd1 1 1985 1000408+ 83 Linux
/dev/hdd2 1986 4161 1096704 83 Linux
[root@test0 tmp]# |
|