1 -- $Id: 700_install_bootblocks.lua,v 1.6 2005/02/24 23:08:04 cpressey Exp $
6 name = "install_bootblocks",
7 title = "Install Bootblocks",
9 local datasets_list = {}
12 local disk_ref = {} -- map from raw name to ref to DiskDescriptor
14 for dd in App.state.storage:get_disks() do
15 local raw_name = dd:get_raw_device_name()
17 disk_ref[raw_name] = dd
25 if dd:get_capacity() > 8192 then
29 table.insert(datasets_list, dataset)
32 local response = App.ui:present({
33 id = "install_bootstrap",
34 name = _("Install Bootblock(s)"),
36 "You may now wish to install bootblocks on one or more disks. " ..
37 "If you already have a boot manager installed, you can skip " ..
38 "this step (but you may have to configure your boot manager " ..
39 "separately.) If you installed %s on a disk other " ..
40 "than your first disk, you will need to put the bootblock " ..
41 "on at least your first disk and the %s disk.",
42 App.os.name, App.os.name),
44 "'Packet Mode' refers to using newer BIOS calls to boot " ..
45 "from a partition of the disk. It is generally not " ..
46 "required unless:\n\n" ..
47 "- your BIOS does not support legacy mode; or\n" ..
48 "- your %s primary partition resides on a " ..
49 "cylinder of the disk beyond cylinder 1024; or\n" ..
50 "- you just can't get it to boot without it.",
53 special = "bsdinstaller_install_bootstrap",
58 name = _("Disk Drive"),
59 short_desc = _("The disk on which you wish to install a bootblock"),
64 name = _("Install Bootblock?"),
65 short_desc = _("Install a bootblock on this disk"),
70 name = _("Packet mode?"),
71 short_desc = _("Select this to use 'packet mode' to boot the disk"),
79 name = _("Accept and Install Bootblocks")
83 name = _("Skip this Step")
87 datasets = datasets_list,
93 if response.action_id == "ok" then
94 local cmds = CmdChain.new()
97 for i, dataset in response.datasets do
98 if dataset.boot0cfg == "Y" then
99 dd = disk_ref[dataset.disk]
100 dd:cmds_install_bootblock(cmds,
101 (dataset.packet == "Y"))