From: Michael Prokop Date: Mon, 31 Aug 2009 15:58:13 +0000 (+0200) Subject: Make sure grub.conf is not a symlink but a plain file instead X-Git-Tag: v0.9.10~10 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=bb5598e02915b0a2ca484c2ed6ef6db1ecaa6885 Make sure grub.conf is not a symlink but a plain file instead --- diff --git a/debian/changelog b/debian/changelog index bd72b4a..488c1d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,12 @@ grml2usb (0.9.10) UNRELEASED; urgency=low * Support the directory where the grml2usb script resides as base directory so /usr/share/grml2usb isn't necessarily needed. Thanks for the patch to Alexander 'Leo' Bergolth ! + * Make sure grub.conf isn't a symlink but a plain file instead, + otherwise it will break on FAT16 filesystems. This works around + grub-install of (at least) Fedora 10. + Thanks for the patch to Alexander 'Leo' Bergolth ! - -- Michael Prokop Mon, 31 Aug 2009 17:38:06 +0200 + -- Michael Prokop Mon, 31 Aug 2009 17:54:59 +0200 grml2usb (0.9.9) unstable; urgency=low diff --git a/grml2usb b/grml2usb index 5457a60..3f58c83 100755 --- a/grml2usb +++ b/grml2usb @@ -1304,6 +1304,14 @@ def handle_grub1_config(grml_flavour, install_partition, grub_target, bootopt): grub1_config_file.write(generate_flavour_specific_grub1_config(grml_flavour, install_partition, bootopt)) grub1_config_file.close() + # make sure grub.conf isn't a symlink but a plain file instead, + # otherwise it will break on FAT16 filesystems + # this works around grub-install of (at least) Fedora 10 + if os.path.isfile(grub1_cfg): + grubconf = grub_target + 'grub.conf' + if not os.path.islink(grubconf): + import shutil + shutil.copyfile(grub1_cfg, grub_target + 'grub.conf') def handle_grub2_config(grml_flavour, grub_target, bootopt): """Main handler for generating grub2 configuration