--grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
--grub-probe=FILE use FILE as grub-probe
--no-floppy do not probe any floppy drive
+ --allow-floppy Make the drive also bootable as floppy
+ (default for fdX devices). May break on some BIOSes.
--recheck probe a device map even if it already exists
--force install even if problems are detected
EOF
echo $1
}
+allow_floppy=""
+
# Check the arguments.
while test $# -gt 0
do
--removable)
removable=yes ;;
+ --allow-floppy)
+ allow_floppy="--allow-floppy" ;;
+
--disk-module)
if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
disk_module=`argument $option "$@"`; shift;
# Perform the platform-dependent install
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then
# Now perform the installation.
- $grub_setup ${setup_verbose} ${setup_force} --directory=${grubdir} \
+ $grub_setup ${allow_floppy} ${setup_verbose} ${setup_force} --directory=${grubdir} \
--device-map=${device_map} ${install_device} || exit 1
elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ]; then
if [ x"$update_nvram" = xyes ]; then
setup (const char *dir,
const char *boot_file, const char *core_file,
const char *root, const char *dest, int must_embed, int force,
- int fs_probe)
+ int fs_probe, int allow_floppy)
{
char *boot_path, *core_path, *core_path_dev, *core_path_dev_full;
char *boot_img, *core_img;
/* If DEST_DRIVE is a hard disk, enable the workaround, which is
for buggy BIOSes which don't pass boot drive correctly. Instead,
they pass 0x00 or 0x01 even when booted from 0x80. */
- if (!grub_util_biosdisk_is_floppy (dest_dev->disk))
+ if (!allow_floppy && !grub_util_biosdisk_is_floppy (dest_dev->disk))
/* Replace the jmp (2 bytes) with double nop's. */
*boot_drive_check = 0x9090;
}
N_("Do not probe for filesystems in DEVICE"), 0},
{"verbose", 'v', 0, 0,
N_("Print verbose messages."), 0},
+ {"allow-floppy", 'a', 0, 0,
+ N_("Make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes."), 0},
+
{ 0, 0, 0, 0, 0, 0 }
};
char *root_dev;
int force;
int fs_probe;
+ int allow_floppy;
char *device;
};
switch (key)
{
+ case 'a':
+ arguments->allow_floppy = 1;
+ break;
+
case 'b':
if (arguments->boot_file)
free (arguments->boot_file);
arguments.boot_file ? : DEFAULT_BOOT_FILE,
arguments.core_file ? : DEFAULT_CORE_FILE,
root_dev, grub_util_get_grub_dev (devicelist[i]), 1,
- arguments.force, arguments.fs_probe);
+ arguments.force, arguments.fs_probe,
+ arguments.allow_floppy);
}
}
else
setup (arguments.dir ? : DEFAULT_DIRECTORY,
arguments.boot_file ? : DEFAULT_BOOT_FILE,
arguments.core_file ? : DEFAULT_CORE_FILE,
- root_dev, dest_dev, must_embed, arguments.force, arguments.fs_probe);
+ root_dev, dest_dev, must_embed, arguments.force,
+ arguments.fs_probe, arguments.allow_floppy);
/* Free resources. */
grub_fini_all ();