Showing posts with label format. Show all posts
Showing posts with label format. Show all posts

Tuesday, January 7, 2020

How to Add New Disks Using LVM to an Existing Linux System

How to Add New Disks Using LVM to an Existing Linux System


Read on this web site add-new-disks-using-lvm-to-linux

Saturday, May 23, 2015

create usb boot with dd command

Format disk to fat32 before create usb boot
format fat32 command
sudo mkfs.vfat -I -F32 /dev/sdx
format NTFS
sudo mkfs.ntfs /dev/sdx
format ext4
sudo mkfs.ext4 -L label /dev/sdx
sudo mkfs.ext4 -F -O ^64bit -L 'Label disk' '/dev/sdx1'

#fdisk -l
build usb boot
#
#sudo umount /dev/sdc
#dd if=ubuntu-mate-14.04.2-LTS-desktop-i386.iso of=/dev/sdc bs=1M
or
#sudo dd if=./ubuntu.iso of=/dev/sdd bs=8129

#complete
1076+1 records in
1076+1 records out
1128595456 bytes (1.1 GB) copied, 220.276 s, 5.1 MB/s


if= source file iso, img 
of= flash drive
bs= Read & Write rate

#clone to image file
dd if=/dev/sdb of=/home/hades/Downloads/OS/hilen-boot.img bs=1M
7633+1 records in
7633+1 records out

8004304896 bytes (8.0 GB) copied, 370.764 s, 21.6 MB/s


แบบมี status ว่าทำได้กี่ %
1.ต้องติดตั้ง package pv dialog (sudo apt-get install pv dialog)
#(pv -n lubuntu-15.04-alternate-i386.iso | dd of=/dev/sdb bs=1M) 2>&1 | dialog --gauge "Running dd command (copyfile), please wait..." 10 70

2. pv -tpreb lubuntu-15.04-alternate-i386.iso | dd of=/dev/sdb bs=1M
#pv -tpreb lubuntu-15.04-alternate-i386.iso | dd of=/dev/sdb bs=1M
 651MB 0:01:30 [7.18MB/s] [=================================================================>] 100%            
0+5209 records in
0+5209 records out
682622976 bytes (683 MB) copied, 92.9512 s, 7.3 MB/s

3. sudo dd if=file.iso |pv| sudo dd of=/dev/sdX bs=1M

* สามารถ Clone disk to disk ได้ด้วย
* dd มันอ่านข้อมูลเป็น block แล้วก้อปไปใส่อีกตัวตรงๆ
ถ้าไฟล์เล็กๆเยอะๆ dd จะไวกว่ามาก เพราะมันไม่สนจำนวนไฟล์ มันอ่านข้อมูลเป็น block จาก hdd เลย
ข้อเสียคือมันจะทำทั้งลูก ต่อให้มีข้อมูลอยู่ 1kb มันก็ทำทั้งลูกอยู่ดี

Tuesday, September 2, 2014

Format hard disk to ext3

hades@nbhqf6it081104:~$ sudo fdisk -l
[sudo] password for hades:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x82398239

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   204797951   102397952   83  Linux
/dev/sda2       204797952   208795647     1998848   82  Linux swap / Solaris
/dev/sda3   *   208795648   286920703    39062528   83  Linux
/dev/sda4       286920704   976771071   344925184   83  Linux

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x97be5b6a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63  2930277167  1465138552+  83  Linux
hades@nbhqf6it081104:~$ sudo mkfs -t ext3 /dev/sdb1

#umount /dev/sdb1