📄 hd.4
字号:
3602(cyl)S3750(bits)S4480(*/)S5352 V1180(unsigned)S1567(char)S1766(start_cyl;)S2630(/*)S2733(low)S2909(8)S2984(cylinder)S3339(bits)S4480(*/)S5472 V1180(unsigned)S1567(char)S1766(sysind;)S2630(/*)S2733(system)S3037(indicator)S4480(*/)S5592 V1180(unsigned)S1567(char)S1766(last_head;)S2630(/*)S2733(h/s/c)S2948(for)S3091(the)S3239(last)S3404(sector)S4480(*/)S5712 V1180(unsigned)S1567(char)S1766(last_sec;)S5832 V1180(unsigned)S1567(char)S1766(last_cyl;)S5952 V1180(unsigned)S(long)178 1567 A1770(lowsec;)S2630(/*)S2733(logical)S3032(\256rst)S3214(sector)S4480(*/)S6072 V1180(unsigned)S(long)178 1567 A1770(size;)S2630(/*)S2733(size)S2915(of)S(partition)341 3024 A3390(in)S3493(sectors)S4480(*/)S6192 V1080(};)S6432 V1080(#de\256ne)S1401(ACTIVE_FLAG)S(0x80)200 2280 A2630(/*)S2733(value)S2976(for)S3119(active)S3385(in)S(bootind)306 3488 A3819(\256eld)S4480(*/)S6552 V1080(#de\256ne)S1401(NR_PARTITIONS)S2280(4)S2630(/*)S2733(number)S3065(of)S3174(entries)S3468(in)S3571(table)S4480(*/)S6672 V1080(#de\256ne)S1401(PART_TABLE_OFF)S(0x1BE)279 2280 A2630(/*)S2733(offset)S2988(of)S3097(table)S3318(in)S(boot)178 3421 A3624(sector)S4480(*/)S6912 V1080(/*)S(Partition)347 1183 A1555(types)S1792(\(sysind\).)S2166(*/)S7032 V1080(#de\256ne)S1401(MINIX_PART)S(0x81)200 2280 A2630(/*)S2733(Minix)S(partition)341 3003 A3369(type)S3567(*/)S7152 V1080(#de\256ne)S1401(NO_PART)S(0x00)200 2280 A2630(/*)S(unused)284 2733 A3042(entry)S3274(*/)S7272 V1080(#de\256ne)S1401(OLD_MINIX_PART)S(0x80)200 2280 A2630(/*)S2733(created)S3050(before)S3333(1.4b,)S3558(obsolete)S3918(*/)S7392 V1080(#de\256ne)S1401(EXT_PART)S(0x05)200 2280 A2630(/*)S2733(extended)S(partition)341 3121 A3487(*/)S7903 V720(Page)S941(1)S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/slant 0 def/height 0 def480 V10 R720(HD)S874(\()S916(4)S974(\))S2696(Eighth)S(Edition)296 2989 A4973(HD)S5127(\()S5169(4)S5227(\))S960 V1080(The)S1270(cylinder)S1633(numbers)S2012(are)S2169(encoded)S2537(in)S2648(a)S2726(very)S2939(strange)S3264(way,)S3491(bits)S3670(8)S3754(and)S3933(9)S4017(are)S4175(in)S4287(the)S4444(high)S4656(two)S4841(bits)S5020(of)S5138(the)S1080 V1080(sector)S1357(number.)S1750(The)S1942(sector)S2218(numbers)S(count)223 2599 A2857(from)S3088(1,)S3198(not)S3361(0!)S3505(More)S3758(useful)S4039(are)S4198(the)S4356(lowsec)S4671(and)S4851(size)S5043(\256elds)S1200 V1080(however,)S1477(they)S1675(simply)S1973(give)S2171(the)S2319(location)S2668(of)S2777(the)S(partition)341 2925 A3292(as)S3402(an)S3523(absolute)S3884(sector)S4151(offset)S4407(and)S4578(length)S4855(within)S5138(the)S1320 V1080(drive.)S1488 V1080(The)S(partition)341 1270 A1644(table)S1873(entry)S2113(de\256ned)S(above)240 2442 A2715(is)S2815(speci\256c)S3156(to)S3268(IBM)S3492(type)S3699(disks.)S3989(The)S4180(device)S4477(drivers)S4791(use)S4959(another)S1608 V(partition)341 1080 A1446(entry)S1678(structure)S2056(to)S2159(pass)S2357(information)S2857(on)S2982(a)S(partition.)366 3052 A3468(This)S3672(is)S3764(what)S(<minix/partition.h>)792 3985 A(looks)217 4802 A5044(like:)S1848 V1080(struct)S(partition)341 1329 A1695({)S1968 V(u64_t)228 1180 A1433(base;)S2430(/*)S2533(byte)S2731(offset)S2986(to)S3089(the)S(partition)341 3237 A3603(start)S3802(*/)S2088 V(u64_t)228 1180 A1433(size;)S2430(/*)S2533(number)S2865(of)S2974(bytes)S3211(in)S3314(the)S(partition)341 3462 A3828(*/)S2208 V1180(unsigned)S1567(cylinders;)S2430(/*)S2533(disk)S2725(geometry)S3130(for)S(partitioning)469 3273 A3767(*/)S2328 V1180(unsigned)S1567(heads;)S2448 V1180(unsigned)S1567(sectors;)S2568 V1080(};)S2736 V1080(The)S1267(base)S1476(and)S1651(size)S1838(\256elds)S2086(are)S2240(the)S2393(byte)S2596(offset)S2856(and)S3031(length)S3313(of)S3428(a)S(partition.)366 3504 A3926(\(These)S4232(are)S4387(64)S4518(bit)S4655(numbers)S(under)229 5032 A2856 V1080(Minix-vmd,)S1590(but)S1746(only)S1951(32)S2078(bit)S2211(numbers)S(under)229 2584 A2840(standard)S3208(Minix.\))S3564(The)S3748(geometry)S4155(of)S4266(the)S4416(disk)S4610(is)S4704(also)S4893(given)S5143(for)S2976 V1080(the)S1234(bene\256t)S1539(of)S(partition)341 1654 A2027(table)S2255(editors.)S2611(This)S2822(information)S3329(can)S3501(be)S3628(obtained)S4006(from)S4234(an)S4361(open)S4588(disk)S4787(device)S5082(with)S3096 V1080(the)S(call:)174 1228 A3336 V10 B1440(ioctl\()S10 I1659(fd)S10 B1737(,)S1787(DIOCGETP,)S2374(&)S10 I2458(entry)S10 B2665(\);)S3576 V10 R1080(One)S1295(can)S1482(change)S1814(the)S(placement)414 1984 A2445(of)S2576(the)S2746(device)S3056(to)S3181(the)S3351(lowsec)S3678(and)S3870(size)S4074(\256elds)S4339(of)S10 I4470(entry)S10 R4725(by)S4873(using)S5138(the)S3696 V10 B1080(DIOCSETP)S10 R1620(call)S1791(instead.)S2151(Only)S2377(the)S2525(base)S2729(and)S2899(size)S3081(\256elds)S3324(are)S3473(used)S3682(for)S10 B3825(DIOCSETP)S10 R4340(.)S3864 V1080(The)S(partition)341 1268 A1640(tables)S1906(when)S2155(read)S2360(from)S2587(disk)S2785(by)S2916(the)S3070(driver)S3343(are)S3499(checked)S3861(and)S4038(truncated)S4445(to)S4555(\256t)S4671(within)S4960(the)S5115(pri-)S3984 V1080(mary)S(partition)341 1312 A1678(or)S1787(drive.)S2069(The)S2251(\256rst)S2433(sector)S(should)267 2699 A2991(be)S3111(left)S3271(free)S3454(for)S3597(the)S(partition)341 3745 A4111(table.)S4152 V1080(The)S(partition)341 1263 A1630(tables)S1891(are)S2041(read)S2241(when)S2485(the)S2634(in-use)S(count)223 2906 A3155(\(opens)S3449(and)S(mounts\))329 3620 A3975(changes)S4325(from)S4547(0)S4623(to)S4728(1.)S4855(So)S4988(an)S5110(idle)S4272 V1080(disk)S1285(is)S1390(automatically)S(repartitioned)515 1976 A2529(on)S2667(the)S2828(next)S(access.)283 3038 A3383(This)S3599(means)S3893(that)S(repartitioning)548 4081 A4666(programs)S5083(only)S4392 V1080(have)S1295(effect)S1551(if)S1638(a)S1708(disk)S1900(stays)S2126(in)S2229(use,)S2413(unless)S2689(they)S2887(reload)S3164(a)S3234(changed)S(partition)341 3594 A3960(table.)S4560 V9 R720(F)S722(FI)S774(IL)S807(LE)S865(ES)S923(S)S4680 V10 R1080(/dev/hd[0)S10 R-11465(-)S10 R1522(9],)S1656(/dev/hd[1)S10 R-12041(-)S10 R2098(46)S10 R-12198(-)S10 R2255(9][a)S10 R-12418(-)S10 R2475(d])S4848 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S4968 V10 B1080(ioctl)S10 R1265(\(2\),)S10 B1433(int64)S10 R1651(\(3\),)S10 B1819(part)S10 R2004(\(8\),)S10 B2172(repartition)S10 R2643(\(8\).)S5136 V9 R720(B)S722(BU)S784(UG)S852(GS)S920(S)S5256 V10 R1080(The)S(subpartitioning)608 1268 A1907(is)S2006(incompatible)S2563(with)S2774(the)S2929(MS-DOS)S(method)301 3342 A3675(of)S3791(extended)S(partitions.)405 4186 A4648(The)S4837(latter)S5077(does)S5376 V1080(not)S1233(map)S1431(well)S1630(to)S1733(the)S1881(sparse)S2158(minor)S2423(device)S2711(number)S(space.)249 3043 A5544 V1080(The)S1274(primary)S(partition)341 1630 A2008(table)S2241(is)S2345(sorted)S2628(by)S2765(lowsec)S3082(like)S3270(MS-DOS)S3689(does,)S(subpartition)480 3936 A4454(tables)S4727(are)S4889(not.)S5105(Just)S5664 V1080(think)S(about)223 1311 A1559(what)S1780(happens)S2134(when)S(you)150 2377 A2552(delete)S2818(a)S(partition)341 2888 A3254(in)S3357(the)S3505(MS-DOS)S3911(scheme.)S5832 V1080(Don't)S1356(move)S1620(a)S(partition)341 1706 A2088(that)S2280(is)S(mounted)351 2388 A2780(or)S2905(kept)S3120(open)S3357(by)S3499(some)S3753(process.)S4147(The)S4346(\256le)S4517(system)S4838(may)S5053(write)S5952 V(cached)280 1080 A1385(blocks)S1672(to)S1775(the)S1923(new)S2116(location.)S6120 V1080(The)S1262(BIOS)S1517(driver)S1783(is)S1875(not)S2028(slow)S2243(at)S2341(all)S2467(on)S2592(a)S2662(buffered)S3029(disk.)S6288 V1080(Some)S1351(IDE)S1562(disks)S1810(send)S2036(an)S2173(interrupt)S2562(when)S2822(they)S3037(spin)S3246(down)S(under)229 3511 A3783(hardware)S4202(power)S4497(management.)S5104(The)S6408 V1080(driver)S(acknowledges)570 1353 A1955(the)S2110(interrupt)S2489(as)S2605(it)S2693(is)S(supposed)373 2792 A3197(to)S3307(do)S3439(by)S3571(reading)S3904(the)S4058(status)S4318(register.)S4702(The)S4890(disk)S5088(then)S6528 V1080(spins)S1311(up)S(again...)293 1436 A1779(You)S1977(have)S2192(to)S2295(disable)S2605(the)S2753(spin)S2945(down)S3193(in)S3296(the)S3444(computer)S3849(setup)S4086(to)S4189(\256x)S4320(the)S4468(problem.)S6696 V9 R720(A)S722(AU)S790(UT)S858(TH)S916(HO)S984(OR)S1052(R)S6816 V10 R1080(Kees)S1307(J.)S1396(Bot)S1566(\(kjb@cs.vu.nl\))S7903 V720(September)S1176(13,)S(1996)200 1326 A4990(Page)S5211(2)S8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -