cd testing
- sudo rm etc/fstab
-
sudo mkdir -p boot/efi
sudo bash -c 'echo live > etc/hostname'
tune2fs -O extents,uninit_bg,dir_index -m 0 -c 0 -i 0 media
sudo mount -o loop media mnt
sudo cp -a testing/* mnt/
- sudo touch mnt/etc/fstab
sudo rm mnt/init
sudo umount mnt
tar cf - media | pigz > m1.tgz
open(FSTAB, '>', '/etc/fstab') || die ("Can not open fstab");
print FSTAB <<EOF;
-
UUID="$root_fs_uuid" / ext4 defaults 0 0
UUID="$efi_fs_uuid" /boot/efi vfat defaults 0 0
EOF
my $efi_block_device = undef;
my $efi_fs_uuid = undef;
-unless (-f '/etc/fstab') {
+unless (-f '/boot/grub/grub.cfg') {
$root_block_device = find_root_device();
system("resize2fs $root_block_device");
$root_fs_uuid = find_fs_uuid_of_device($root_block_device);