always rewrite the filesystem when the partition table does not match
This commit is contained in:
parent
82766cebed
commit
27c561d2df
1 changed files with 2 additions and 1 deletions
|
|
@ -114,6 +114,7 @@ print_waiting "Checking partition tables"
|
|||
if [ "$parttable" != "$readtable" ];then
|
||||
print_done
|
||||
print_waiting "Partition tables do not match; partitioning disk"
|
||||
rewrite_rootfs=true
|
||||
sfdisk -q $disk << PARTTABLE
|
||||
$parttable
|
||||
PARTTABLE
|
||||
|
|
@ -125,7 +126,7 @@ fi
|
|||
print_waiting "Checking root filesystem"
|
||||
e2fsck -y $root
|
||||
fsck=$?
|
||||
if [ $fsck != 0 ] && [ $fsck != 1 ];then
|
||||
if [ $fsck != 0 ] && [ $fsck != 1 ] || [ "$rewrite_rootfs" == "true" ];then
|
||||
print_done
|
||||
print_waiting "Creating root filesystem"
|
||||
mke2fs -q -F -t ext4 $root
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue