close

因為不明原因 rootfs 只有 68M 所以要更換rootfs 可能會空間不夠
且發現 GPT PMBR size mismatch 錯誤 故先修正錯誤再更改空間

 


root@test-desktop:/home/share/test/rk-yocto-bsp# fdisk /dev/sdc              
                                                                               
Welcome to fdisk (util-linux 2.27.1).                                          
Changes will remain in memory only, until you decide to write them.            
Be careful before using the write command.                                     
                                                                               
GPT PMBR size mismatch (395263 != 61521919) will be corrected by w(rite).      
GPT PMBR size mismatch (395263 != 61521919) will be corrected by w(rite).    
 
                                                                               
                                                     

 

使用  parted  修正


root@test-desktop:/home/share/test/rk-yocto-bsp# parted -l                   
Model: ATA WDC WD10EZEX-00B (scsi)                                             
Disk /dev/sda: 1000GB                                                          
Sector size (logical/physical): 512B/4096B                                     
Partition Table: msdos                                                         
Disk Flags:                                                                    
                                                                               
Number  Start   End     Size    Type      File system     Flags                
 1      32.3kB  107MB   107MB   primary   ext3            boot                 
……………………..                                                                               
Warning: Not all of the space available to /dev/sdc appears to be used, you can
fix the GPT to use all of the space (an extra 61126656 blocks) or continue with
the current setting?                                                           
Fix/Ignore? Fix                                                                
Model: Generic STORAGE DEVICE (scsi)                                           
Disk /dev/sdc: 31.5GB                                                          
Sector size (logical/physical): 512B/512B                                      
Partition Table: gpt                                                           
Disk Flags:                                                                    
                                                                               
Number  Start   End     Size    File system  Name     Flags                    
 1      32.8kB  4129kB  4096kB               loader1                           
 2      8389kB  12.6MB  4194kB               loader2                           
 3      12.6MB  16.8MB  4194kB               trust                             
 4      16.8MB  134MB   117MB   fat16        boot     boot, esp                
 5      134MB   202MB   68.1MB  ext4         rootfs                            
                                                                               
                                                                               
Model:  (file)                                                                 
Disk /dev/sdd: 202MB                                                           
Sector size (logical/physical): 512B/512B                                      
Partition Table: gpt                                                           
Disk Flags:                                                                    
                                                                               
Number  Start   End     Size    File system  Name     Flags                    
 1      32.8kB  4129kB  4096kB               loader1                           
 2      8389kB  12.6MB  4194kB               loader2                           
 3      12.6MB  16.8MB  4194kB               trust                             
 4      16.8MB  134MB   117MB   fat16        boot     boot, esp                
 5      134MB   202MB   68.1MB  ext4         rootfs                            
                                                                               
                                                                               
填滿分區

root@test-desktop:/media/test# parted -s /dev/sdc resizepart 5 '100%'
root@test-desktop:/media/test# resize2fs /dev/sdc5
resize2fs 1.42.13 (17-May-2015)
Please run 'e2fsck -f /dev/sdc5' first.

root@test-desktop:/media/test# e2fsck -f /dev/sdc5
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdc5: 1928/16384 files (0.9% non-contiguous), 45301/65536 blocks
root@test-desktop:/media/test# resize2fs /dev/sdc5
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on /dev/sdc5 to 30629868 (1k) blocks.
The filesystem on /dev/sdc5 is now 30629868 (1k) blocks long.

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 立你斯 的頭像
    立你斯

    立你斯學習記錄

    立你斯 發表在 痞客邦 留言(0) 人氣()