Parted - GPT

From Skytech
Jump to: navigation, search


root@loadtest01:~# parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mktable gpt                                                      
(parted) mkpart                                                           
Partition name?  []? primary                                              
File system type?  [ext2]? linux-swap                                     
Start? 0%                                                                 
End? 100%                                                                 
(parted) print                                                            
Model: VMware Virtual disk (scsi)
Disk /dev/sdb: 17.2GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  17.2GB  17.2GB               primary

(parted) align-check                                                      
alignment type(min/opt)  [optimal]/minimal? optimal                       
Partition number? 1                                                       
1 aligned

Make a disk bootable

(parted) set                                                              
Partition number? 1                                                       
Flag to Invert? boot                                                      
New state?  [on]/off? on                                                  
(parted) p                                                                
Model: WD SSDSA2M External (scsi)
Disk /dev/sdb: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size    Type     File system  Flags
 1      1049kB  152GB  152GB   primary  ntfs         boot
 2      152GB   160GB  8002MB  primary