- 论坛徽章:
- 13
|
本帖最后由 ulovko 于 2012-09-08 10:21 编辑
目前需求: 分割移动硬盘,并能够拷贝超过5GB大小的单个文件; 该硬盘长期作用于FreeBSD && MS WINDOWS ..
分区方案: 2分区 (FAT32 + FreeBSD)
分区大小: 1/2 Size /Partition
![]()
- ko# dd if=/dev/zero of=/dev/da0 bs=1k count=1 # 跟移动硬盘打个招呼说:“表妹,跟我走吧!” $_$
- ko# fdisk -BI da0 # 其实是聊聊天,明天会不会下雨呵? O_o
复制代码
- ko# fdisk -u /dev/da0 # 好了,聊天过后进入真题 ^_^
- ******* Working on device /dev/da0 *******
- parameters extracted from in-core disklabel are:
- cylinders=60801 heads=255 sectors/track=63 (16065 blks/cyl)
- Figures below won't work with BIOS for partitions not in cyl 1
- parameters to be used for BIOS calculations are:
- cylinders=60801 heads=255 sectors/track=63 (16065 blks/cyl)
- Do you want to change our idea of what BIOS thinks ? [n] n
- Media sector size is 512
- Warning: BIOS sector numbering starts with sector 1
- Information from DOS bootblock is:
- The data for partition 1 is:
- sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
- start 63, size 976768002 (476937 Meg), flag 80 (active)
- beg: cyl 0/ head 1/ sector 1;
- end: cyl 384/ head 254/ sector 63
- Do you want to change it? [n] y
- Supply a decimal value for "sysid (165=FreeBSD)" [165]
- Supply a decimal value for "start" [63]
- Supply a decimal value for "size" [976768002] 488384064
- ================================================================
- > echo '976768002/2' |bc
- 488384001
- > echo '488384001+63' |bc
- 488384064
- ================================================================
- Explicitly specify beg/end address ? [n]
- sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
- start 63, size 488384064 (238468 Meg), flag 80 (active)
- beg: cyl 0/ head 1/ sector 1;
- end: cyl 704/ head 128/ sector 63
- Are we happy with this entry? [n] y
- The data for partition 2 is:
- <UNUSED>
- Do you want to change it? [n] y
- Supply a decimal value for "sysid (165=FreeBSD)" [0] 12
- Supply a decimal value for "start" [0] 488384127
- Supply a decimal value for "size" [0] 488383876
- ================================================================
- > echo '488384064+62' |bc
- 488384126
- > echo '976768002-488384126' |bc
- 488383876
- ================================================================
- fdisk: WARNING: partition does not end on a cylinder boundary
- fdisk: WARNING: this may confuse the BIOS or some operating systems
- Correct this automatically? [n] y
- fdisk: WARNING: adjusting size of partition to 488367873
- Explicitly specify beg/end address ? [n]
- sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA))
- start 488384127, size 488367873 (238460 Meg), flag 0
- beg: cyl 704/ head 129/ sector 1;
- end: cyl 383/ head 254/ sector 63
- Are we happy with this entry? [n] y
- The data for partition 3 is:
- <UNUSED>
- Do you want to change it? [n]
- The data for partition 4 is:
- <UNUSED>
- Do you want to change it? [n]
- Partition 1 is marked active
- Do you want to change the active partition? [n]
- We haven't changed the partition table yet. This is your last chance.
- parameters extracted from in-core disklabel are:
- cylinders=60801 heads=255 sectors/track=63 (16065 blks/cyl)
- Figures below won't work with BIOS for partitions not in cyl 1
- parameters to be used for BIOS calculations are:
- cylinders=60801 heads=255 sectors/track=63 (16065 blks/cyl)
- Information from DOS bootblock is:
- 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
- start 63, size 488384064 (238468 Meg), flag 80 (active)
- beg: cyl 0/ head 1/ sector 1;
- end: cyl 704/ head 128/ sector 63
- 2: sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA))
- start 488384127, size 488367873 (238460 Meg), flag 0
- beg: cyl 704/ head 129/ sector 1;
- end: cyl 383/ head 254/ sector 63
- 3: <UNUSED>
- 4: <UNUSED>
- Should we write new partition table? [n] y
复制代码 对FreeBSD分区进行格式化:
- ko# newfs -U /dev/da0s1
- /dev/da0s1: 238468.8MB (488384064 sectors) block size 32768, fragment size 4096
- using 323 cylinder groups of 740.00MB, 23680 blks, 47360 inodes.
- with soft updates
- super-block backups (for fsck -b #) at:
- 192, 1515712, 3031232, 4546752, 6062272, 7577792, 9093312, 10608832, 12124352,
- 13639872, 15155392, 16670912, 18186432, 19701952, 21217472, 22732992,
- 24248512, 25764032, 27279552, 28795072, 30310592, 31826112, 33341632,
- 34857152, 36372672, 37888192, 39403712, 40919232, 42434752, 43950272,
- 45465792, 46981312, 48496832, 50012352, 51527872, 53043392, 54558912,
- 56074432, 57589952, 59105472, 60620992, 62136512, 63652032, 65167552,
- 66683072, 68198592, 69714112, 71229632, 72745152, 74260672, 75776192,
- 77291712, 78807232, 80322752, 81838272, 83353792, 84869312, 86384832,
- 87900352, 89415872, 90931392, 92446912, 93962432, 95477952, 96993472,
- 98508992, 100024512, 101540032, 103055552, 104571072, 106086592, 107602112,
- 109117632, 110633152, 112148672, 113664192, 115179712, 116695232, 118210752,
- 119726272, 121241792, 122757312, 124272832, 125788352, 127303872, 128819392,
- 130334912, 131850432, 133365952, 134881472, 136396992, 137912512, 139428032,
- 140943552, 142459072, 143974592, 145490112, 147005632, 148521152, 150036672,
- 151552192, 153067712, 154583232, 156098752, 157614272, 159129792, 160645312,
- 162160832, 163676352, 165191872, 166707392, 168222912, 169738432, 171253952,
- 172769472, 174284992, 175800512, 177316032, 178831552, 180347072, 181862592,
- 183378112, 184893632, 186409152, 187924672, 189440192, 190955712, 192471232,
- 193986752, 195502272, 197017792, 198533312, 200048832, 201564352, 203079872,
- 204595392, 206110912, 207626432, 209141952, 210657472, 212172992, 213688512,
- 215204032, 216719552, 218235072, 219750592, 221266112, 222781632, 224297152,
- 225812672, 227328192, 228843712, 230359232, 231874752, 233390272, 234905792,
- 236421312, 237936832, 239452352, 240967872, 242483392, 243998912, 245514432,
- 247029952, 248545472, 250060992, 251576512, 253092032, 254607552, 256123072,
- 257638592, 259154112, 260669632, 262185152, 263700672, 265216192, 266731712,
- 268247232, 269762752, 271278272, 272793792, 274309312, 275824832, 277340352,
- 278855872, 280371392, 281886912, 283402432, 284917952, 286433472, 287948992,
- 289464512, 290980032, 292495552, 294011072, 295526592, 297042112, 298557632,
- 300073152, 301588672, 303104192, 304619712, 306135232, 307650752, 309166272,
- 310681792, 312197312, 313712832, 315228352, 316743872, 318259392, 319774912,
- 321290432, 322805952, 324321472, 325836992, 327352512, 328868032, 330383552,
- 331899072, 333414592, 334930112, 336445632, 337961152, 339476672, 340992192,
- 342507712, 344023232, 345538752, 347054272, 348569792, 350085312, 351600832,
- 353116352, 354631872, 356147392, 357662912, 359178432, 360693952, 362209472,
- 363724992, 365240512, 366756032, 368271552, 369787072, 371302592, 372818112,
- 374333632, 375849152, 377364672, 378880192, 380395712, 381911232, 383426752,
- 384942272, 386457792, 387973312, 389488832, 391004352, 392519872, 394035392,
- 395550912, 397066432, 398581952, 400097472, 401612992, 403128512, 404644032,
- 406159552, 407675072, 409190592, 410706112, 412221632, 413737152, 415252672,
- 416768192, 418283712, 419799232, 421314752, 422830272, 424345792, 425861312,
- 427376832, 428892352, 430407872, 431923392, 433438912, 434954432, 436469952,
- 437985472, 439500992, 441016512, 442532032, 444047552, 445563072, 447078592,
- 448594112, 450109632, 451625152, 453140672, 454656192, 456171712, 457687232,
- 459202752, 460718272, 462233792, 463749312, 465264832, 466780352, 468295872,
- 469811392, 471326912, 472842432, 474357952, 475873472, 477388992, 478904512,
- 480420032, 481935552, 483451072, 484966592, 486482112, 487997632
复制代码 对FAT32 分区进行格式化:
- ko# newfs_msdos /dev/da0s2
- /dev/da0s2: 488248576 sectors in 7628884 FAT32 clusters (32768 bytes/cluster)
- BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=488367873 FATsecs=59601 RootCluster=2 FSInfo=1 Backup=2
复制代码 显示分区情况:
- ko# fdisk /dev/da0
- ******* Working on device /dev/da0 *******
- parameters extracted from in-core disklabel are:
- cylinders=60801 heads=255 sectors/track=63 (16065 blks/cyl)
- Figures below won't work with BIOS for partitions not in cyl 1
- parameters to be used for BIOS calculations are:
- cylinders=60801 heads=255 sectors/track=63 (16065 blks/cyl)
- Media sector size is 512
- Warning: BIOS sector numbering starts with sector 1
- Information from DOS bootblock is:
- The data for partition 1 is:
- sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
- start 63, size 488384064 (238468 Meg), flag 80 (active)
- beg: cyl 0/ head 1/ sector 1;
- end: cyl 704/ head 128/ sector 63
- The data for partition 2 is:
- sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA))
- start 488384127, size 488367873 (238460 Meg), flag 0
- beg: cyl 704/ head 129/ sector 1;
- end: cyl 383/ head 254/ sector 63
- The data for partition 3 is:
- <UNUSED>
- The data for partition 4 is:
- <UNUSED>
复制代码 挂载分区:
- ko# mount /dev/da0s1 /media/
- ko# mount_msdosfs /dev/da0s2 /mnt/
- mount_msdosfs: /dev/da0s2: Disk too big, try '-o large' mount option: Invalid argument
- ko# mount_msdosfs -o large /dev/da0s2 /mnt/
复制代码 检查一下:- ko# df
- Filesystem Size Used Avail Capacity Mounted on
- /dev/ada0p2 9.9G 649M 8.4G 7% /
- devfs 1.0k 1.0k 0B 100% /dev
- /dev/ada0p4 118G 27G 81G 25% /var
- /dev/ada0p5 2G 23M 1.8G 1% /tmp
- /dev/ada0p6 118G 46G 62G 43% /usr
- /dev/ada0p7 103G 64G 31G 67% /usr/home
- /dev/da0s1 229G 8.0k 210G 0% /media
- /dev/da0s2 232G 96k 232G 0% /mnt
- ko# gpart show da0
- => 63 976773105 da0 MBR (465G)
- 63 488384064 1 freebsd [active] (232G)
- 488384127 488367873 2 !12 (232G)
- 976752000 21168 - free - (10M)
复制代码 搞定晒 ^_^
一会把片弄到移动硬盘里面,听说最近cyber police 盯得很紧、东北有人进去了 ^_^- > ls ~/Movies/
- MM
- France_L_As_Des_As1982.mkv
- France_La_Grande_Vadrouille1966.rmvb
- France_Les_Fugitifs1986.avi
- France_Les_Morfalous1984.rm
- France_The-Intouchables2011.rmvb
- GE_Der-Untergang2004.rmvb
- GE_Stalingrad1993CD1.rmvb
- GE_Stalingrad1993CD2.rmvb
- GE_Stalingrad1993CD3.rmvb
- HK_A-Better-Tomorrow1986.mkv
- HK_A_Better_Tomorrow1986-01.mkv
- HK_Ashes-of-Time-Redux2008.rmvb
- HK_Beyond1991.mkv
- HK_GEM-Concert2011.rmvb
- HK_Once-A-Thief1991.mkv
- HK_TVB-BEYOND2008.rmvb
- HK_TVB-Leslie2008.rmvb
- HK_TianLongBabu97.flv
- Norway_Nokas2010.rmvb
- TMP_Akira-Yamaoka-Promise.flv
- TMP_Best-native-games4Linux2012.flv
- TMP_Damn-Yankees_Where-u-Going-Now.flv
- TMP_Lost-Paradise_Juliette-Valduriez.flv
- TMP_OpenBSD-Interview.flv
- TMP_ZhouHongYi-Interview.flv
- UK_Attack-on-Leningrad2009.rmvb
- UK_Escape-to-Athena1979.mkv
- UK_From-Up-on-Poppy-Hill2011.mkv
- UK_Lock_Stock-and-Two-Smoking-Barrels1998.rmvb
- UK_Snatch2000.rmvb
- UK_The-Children-of-Heaven1997.mkv
- UK_The-Pianist.rmvb
- USA_Bad-BoysII2003.rmvb
- USA_Brave-Heart1995.rmvb
- USA_Flyboys2006.rmvb
- USA_Kellys_Heroes1970.rmvb
- USA_Life-is-Beautiful1997.rmvb
- USA_Memorial-Day2011.rmvb
- USA_Patton1970-CD1.rmvb
- USA_Patton1970-CD2.rmvb
- USA_Platoon1986.rmvb
- USA_Pulp-Fiction1994.rmvb
- USA_Sahara1995-CN.rmvb
- USA_Sahara1995-EN.avi
- USA_Scent-of-a-Woman1992.rmvb
- USA_SchindlersList1993.mkv
- USA_The-Longest-Day1962.mkv
- USA_The-Pursuit-of-Happyness2006.rmvb
- USA_The-Shawshank-Redemption1994.rmvb
- USA_Where-Eagles-Dare1968.rmvb
- >
复制代码 GPT: http://bbs.chinaunix.net/forum.p ... mp;fromuid=25256412 |
|