X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/blobdiff_plain/e323215d5859a43d2b0065826982ca100e7e3729..d72e8ddda6951cdbde257806597e2cd29684d19e:/files/rc.local diff --git a/files/rc.local b/files/rc.local index 651a908..c2e649b 100755 --- a/files/rc.local +++ b/files/rc.local @@ -2,16 +2,12 @@ # [x] resize root filesystem # [x] find root fs uuid -# [ ] find boot partition -# [ ] generate fstab -# [ ] mount boot -# [ ] install grub +# [x] find boot partition +# [x] generate fstab +# [x] mount /boot/efi +# [x] install grub # [ ] extract wifi firmware -# [ ] reboots if grub or wifi firmware has changed - -my $root_block_device = undef; -my $root_fs_uuid = undef; -my $efi_block_device = undef; +# [ ] In order to change the uuid of the root filesystem, bootstrap.sh must remember it in a file within the mounted disk image. And the initrd needs to change it. sub find_root_device @@ -77,9 +73,44 @@ find_efi_parition return $efi_parition; } +sub +generate_fstab +{ + my $root_fs_uuid = shift || die; + my $efi_fs_uuid = shift || die; + + open(FSTAB, '>', '/etc/fstab') || die ("Can not open fstab"); + print FSTAB <