2009年4月12日 星期日

救回遺失的 Partition - "TestDisk"

原始網址 : http://www.cgsecurity.org/wiki/TestDisk

TestDisk

From CGSecurity


TestDisk_Download
Latest stable version

6.10
July 17, 2008

testdisklogo-clear-100.gif
TestDisk, Data Recovery

TestDisk is OpenSource software and is licensed under the terms of the GNU Public License (GPL).

TestDisk is a powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.

TestDisk can

  • Fix partition table, recover deleted partition
  • Recover FAT32 boot sector from its backup
  • Rebuild FAT12/FAT16/FAT32 boot sector
  • Fix FAT tables
  • Rebuild NTFS boot sector
  • Recover NTFS boot sector from its backup
  • Fix MFT using MFT mirror
  • Locate ext2/ext3 Backup SuperBlock
  • Undelete files from FAT, NTFS and ext2 filesystem
  • Copy files from deleted FAT, NTFS and ext2/ext3 partitions.

TestDisk has features for both novices and experts. For those who know little or nothing about data recovery techniques, TestDisk can be used to collect detailed information about a non-booting drive which can then be sent to a tech for further analysis. Those more familiar with such procedures should find TestDisk a handy tool in performing onsite recovery.

Operating systems

TestDisk can run under

  • DOS (either real or in a Windows 9x DOS-box),
  • Windows (NT4, 2000, XP, 2003, Vista),
  • Linux,
  • FreeBSD, NetBSD, OpenBSD,
  • SunOS and
  • MacOS

Source files and precompiled binary executables are available for DOS, Win32, MacOSX and Linux from the download page

Filesystems

TestDisk can find lost partitions for all of these file systems:

  • BeFS ( BeOS )
  • BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
  • CramFS, Compressed File System
  • DOS/Windows FAT12, FAT16 and FAT32
  • HFS, HFS+ and HFSX, Hierarchical File System
  • JFS, IBM's Journaled File System
  • Linux ext2 and ext3
  • Linux LUKS encrypted partition
  • Linux RAID md 0.9/1.0/1.1/1.2
    • RAID 1: mirroring
    • RAID 4: striped array with parity device
    • RAID 5: striped array with distributed parity information
    • RAID 6: striped array with distributed dual redundancy information
  • Linux Swap (versions 1 and 2)
  • LVM and LVM2, Linux Logical Volume Manager
  • Mac partition map
  • Novell Storage Services NSS
  • NTFS ( Windows NT/2000/XP/2003/Vista/2008 )
  • ReiserFS 3.5, 3.6 and 4
  • Sun Solaris i386 disklabel
  • Unix File System UFS and UFS2 (Sun/BSD/...)
  • XFS, SGI's Journaled File System

Documentation

To recover lost pictures or files from digital camera or harddisk, run the PhotoRec command.


TestDisk home: http://www.cgsecurity.org.
Christophe GRENIER grenier@cgsecurity.org

2009年4月9日 星期四

Memory Mapped I/O & Port I/O

Memory-mapped I/O

From Wikipedia, the free encyclopedia

(Redirected from Memory mapped IO)
Jump to: navigation, search

Memory-mapped I/O (MMIO) and port I/O (also called port-mapped I/O or PMIO) are two complementary methods of performing input/output between the CPU and peripheral devices in a computer. Another method, not discussed in this article, is using dedicated I/O processors—commonly known as channels on mainframe computers—that execute their own instructions.

Memory-mapped I/O (not to be confused with memory-mapped file I/O) uses the same address bus to address both memory and I/O devices, and the CPU instructions used to access the memory are also used for accessing devices. In order to accommodate the I/O devices, areas of CPU's addressable space must be reserved for I/O. The reservation might be temporary—the Commodore 64 could bank switch between its I/O devices and regular memory—or permanent. Each I/O device monitors the CPU's address bus and responds to any CPU's access of device-assigned address space, connecting the data bus to a desirable device's hardware register.

