sudo fdisk -lWARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.Disk /dev/sda: 160.0 GB, 160041885696 bytes255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000 Device Boot Start End Blocks Id System/dev/sda1 1 312581807 156290903+ ee GPTDisk /dev/sdb: 500.1 GB, 500107862016 bytes255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0007e385 Device Boot Start End Blocks Id System/dev/sdb1 * 63 32772599 16386268+ 83 Linux/dev/sdb2 32772600 40965749 4096575 83 Linux/dev/sdb3 40965750 43006004 1020127+ 82 Linux swap / Solaris/dev/sdb4 43006005 976768064 466881030 5 Extended/dev/sdb5 43006068 976768064 466880998+ 83 Linux
We're in 'luck' since we're only interested in killing sdb, and gparted wants a Display (this is done remotely).
So
sudo fdisk /dev/sdbCommand (m for help): dPartition number (1-5): 1Command (m for help): d Partition number (1-5): 2Command (m for help): dPartition number (1-5): 3Command (m for help): dPartition number (1-5): 4Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.
So did it work?
sudo fdisk -lTime to create a new partitionWARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.Disk /dev/sda: 160.0 GB, 160041885696 bytes255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000 Device Boot Start End Blocks Id System/dev/sda1 1 312581807 156290903+ ee GPTDisk /dev/sdb: 500.1 GB, 500107862016 bytes255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0007e385 Device Boot Start End Blocks Id System
sudo fdisk /dev/sdbCommand (m for help): nPartition type: p primary (0 primary, 0 extended, 4 free) e extendedSelect (default p): pPartition number (1-4, default 1): Using default value 1First sector (2048-976773167, default 2048): Using default value 2048Last sector, +sectors or +size{K,M,G} (2048-976773167, default 976773167): Using default value 976773167Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.
Did it work?
sudo fdisk -l /dev/sdbCreate a file system:Disk /dev/sdb: 500.1 GB, 500107862016 bytes81 heads, 63 sectors/track, 191411 cylinders, total 976773168 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0007e385 Device Boot Start End Blocks Id System/dev/sdb1 2048 976773167 488385560 83 Linux
sudo mkfs.ext4 /dev/sdb1Let's automount it:mke2fs 1.42.5 (29-Jul-2012)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks30531584 inodes, 122096390 blocks6104819 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=42949672963727 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done
mkdir /home/me/scratch
and edit /etc/fstab
/dev/sdb1 /home/me/scratch ext4 defaults 0 2
You're done.
Hiç yorum yok:
Yorum Gönder