-$root_fs_uuid = find_fs_uuid_of_device($root_block_device);
-$efi_block_device = find_efi_parition($root_fs_uuid);
+my $root_block_device = undef;
+my $root_fs_uuid = undef;
+my $efi_block_device = undef;
+my $efi_fs_uuid = undef;
+
+unless (-f '/etc/fstab') {
+ $root_block_device = find_root_device();
+ system("resize2fs $root_block_device");
+ $root_fs_uuid = find_fs_uuid_of_device($root_block_device);
+ $efi_block_device = find_efi_parition($root_fs_uuid);
+ $efi_fs_uuid = find_fs_uuid_of_device($efi_block_device);
+ generate_fstab($root_fs_uuid, $efi_fs_uuid);
+ system('mount /boot/efi');
+}