Port-mapped I/O uses a special class of CPU instructions specifically for performing I/O. This is generally found on Intel microprocessors, specifically the IN and OUT instructions which can read and write a single byte to an I/O device. I/O devices have a separate address space from general memory, either accomplished by an extra "I/O" pin on the CPU's physical interface, or an entire bus dedicated to I/O.

A device's direct memory access (DMA) is not affected by those CPU-to-device communication methods, especially it is not affected by memory mapping. This is because, by definition, DMA is a memory-to-device communication method, that bypasses the CPU.

Hardware interrupt is yet another communication method between CPU and peripheral devices. However, it is always treated separately for a number of reasons. It is device-initiated, as opposed to above CPU-initiated methods. It is also unidirectional, as information flows only from device to CPU. Lastly, each interrupt line carries itself only one bit of information with a fixed meaning, namely "there is an interrupt".

Contents

[hide]

[edit] Relative merits of the two I/O methods

The main advantage of using port-mapped I/O is on CPUs with a limited addressing capability. Because port-mapped I/O separates I/O access from memory access, the full address space can be used for memory. It is also obvious to a person reading an assembly language program listing when I/O is being performed, due to the special instructions that can only be used for that purpose.

I/O operations can slow the memory access, if the address and data buses are shared. This is because the peripheral device is usually much slower than main memory. In some architectures, port-mapped I/O operates via a dedicated I/O bus, alleviating the problem.[clarification needed]

The advantage of using memory-mapped I/O is that, by discarding the extra complexity that port I/O brings, a CPU requires less internal logic and is thus cheaper, faster and easier to build; this follows the basic tenets of reduced instruction set computing, and is also advantageous in embedded systems. The fact that regular memory instructions are used to address devices also means that all of the CPU's addressing modes are available for the I/O as well as the memory. As 16-bit peripherals have become obsolete and replaced with 32-bit and 64-bit in general use, reserving ranges of memory address space for I/O become less of a problem.

[edit] Example

Consider a simple system built around an 8-bit microprocessor. Such a CPU might provide 16-bit address lines, allowing it to address up to 64 kibibytes (KiB) of memory. On such a system, perhaps the first 32 KiB of address space would be allotted to random access memory (RAM), another 16K to read only memory (ROM) and the remainder to a variety of other devices such as timers, counters, video display chips, sound generating devices, and so forth. The hardware of the system is arranged so that devices on the address bus will only respond to particular addresses which are intended for them; all other addresses are ignored. This is the job of the address decoding circuitry, and it is this that establishes the memory map of the system.

Thus we might end up with a memory map like so:


Device Address range
(hexadecimal)
Size
RAM 0000 - 7FFF 32 KiB
General purpose I/O 8000 - 80FF 256 bytes
Sound controller 9000 - 90FF 256 bytes
Video controller/text-mapped display RAM A000 - A7FF 2 KiB
ROM C000 - FFFF 16 KiB

Note that this memory map contains gaps; that is also quite common.

Assuming the fourth register of the video controller sets the background colour of the screen, the CPU can set this colour by writing a value to the memory location A003 using its standard memory write instruction. Using the same method, glyphs can be displayed on a screen by writing character values into a special area of RAM within the video controller. Prior to cheap RAM that enabled bit-mapped displays, this character cell method was a popular technique for computer video displays (see Text user interface).

[edit] Basic types of address decoding

  • Exhaustive - 1:1 mapping of unique addresses to one hardware register (physical memory location)
  • Partial - n:1 mapping of n unique addresses to one hardware register. Partial decoding allows a memory location to have more than one address, allowing the programmer to reference a memory location using n different addresses. Synonyms: foldback, multiply-mapped, partially-mapped.
  • Linear - Address lines are used directly without any logic

[edit] Incomplete address decoding

Addresses may be decoded completely or incompletely by a device.

  • Complete decoding involves checking every line of the address bus, causing an open data bus when the CPU accesses an unmapped region of memory.
  • Incomplete decoding, or partial decoding, uses simpler and often cheaper logic that examines only some address lines. Such simple decoding circuitry might allow a device to respond to several different addresses, effectively creating virtual copies of the device at different places in the memory map. All of these copies refer to the same real device, so there is no particular advantage in doing this, except to simplify the decoder. Commonly, the decoding itself is programmable, so the system can reconfigure its own memory map as required.

