ก๊วนซอฟท์แวร์ </softganz> SoftGang (Gang Software)

Web &amp; Software Developer Gang.

How to mount a new internal harddisk

by Little Bear @12 ก.ค. 52 22:44 ( IP : 61...246 ) | Tags : Linux , Harddisk
  1. Check what is the new hard disk device name with "fdisk -l", it shoul be something like /dev/sdb
  2. Create a partition on it, supose the disk is /dev/sdb: "echo -ne "n\np\n1\n\n\nw\n" | fdisk /dev/sdb1"
  3. Make a filesystem on the partition: mkfs.ext3 /dev/sdb1
  4. Create a directory where to mount the partition: mkdir /newdirectory
  5. Edit fstab an add at the end of the file:
    /dev/sdb1  /newdirectory  ext3  defaults 0 0
  6. now mount:
    mount -a

ps. echo -ne part? is

  1. n -> new partition
  2. p -> primary partition
  3. 1 -> number of the partition
  4. just enter, here you should enter the first block
  5. just enter, here you should enter the last block
  6. write the partition table to the disk.

Relate topics