dev format introduction

DEV device

/dev/hd[a-t]:IDE 设备
/dev/sd[a-z]:SCSI 设备
/dev/fd[0-7]:标准软驱
/dev/md[0-31]:软raid 设备
/dev/loop[0-7]:本地回环设备
/dev/ram[0-15]:内存
/dev/null:无限数据接收设备 ,相当于回收站
/dev/zero:无限零资源
/dev/tty[0-63]:虚拟终端
/dev/ttyS[0-3]:串口
/dev/lp[0-3]:并口
/dev/console:控制台
/dev/fb[0-31]:framebuffer
/dev/cdrom => /dev/hdc
/dev/modem => /dev/ttyS[0-9]
/dev/pilot => /dev/ttyS[0-9]

Use w to view two virtual terminals, pts/0 and pts/1

To backup partition information, use the command:

#fdisk -l /dev/hda > /bak/partition.bak

To backup MBR, use the command:

# dd if=/dev/hda of=/bak/mbr.bak bs=512 count=1
  #说明:主引导记录512 字节中前446 是程序代码,后64 字节包含分区表信息,最后2 字节标
   识是MBR。

To restore the partition table, use the command:

# dd if=/bak/mbr.bak of=/dev/hda bs=512 count=1

Guess you like

Origin blog.51cto.com/6519883/2608184