[edit] See also

重新啟動 X Server

快速鍵:

"Ctrl" + "Alt" + "Backspace"

Fedora Core 9 Resolution Issue

原始網址:
http://phorum.study-area.org/index.php?topic=53563.0


轉載自 "酷!學園"

技術討論區 => Linux 討論版 => 主題作者是: mekuch 於 2008-09-11 09:43



主題: 如何設定 fedora code 9 螢幕解析度 ?
作者: mekuch2008-09-11 09:43
我的 fc 9 裝好後
螢幕解析度是 640x480 75 hz , 無法調整為其他數值
導致整個視窗很大 , 無法縮小


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: pippeng2008-09-11 13:57
system-config-display
設定螢幕(LCD or CRT)大小

重新登入X windows


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: mekuch2008-09-11 14:26
system-config-display
設定螢幕(LCD or CRT)大小

重新登入X windows

謝謝你的回覆
請問你是說 系統- 偏好設定- 顯示 是嗎 ?
可是我怎麼找不到顯示這個選項
我只找到系統- 偏好設定 - 硬體 - 螢幕解析度
但是無法調整 LCD OR CRT 大小
只能設定 640 X 480 或是 OFF


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: pippeng2008-09-11 15:10
system-config-display
設定螢幕(LCD or CRT)大小

重新登入X windows

謝謝你的回覆
請問你是說 系統- 偏好設定- 顯示 是嗎 ?
可是我怎麼找不到顯示這個選項
我只找到系統- 偏好設定 - 硬體 - 螢幕解析度
但是無法調整 LCD OR CRT 大小
只能設定 640 X 480 或是 OFF
我說的是到終端機上執行
#system-config-display


X windows的顯示設定在哪我不熟
都習慣用終端機


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: mekuch2008-09-11 15:36
system-config-display
設定螢幕(LCD or CRT)大小

重新登入X windows

謝謝你的回覆
請問你是說 系統- 偏好設定- 顯示 是嗎 ?
可是我怎麼找不到顯示這個選項
我只找到系統- 偏好設定 - 硬體 - 螢幕解析度
但是無法調整 LCD OR CRT 大小
只能設定 640 X 480 或是 OFF
我說的是到終端機上執行
#system-config-display


X windows的顯示設定在哪我不熟
都習慣用終端機

謝謝你的回覆
我用終端機上執行
#system-config-display
還是跳出螢幕解析度 視窗為 640 x 480 無法選擇其他解析度


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: yamaka2008-09-11 15:42
沒裝顯示卡的驅動程式 ??


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: mekuch2008-09-11 15:53
沒裝顯示卡的驅動程式 ??

他有自動抓到 ATI Technologies inc RS482 顯示卡
我看還是裝 Fedora code 8 我看問題會少一點


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: darkranger2008-09-11 16:15
直接改 xorg.conf 試試吧
並且確認裡頭所用的驅動模組為何


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: pippeng2008-09-11 16:55


謝謝你的回覆
我用終端機上執行
#system-config-display
還是跳出螢幕解析度 視窗為 640 x 480 無法選擇其他解析度

你不會是安裝在Vmware上吧
如果是
請先安裝Vmware Tools

#system-config-display
硬體 > 螢幕類型 > LCD 1024 x 768

重新登入X windows
#system-config-display
設定解析度1024 x 768


主題: 回覆: 如何設定 fedora code 9 螢幕解析度 ?
作者: dodoro2008-09-14 02:22
我想變更螢幕類型就能解決了.
動作如下:(在Xwindow上方的面版)
系統->管理->顯示->硬體->設定
然後依你的顯示器類型選擇CRT或LCD
再選擇解析度,例如你的螢幕可上1280x1024
那麼就選那個,設定好後,你就能調整螢幕的解析度到1280x1024
如果不行登出Xwindow再登入一次,應該就可以調整較高的解析度