summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/ro.po
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/share/po/ro.po')
-rw-r--r--perl-install/share/po/ro.po205
1 files changed, 103 insertions, 102 deletions
diff --git a/perl-install/share/po/ro.po b/perl-install/share/po/ro.po
index 43e92b28e..9fecfd9ee 100644
--- a/perl-install/share/po/ro.po
+++ b/perl-install/share/po/ro.po
@@ -8,7 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: DrakX 7.1\n"
-"POT-Creation-Date: 2005-11-30 17:38+0800\n"
+"POT-Creation-Date: 2005-12-04 12:48+0800\n"
"PO-Revision-Date: 2003-09-11 18:11+0200\n"
"Last-Translator: Ovidiu Constantin <ovidiu.constantin@gmx.net>\n"
"Language-Team: Romanian Translators for Free Software <rtfs-project@lists."
@@ -65,7 +65,7 @@ msgid ""
"plug the key again, and launch Mandriva Move again."
msgstr ""
-#: ../move/move.pm:468 help.pm:409 install_steps_interactive.pm:1334
+#: ../move/move.pm:468 help.pm:409 install_steps_interactive.pm:1331
#, c-format
msgid "Reboot"
msgstr "Repornire sistem"
@@ -437,7 +437,7 @@ msgid "Custom"
msgstr "Personalizat"
#: Xconfig/main.pm:127 diskdrake/dav.pm:26 help.pm:14
-#: install_steps_interactive.pm:86 install_steps_interactive.pm:1334
+#: install_steps_interactive.pm:86 install_steps_interactive.pm:1331
#: printer/printerdrake.pm:882 printer/printerdrake.pm:899
#: printer/printerdrake.pm:4523 printer/printerdrake.pm:4987
#: standalone/drakhosts:263 standalone/drakroam:230 standalone/draksplash:93
@@ -616,7 +616,7 @@ msgstr "OK"
#: Xconfig/resolution_and_depth.pm:373 diskdrake/smbnfs_gtk.pm:80 help.pm:89
#: help.pm:444 install_steps_gtk.pm:455 install_steps_interactive.pm:431
-#: install_steps_interactive.pm:842 interactive.pm:120 interactive.pm:437
+#: install_steps_interactive.pm:839 interactive.pm:120 interactive.pm:437
#: interactive/http.pm:104 interactive/http.pm:160 interactive/newt.pm:318
#: interactive/stdio.pm:39 interactive/stdio.pm:142
#: printer/printerdrake.pm:3859 standalone/drakautoinst:215
@@ -1293,7 +1293,7 @@ msgstr "Foloseşte implicit Unicode "
msgid "All languages"
msgstr "Toate limbile"
-#: any.pm:842 help.pm:566 help.pm:855 install_steps_interactive.pm:963
+#: any.pm:842 help.pm:566 help.pm:855 install_steps_interactive.pm:960
#, c-format
msgid "Country / Region"
msgstr "Ţara"
@@ -2034,10 +2034,13 @@ msgstr "Opţiuni: %s"
#: diskdrake/hd_gtk.pm:52 diskdrake/interactive.pm:292
#: diskdrake/smbnfs_gtk.pm:21 install_interactive.pm:62
-#: install_steps_interactive.pm:342
+#: install_interactive.pm:216 install_interactive.pm:222
+#: install_interactive.pm:275 install_interactive.pm:280
+#: install_steps_interactive.pm:278 install_steps_interactive.pm:342
+#: steps.pm:21
#, c-format
-msgid "Partitionning"
-msgstr ""
+msgid "Partitioning"
+msgstr "Partiţionare"
#: diskdrake/hd_gtk.pm:92
#, c-format
@@ -2949,7 +2952,7 @@ msgstr "Instalarea pachetului %s"
msgid "Mandatory package %s is missing"
msgstr "Pachetul obligatoriu %s lipseşte"
-#: do_pkgs.pm:35 harddrake/sound.pm:275 install_steps_interactive.pm:1319
+#: do_pkgs.pm:35 harddrake/sound.pm:275 install_steps_interactive.pm:1316
#: keyboard.pm:388 network/ndiswrapper.pm:95 network/netconnect.pm:472
#: printer/printerdrake.pm:1416 printer/printerdrake.pm:2494
#: printer/printerdrake.pm:2609 printer/printerdrake.pm:2930
@@ -3032,37 +3035,37 @@ msgstr "eroare la demontarea %s: %s"
msgid "Enabling swap partition %s"
msgstr "Activez partiţia swap %s"
-#: fs/mount_options.pm:112
+#: fs/mount_options.pm:113
#, fuzzy, c-format
msgid "Use an encrypted file system"
msgstr ""
"Nu puteţi monta un sistem de fişiere criptat pentru punctul de montare %s"
-#: fs/mount_options.pm:114
+#: fs/mount_options.pm:115
#, c-format
msgid "Enable group disk quota accounting and optionally enforce limits"
msgstr ""
-#: fs/mount_options.pm:116
+#: fs/mount_options.pm:117
#, c-format
msgid ""
"Do not update inode access times on this file system\n"
"(e.g, for faster access on the news spool to speed up news servers)."
msgstr ""
-#: fs/mount_options.pm:119
+#: fs/mount_options.pm:120
#, c-format
msgid ""
"Can only be mounted explicitly (i.e.,\n"
"the -a option will not cause the file system to be mounted)."
msgstr ""
-#: fs/mount_options.pm:122
+#: fs/mount_options.pm:123
#, c-format
msgid "Do not interpret character or block special devices on the file system."
msgstr ""
-#: fs/mount_options.pm:124
+#: fs/mount_options.pm:125
#, c-format
msgid ""
"Do not allow execution of any binaries on the mounted\n"
@@ -3070,7 +3073,7 @@ msgid ""
"containing binaries for architectures other than its own."
msgstr ""
-#: fs/mount_options.pm:128
+#: fs/mount_options.pm:129
#, c-format
msgid ""
"Do not allow set-user-identifier or set-group-identifier\n"
@@ -3078,32 +3081,37 @@ msgid ""
"have suidperl(1) installed.)"
msgstr ""
-#: fs/mount_options.pm:132
+#: fs/mount_options.pm:133
#, c-format
msgid "Mount the file system read-only."
msgstr ""
-#: fs/mount_options.pm:134
+#: fs/mount_options.pm:135
#, c-format
msgid "All I/O to the file system should be done synchronously."
msgstr ""
-#: fs/mount_options.pm:138
+#: fs/mount_options.pm:139
#, c-format
msgid "Allow an ordinary user to mount the file system."
msgstr ""
-#: fs/mount_options.pm:140
+#: fs/mount_options.pm:141
#, c-format
msgid "Enable user disk quota accounting, and optionally enforce limits"
msgstr ""
-#: fs/mount_options.pm:142
+#: fs/mount_options.pm:143
+#, c-format
+msgid "Support user. extended attributes"
+msgstr ""
+
+#: fs/mount_options.pm:145
#, c-format
msgid "Give write access to ordinary users"
msgstr ""
-#: fs/mount_options.pm:144
+#: fs/mount_options.pm:147
#, c-format
msgid "Give read-only access to ordinary users"
msgstr ""
@@ -3163,7 +3171,7 @@ msgstr "Punctele de montare au trebui să conţină doar caractere alfanumerice"
msgid "There is already a partition with mount point %s\n"
msgstr "Există deja o partiţie cu punctul de montare %s!\n"
-#: fsedit.pm:386
+#: fsedit.pm:388
#, c-format
msgid ""
"You've selected a software RAID partition as root (/).\n"
@@ -3174,14 +3182,14 @@ msgstr ""
"Nici un gestionar de demaraj nu e capabil să folosească aceasta fără\n"
"o partiţie /boot. Adăugaţi deci o partiţie /boot"
-#: fsedit.pm:391
+#: fsedit.pm:394
#, fuzzy, c-format
msgid ""
"You can not use the LVM Logical Volume for mount point %s since it spans "
"physical volumes"
msgstr "Nu puteţi folosi volumul logic LVM pentru punctul de montare %s"
-#: fsedit.pm:393
+#: fsedit.pm:396
#, fuzzy, c-format
msgid ""
"You've selected the LVM Logical Volume as root (/).\n"
@@ -3193,12 +3201,12 @@ msgstr ""
"Nici un gestionar de demaraj nu e capabil să folosească aceasta fără\n"
"o partiţie /boot. Adăugaţi deci o partiţie /boot"
-#: fsedit.pm:397 fsedit.pm:399
+#: fsedit.pm:400 fsedit.pm:402
#, c-format
msgid "This directory should remain within the root filesystem"
msgstr "Acest director ar trebui să rămână în sistemul de fişiere al rădăcinii"
-#: fsedit.pm:401 fsedit.pm:403
+#: fsedit.pm:404 fsedit.pm:406
#, c-format
msgid ""
"You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount "
@@ -3207,18 +3215,18 @@ msgstr ""
"Aveţi nevoie de un sistem de fişiere serios (ext2/ext3, reiserfs, xfs sau "
"jfs) pentru acest punct de montare.\n"
-#: fsedit.pm:405
+#: fsedit.pm:408
#, c-format
msgid "You can not use an encrypted file system for mount point %s"
msgstr ""
"Nu puteţi monta un sistem de fişiere criptat pentru punctul de montare %s"
-#: fsedit.pm:466
+#: fsedit.pm:469
#, c-format
msgid "Not enough free space for auto-allocating"
msgstr "Spaţiu pe disc insuficient pentru auto-alocare"
-#: fsedit.pm:468
+#: fsedit.pm:471
#, c-format
msgid "Nothing to do"
msgstr "Nimic de făcut"
@@ -3349,7 +3357,7 @@ msgid "AGP controllers"
msgstr "Controllere AGP"
#: harddrake/data.pm:324 help.pm:186 help.pm:855
-#: install_steps_interactive.pm:995
+#: install_steps_interactive.pm:992
#, c-format
msgid "Printer"
msgstr "Imprimantă"
@@ -3416,7 +3424,7 @@ msgid "Bridges and system controllers"
msgstr "Punţi şi controllere de sistem"
#: harddrake/data.pm:449 help.pm:855 install_steps_interactive.pm:119
-#: install_steps_interactive.pm:955 standalone/finish-install:37
+#: install_steps_interactive.pm:952 standalone/finish-install:37
#: standalone/keyboarddrake:29
#, c-format
msgid "Keyboard"
@@ -3427,7 +3435,7 @@ msgstr "Tastatură"
msgid "Tablet and touchscreen"
msgstr ""
-#: harddrake/data.pm:471 help.pm:855 install_steps_interactive.pm:988
+#: harddrake/data.pm:471 help.pm:855 install_steps_interactive.pm:985
#, c-format
msgid "Mouse"
msgstr "Maus"
@@ -4020,7 +4028,7 @@ msgid ""
"server which can be used by other machines on your local network as well."
msgstr ""
-#: help.pm:217 install_steps_interactive.pm:890
+#: help.pm:217 install_steps_interactive.pm:887
#, c-format
msgid "Hardware clock set to GMT"
msgstr "Ceas hardware fixat la GMT"
@@ -4283,17 +4291,17 @@ msgstr ""
msgid "Generate auto-install floppy"
msgstr "generează dischetă de autoinstalare"
-#: help.pm:409 install_steps_interactive.pm:1345
+#: help.pm:409 install_steps_interactive.pm:1342
#, c-format
msgid "Replay"
msgstr ""
-#: help.pm:409 install_steps_interactive.pm:1345
+#: help.pm:409 install_steps_interactive.pm:1342
#, c-format
msgid "Automated"
msgstr "Automatizat"
-#: help.pm:409 install_steps_interactive.pm:1348
+#: help.pm:409 install_steps_interactive.pm:1345
#, c-format
msgid "Save packages selection"
msgstr "Înregistrare selecţie pachete"
@@ -4798,8 +4806,8 @@ msgid ""
"system, you can click on the button and choose a different driver."
msgstr ""
-#: help.pm:788 help.pm:855 install_steps_interactive.pm:1022
-#: install_steps_interactive.pm:1039
+#: help.pm:788 help.pm:855 install_steps_interactive.pm:1019
+#: install_steps_interactive.pm:1036
#, c-format
msgid "Sound card"
msgstr "Placă de sunet"
@@ -4875,13 +4883,13 @@ msgid ""
"idea to review this setup."
msgstr ""
-#: help.pm:855 install_steps_interactive.pm:886
-#: install_steps_interactive.pm:981 standalone/drakclock:100
+#: help.pm:855 install_steps_interactive.pm:883
+#: install_steps_interactive.pm:978 standalone/drakclock:100
#, c-format
msgid "Timezone"
msgstr "Zona de timp"
-#: help.pm:855 install_steps_interactive.pm:1055
+#: help.pm:855 install_steps_interactive.pm:1052
#, c-format
msgid "TV card"
msgstr "Placă TV"
@@ -4896,33 +4904,33 @@ msgstr "Placă ISDN"
msgid "Graphical Interface"
msgstr "Interfaţă grafică"
-#: help.pm:855 install_any.pm:1733 install_steps_interactive.pm:1073
+#: help.pm:855 install_any.pm:1733 install_steps_interactive.pm:1070
#: standalone/drakbackup:2040
#, c-format
msgid "Network"
msgstr "Reţea"
-#: help.pm:855 install_steps_interactive.pm:1085
+#: help.pm:855 install_steps_interactive.pm:1082
#, fuzzy, c-format
msgid "Proxies"
msgstr "Profiluri"
-#: help.pm:855 install_steps_interactive.pm:1096
+#: help.pm:855 install_steps_interactive.pm:1093
#, c-format
msgid "Security Level"
msgstr "Nivel de securitate"
-#: help.pm:855 install_steps_interactive.pm:1110 network/drakfirewall.pm:189
+#: help.pm:855 install_steps_interactive.pm:1107 network/drakfirewall.pm:189
#, c-format
msgid "Firewall"
msgstr "Firewall"
-#: help.pm:855 install_steps_interactive.pm:1126
+#: help.pm:855 install_steps_interactive.pm:1123
#, c-format
msgid "Bootloader"
msgstr "Gestionar de demarare"
-#: help.pm:855 install_steps_interactive.pm:1139 services.pm:114
+#: help.pm:855 install_steps_interactive.pm:1136 services.pm:114
#: services.pm:157 services.pm:193
#, c-format
msgid "Services"
@@ -5396,13 +5404,6 @@ msgid "You have more than one hard drive, which one do you install linux on?"
msgstr ""
"Aveţi mai multe discuri fixe, pe care din ele doriţi să instalaţi Linux?"
-#: install_interactive.pm:216 install_interactive.pm:222
-#: install_interactive.pm:275 install_interactive.pm:280
-#: install_steps_interactive.pm:278 steps.pm:21
-#, c-format
-msgid "Partitioning"
-msgstr "Partiţionare"
-
#: install_interactive.pm:221
#, c-format
msgid "ALL existing partitions and their data will be lost on drive %s"
@@ -5669,7 +5670,7 @@ msgstr ""
"media/main/*.rpm\" pentru a verifica cdrom-ul pe un\n"
"sistem instalat.\n"
-#: install_steps_auto_install.pm:75 install_steps_stdio.pm:27
+#: install_steps_auto_install.pm:68 install_steps_stdio.pm:27
#, c-format
msgid "Entering step `%s'\n"
msgstr "Începe etapa `%s'\n"
@@ -5870,13 +5871,13 @@ msgstr "A fost o eroare la instalarea pachetelor:"
msgid "Go on anyway?"
msgstr "Să continui totuşi?"
-#: install_steps_gtk.pm:582 install_steps_interactive.pm:941 steps.pm:30
+#: install_steps_gtk.pm:582 install_steps_interactive.pm:938 steps.pm:30
#, c-format
msgid "Summary"
msgstr "Sumar"
-#: install_steps_gtk.pm:605 install_steps_interactive.pm:937
-#: install_steps_interactive.pm:1086
+#: install_steps_gtk.pm:605 install_steps_interactive.pm:934
+#: install_steps_interactive.pm:1083
#, c-format
msgid "not configured"
msgstr "neconfigurat"
@@ -6059,7 +6060,7 @@ msgstr "Căutare pachete disponibile şi reconstrucţie bază de date RPM..."
msgid "Looking for available packages..."
msgstr "Căutarea pachetelor disponibile"
-#: install_steps_interactive.pm:430 install_steps_interactive.pm:841
+#: install_steps_interactive.pm:430 install_steps_interactive.pm:838
#, c-format
msgid "Choose a mirror from which to get the packages"
msgstr "Alegeţi o oglindă de la care să descărcaţi pachetele"
@@ -6169,12 +6170,12 @@ msgstr "Configuraţie post-install"
msgid "Please ensure the Update Modules media is in drive %s"
msgstr ""
-#: install_steps_interactive.pm:814
+#: install_steps_interactive.pm:811
#, c-format
msgid "Updates"
msgstr "Actualizări"
-#: install_steps_interactive.pm:815
+#: install_steps_interactive.pm:812
#, c-format
msgid ""
"You now have the opportunity to download updated packages. These packages\n"
@@ -6187,7 +6188,7 @@ msgid ""
"Do you want to install the updates?"
msgstr ""
-#: install_steps_interactive.pm:836
+#: install_steps_interactive.pm:833
#, c-format
msgid ""
"Contacting Mandriva Linux web site to get the list of available mirrors..."
@@ -6195,138 +6196,138 @@ msgstr ""
"Contactez situl Mandriva Linux pentru obţinerea listei oglinzilor "
"disponibile..."
-#: install_steps_interactive.pm:855
+#: install_steps_interactive.pm:852
#, c-format
msgid "Contacting the mirror to get the list of available packages..."
msgstr ""
"Contactez serverul oglindă pentru preluarea listei pachetelor disponibile..."
-#: install_steps_interactive.pm:859
+#: install_steps_interactive.pm:856
#, c-format
msgid "Unable to contact mirror %s"
msgstr "Nu pot executa serverul de oglindire %s"
-#: install_steps_interactive.pm:859
+#: install_steps_interactive.pm:856
#, c-format
msgid "Would you like to try again?"
msgstr "Doriţi să încercaţi din nou?"
-#: install_steps_interactive.pm:886 standalone/drakclock:45
+#: install_steps_interactive.pm:883 standalone/drakclock:45
#, c-format
msgid "Which is your timezone?"
msgstr "Care este zona dvs. de timp?"
-#: install_steps_interactive.pm:891
+#: install_steps_interactive.pm:888
#, c-format
msgid "Automatic time synchronization (using NTP)"
msgstr "Sincronizare automată de timp (folosind NTP)"
-#: install_steps_interactive.pm:899
+#: install_steps_interactive.pm:896
#, c-format
msgid "NTP Server"
msgstr "Server NTP"
-#: install_steps_interactive.pm:954 install_steps_interactive.pm:962
-#: install_steps_interactive.pm:980 install_steps_interactive.pm:987
-#: install_steps_interactive.pm:1138 services.pm:133
+#: install_steps_interactive.pm:951 install_steps_interactive.pm:959
+#: install_steps_interactive.pm:977 install_steps_interactive.pm:984
+#: install_steps_interactive.pm:1135 services.pm:133
#: standalone/drakbackup:1585
#, c-format
msgid "System"
msgstr "Sistem"
-#: install_steps_interactive.pm:994 install_steps_interactive.pm:1021
-#: install_steps_interactive.pm:1038 install_steps_interactive.pm:1054
-#: install_steps_interactive.pm:1065
+#: install_steps_interactive.pm:991 install_steps_interactive.pm:1018
+#: install_steps_interactive.pm:1035 install_steps_interactive.pm:1051
+#: install_steps_interactive.pm:1062
#, c-format
msgid "Hardware"
msgstr "Echipamente"
-#: install_steps_interactive.pm:1000 install_steps_interactive.pm:1009
+#: install_steps_interactive.pm:997 install_steps_interactive.pm:1006
#, c-format
msgid "Remote CUPS server"
msgstr "Coadă imprimare CUPS la distanţă"
-#: install_steps_interactive.pm:1000
+#: install_steps_interactive.pm:997
#, c-format
msgid "No printer"
msgstr "Fără imprimantă"
-#: install_steps_interactive.pm:1042
+#: install_steps_interactive.pm:1039
#, c-format
msgid "Do you have an ISA sound card?"
msgstr "Aveţi o placă de sunet ISA?"
-#: install_steps_interactive.pm:1044
+#: install_steps_interactive.pm:1041
#, c-format
msgid ""
"Run \"alsaconf\" or \"sndconfig\" after installation to configure your sound "
"card"
msgstr ""
-#: install_steps_interactive.pm:1046
+#: install_steps_interactive.pm:1043
#, c-format
msgid "No sound card detected. Try \"harddrake\" after installation"
msgstr ""
"Nu am detectat nici o placă de sunet. Încercaţi \"harddrake\" după instalare"
-#: install_steps_interactive.pm:1066
+#: install_steps_interactive.pm:1063
#, c-format
msgid "Graphical interface"
msgstr "Interfaţa grafică"
-#: install_steps_interactive.pm:1072 install_steps_interactive.pm:1084
+#: install_steps_interactive.pm:1069 install_steps_interactive.pm:1081
#, c-format
msgid "Network & Internet"
msgstr "Reţea şi Internet"
-#: install_steps_interactive.pm:1086
+#: install_steps_interactive.pm:1083
#, fuzzy, c-format
msgid "configured"
msgstr "Reconfigurează"
-#: install_steps_interactive.pm:1095 install_steps_interactive.pm:1109
+#: install_steps_interactive.pm:1092 install_steps_interactive.pm:1106
#: security/level.pm:55 steps.pm:20
#, c-format
msgid "Security"
msgstr "Securitate"
-#: install_steps_interactive.pm:1114
+#: install_steps_interactive.pm:1111
#, c-format
msgid "activated"
msgstr "activat"
-#: install_steps_interactive.pm:1114
+#: install_steps_interactive.pm:1111
#, c-format
msgid "disabled"
msgstr "dezactivat"
-#: install_steps_interactive.pm:1125
+#: install_steps_interactive.pm:1122
#, c-format
msgid "Boot"
msgstr "Demarare"
#. -PO: example: lilo-graphic on /dev/hda1
-#: install_steps_interactive.pm:1129 printer/printerdrake.pm:961
+#: install_steps_interactive.pm:1126 printer/printerdrake.pm:961
#, c-format
msgid "%s on %s"
msgstr "%s pe %s"
-#: install_steps_interactive.pm:1143 services.pm:175
+#: install_steps_interactive.pm:1140 services.pm:175
#, c-format
msgid "Services: %d activated for %d registered"
msgstr "Servicii: %d activate pentru %d înregistrate"
-#: install_steps_interactive.pm:1155
+#: install_steps_interactive.pm:1152
#, c-format
msgid "You have not configured X. Are you sure you really want this?"
msgstr ""
-#: install_steps_interactive.pm:1236
+#: install_steps_interactive.pm:1233
#, c-format
msgid "Preparing bootloader..."
msgstr "Pegătirea gestionalului de demaraj..."
-#: install_steps_interactive.pm:1246
+#: install_steps_interactive.pm:1243
#, c-format
msgid ""
"You appear to have an OldWorld or Unknown machine, the yaboot bootloader "
@@ -6335,12 +6336,12 @@ msgid ""
"root fs is: root=%s"
msgstr ""
-#: install_steps_interactive.pm:1252
+#: install_steps_interactive.pm:1249
#, c-format
msgid "Do you want to use aboot?"
msgstr "Vreţi să folosiţi aboot?"
-#: install_steps_interactive.pm:1255
+#: install_steps_interactive.pm:1252
#, c-format
msgid ""
"Error installing aboot, \n"
@@ -6349,29 +6350,29 @@ msgstr ""
"Eroare la instalrea lui aboot,\n"
"să încerc să forţaţi instalarea chiar dacă aceasta distruge prima partiţie ?"
-#: install_steps_interactive.pm:1272
+#: install_steps_interactive.pm:1269
#, c-format
msgid ""
"In this security level, access to the files in the Windows partition is "
"restricted to the administrator."
msgstr ""
-#: install_steps_interactive.pm:1301 standalone/drakautoinst:76
+#: install_steps_interactive.pm:1298 standalone/drakautoinst:76
#, c-format
msgid "Insert a blank floppy in drive %s"
msgstr "Introduceţi o dischetă goală în perifericul %s"
-#: install_steps_interactive.pm:1306
+#: install_steps_interactive.pm:1303
#, fuzzy, c-format
msgid "Please insert another floppy for drivers disk"
msgstr "Introduceţi discheta de pornire (de Boot) folosită în perifericul %s"
-#: install_steps_interactive.pm:1308
+#: install_steps_interactive.pm:1305
#, c-format
msgid "Creating auto install floppy..."
msgstr "Creez discheta de autoinstalare..."
-#: install_steps_interactive.pm:1320
+#: install_steps_interactive.pm:1317
#, c-format
msgid ""
"Some steps are not completed.\n"
@@ -6382,19 +6383,19 @@ msgstr ""
"\n"
"Chiar vreţi să abandonaţi acum?"
-#: install_steps_interactive.pm:1330 standalone/draksambashare:422
+#: install_steps_interactive.pm:1327 standalone/draksambashare:422
#: standalone/draksambashare:529 standalone/drakups:120 standalone/drakups:159
#: standalone/logdrake:452 standalone/logdrake:458
#, c-format
msgid "Congratulations"
msgstr "Felicitări"
-#: install_steps_interactive.pm:1338 install_steps_interactive.pm:1339
+#: install_steps_interactive.pm:1335 install_steps_interactive.pm:1336
#, c-format
msgid "Generate auto install floppy"
msgstr "Generare dischetă de autoinstalare"
-#: install_steps_interactive.pm:1340
+#: install_steps_interactive.pm:1337
#, c-format
msgid ""
"The auto install can be fully automated if wanted,\n"
id='n1158' href='#n1158'>1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229
package bootloader; # $Id$

use diagnostics;
use strict;
use vars qw(%vga_modes);

#-######################################################################################
#- misc imports
#-######################################################################################
use common;
use partition_table qw(:types);
use log;
use any;
use fsedit;
use devices;
use loopback;
use detect_devices;
use partition_table::raw;
use run_program;
use modules;


our %vga_modes = (
'ask' => "Ask at boot",
'normal' => "Normal",
'0x0f01' => "80x50",
'0x0f02' => "80x43",
'0x0f03' => "80x28",
'0x0f05' => "80x30",
'0x0f06' => "80x34",
'0x0f07' => "80x60",
'0x0122' => "100x30",
 785 => "640x480 in 16 bits (FrameBuffer only)",
 788 => "800x600 in 16 bits (FrameBuffer only)",
 791 => "1024x768 in 16 bits (FrameBuffer only)",
 794 => "1280x1024 in 16 bits (FrameBuffer only)",
);

#-#####################################################################################
#- Functions
#-#####################################################################################

sub get {
    my ($kernel, $bootloader) = @_;
    $_->{kernel_or_dev} && $_->{kernel_or_dev} eq $kernel and return $_ foreach @{$bootloader->{entries}};
    undef;
}
sub get_label {
    my ($label, $bootloader) = @_;
    $_->{label} && lc(make_label_lilo_compatible($_->{label})) eq lc(make_label_lilo_compatible($label)) and return $_ foreach @{$bootloader->{entries}};
    undef;
}

sub mkinitrd {
    my ($kernelVersion, $initrdImage, $o_vga) = @_;

    $::testing || -e "$::prefix/$initrdImage" and return 1;

    my $loop_boot = loopback::prepare_boot();

    my $o_resolution = $o_vga && do {
	require Xconfig::resolution_and_depth;
	my $res = Xconfig::resolution_and_depth::from_bios($o_vga);
	$res && $res->{X};
    };
    modules::load('loop');
    if (!run_program::rooted($::prefix, "mkinitrd", "-v", "-f", $initrdImage, "--ifneeded", $kernelVersion, if_($o_resolution, '--splash' => $o_resolution))) {
	unlink("$::prefix/$initrdImage");
	die "mkinitrd failed";
    }
    loopback::save_boot($loop_boot);

    -e "$::prefix/$initrdImage";
}

sub read() {
    my $file = sprintf("/etc/%s.conf", arch() =~ /sparc/ ? 'silo' : arch() =~ /ppc/ ? 'yaboot' : 'lilo');
    my $bootloader = $file =~ /lilo/ && detect_bootloader() =~ /GRUB/ ? read_grub() : read_lilo($file);
    if (my $default = find { $_ && $_->{append} } get_label($bootloader->{default}, $bootloader), @{$bootloader->{entries}}) {
	$bootloader->{perImageAppend} ||= $default->{append};
    }
    $bootloader;
}

sub read_grub() {
    my $global = 1;
    my ($e, %b);

    my %mnt_pts = (
	"/dev/" . devices::from_devfs(readlink('/dev/root')) => "/", #- is this useful???
	map { (split)[0..1] } cat_("/proc/mounts")
    );

    foreach (cat_("$::prefix/boot/grub/menu.lst")) {
        chomp;
	s/^\s*//; s/\s*$//;
        next if /^#/ || /^$/;
	my ($keyword, $v) = split(' ', $_, 2) or
	  warn qq(unknown line in /boot/grub/menu.lst: "$_"\n), next;

        if ($keyword eq 'title') {
            push @{$b{entries}}, $e = { label => $v };
            $global = 0;
        } elsif ($global) {
            $b{$keyword} = $v eq '' ? 1 : ungrubify($v, \%mnt_pts);
        } else {
            $e->{root} = $1 if $v =~ s/root=(\S*)\s*//;
            if ($keyword eq 'kernel') {
                $e->{type} = 'image';
                (my $kernel, $e->{append}) = split(' ', $v, 2);
		$e->{kernel_or_dev} = ungrubify($kernel, \%mnt_pts);
            } elsif ($keyword eq 'root') {
                $e->{type} = 'other';
		if ($v =~ /,/) {
		    $e->{table} = grub2dev($v, 1);
		} else {
		    $e->{unsafe} = 1;
		}
                $e->{kernel_or_dev} = grub2dev($v);
                $e->{append} = "";
            } elsif ($keyword eq 'initrd') {
                $e->{initrd} = ungrubify($v, \%mnt_pts);
            }
        }
    }
    # Generating /etc/lilo.conf require having a boot device:
    foreach (cat_("$::prefix/boot/grub/install.sh")) {
        $b{boot} = grub2dev($1) if /\s+d\s+(\(.*?\))/;
    }

    #- sanitize
    foreach (@{$b{entries}}) {
	my ($vga, $other) = partition { /^vga=/ } split(' ', $_->{append});
	if ($vga) {
	    $_->{vga} = $vga->[0] =~ /vga=(.*)/ && $1;
	    $_->{append} = join(' ', @$other);
	}
    }

    $b{nowarn} = 1;
    # handle broken installkernel -r:
    $b{default} = min($b{default}, scalar(@{$b{entries}}) - 1);
    $b{default} = $b{entries}[$b{default}]{label};

    \%b;
}

sub read_lilo {
    my ($file) = @_;
    my $global = 1;
    my ($e, $v);
    my %b;
    foreach (cat_("$::prefix$file")) {
	next if /^\s*#/ || /^\s*$/;
	($_, $v) = /^\s*([^=\s]+)\s*(?:=\s*(.*?))?\s*$/ or log::l("unknown line in $file: $_"), next;

	if (/^(image|other)$/) {
	    if (arch() =~ /ppc/) {
		$v =~ s/hd:\d+,//g;
	    }   
	    push @{$b{entries}}, $e = { type => $_, kernel_or_dev => $v };
	    $global = 0;
	} elsif ($global) {
	    if ($_ eq 'disk' && $v =~ /(\S+)\s+bios\s*=\s*(\S+)/) {
		$b{bios}{$1} = $2;
	    } elsif ($_ eq 'bios') {
		$b{bios}{$b{disk}} = $v;
	    } elsif ($_ eq 'init-message') {
		$v =~ s/\\n//g; 
		$v =~ s/"//g;
		$b{'init-message'} = $v;
	    } else {
		$b{$_} = $v eq '' ? 1 : $v;
	    }
	} else {
	    if ((/map-drive/ .. /to/) && /to/) {
		$e->{mapdrive}{$e->{'map-drive'}} = $v;
	    } else {
		if (arch() =~ /ppc/) {
		    $v =~ s/hd:\d+,//g;
		    $v =~ s/"//g;
		}
		$e->{$_} = $v || 1 if !member($_, 'read-only');
	    }
	}
    }
    if (arch() !~ /ppc/) {
	delete $b{timeout} unless $b{prompt};
	sub remove_quotes_and_spaces {
	    local ($_) = @_;
	    s/^\s*//; s/\s*$//;
	    s/^"(.*?)"$/$1/;
	    $_;
	}
	$_->{append} = remove_quotes_and_spaces($_->{append}) foreach \%b, @{$b{entries}};
	$_->{label}  = remove_quotes_and_spaces($_->{label})  foreach @{$b{entries}};
	$b{default} = remove_quotes_and_spaces($b{default}) if $b{default};
	$b{timeout} = $b{timeout} / 10 if $b{timeout};
	delete $b{message};
    }

    #- cleanup duplicate labels (in case file is corrupted)
    my %seen;
    @{$b{entries}} = grep { !$seen{$_->{label}}++ } @{$b{entries}};

    \%b;
}

sub suggest_onmbr {
    my ($hd) = @_;
    
    my ($onmbr, $unsafe) = (1, 1);

    if (my $type = partition_table::raw::typeOfMBR($hd->{device})) {
	if (member($type, qw(dos dummy empty))) {
	    $unsafe = 0;
	} elsif (!member($type, qw(lilo grub))) {
	    $onmbr = 0;
	}
	log::l("bootloader::suggest_onmbr: type $type, onmbr $onmbr, unsafe $unsafe");
    }
    ($onmbr, $unsafe);
}

sub mixed_kind_of_disks {
    my ($hds) = @_;

    (find { $_->{device} =~ /^sd/ } @$hds) && (find { $_->{device} =~ /^hd/ } @$hds) ||
      (find { $_->{device} =~ /^hd[e-z]/ } @$hds) && (find { $_->{device} =~ /^hd[a-d]/ } @$hds);
}

sub same_entries {
    my ($a, $b) = @_;

    foreach (uniq(keys %$a, keys %$b)) {
	if ($_ eq 'label') {
	    next;
	} elsif ($_ eq 'append') {
	    next if join(' ', sort split(' ', $a->{$_})) eq join(' ', sort split(' ', $b->{$_}))
	} else {
	    next if $a->{$_} eq $b->{$_};

	    my ($inode_a, $inode_b) = map { (stat "$::prefix$_")[1] } ($a->{$_}, $b->{$_});
	    next if $inode_a && $inode_b && $inode_a == $inode_b;
	}

	log::l("entries $a->{label} don't have same $_: $a->{$_} ne $b->{$_}");
	return;
    }
    1;
}

sub add_entry {
    my ($bootloader, $v) = @_;

    my $to_add = $v;
    foreach my $label ($v->{label}, map { 'old' . $_ . '_' . $v->{label} } ('', 2..10)) {
	my $conflicting = get_label($label, $bootloader);

	$to_add->{label} = $label;

	if ($conflicting) {
	    #- replacing $conflicting with $to_add
	    @{$bootloader->{entries}} = map { $_ == $conflicting ? $to_add : $_ } @{$bootloader->{entries}};
	} else {
	    #- we have found an unused label
	    push @{$bootloader->{entries}}, $to_add;
	}

	if (!$conflicting || same_entries($conflicting, $to_add)) {
	    log::l("current labels: " . join(" ", map { $_->{label} } @{$bootloader->{entries}}));
	    return $v;
	}
	$to_add = $conflicting;
    }
    die 'add_entry';
}

sub add_kernel {
    my ($bootloader, $version, $ext, $root, $v) = @_;

    #- new versions of yaboot don't handle symlinks
    my $ppcext = $ext;
    if (arch() =~ /ppc/) {
	$ext = "-$version";
    }

    log::l("adding vmlinuz$ext as vmlinuz-$version");
    -e "$::prefix/boot/vmlinuz-$version" or log::l("unable to find kernel image $::prefix/boot/vmlinuz-$version"), return;
    my $image = "/boot/vmlinuz" . ($ext ne "-$version" &&
				   symlinkf("vmlinuz-$version", "$::prefix/boot/vmlinuz$ext") ? $ext : "-$version");

    my $initrd = "/boot/initrd-$version.img";
    mkinitrd($version, $initrd, $v->{vga}) or undef $initrd;
    if ($initrd && $ext ne "-$version") {
	$initrd = "/boot/initrd$ext.img";
	symlinkf("initrd-$version.img", "$::prefix$initrd") or cp_af("$::prefix/boot/initrd-$version.img", "$::prefix$initrd");
    }

    my $label = $ext =~ /-(default)/ ? $1 : $ext =~ /\d\./ && sanitize_ver("linux-$version") || "linux$ext";

    #- more yaboot concessions - PPC
    if (arch() =~ /ppc/) {
	$label = $ppcext =~ /-(default)/ ? $1 : "linux$ppcext";
    }

    add2hash($v,
	     {
	      type => 'image',
	      root => "/dev/$root",
	      label => $label,
	      kernel_or_dev => $image,
	      initrd => $initrd,
	     });
    $v->{append} = normalize_append("$bootloader->{perImageAppend} $v->{append}");
    add_entry($bootloader, $v);
}

sub duplicate_kernel_entry {
    my ($bootloader, $new_label) = @_;

    get_label($new_label, $bootloader) and return;

    my $entry = { %{ get_label('linux', $bootloader) }, label => $new_label };
    add_entry($bootloader, $entry);
}

sub unpack_append {
    my ($s) = @_;
    my @l = split(' ', $s);
    [ grep { !/=/ } @l ], [ map { if_(/(.*?)=(.*)/, [$1, $2]) } @l ];
}
sub pack_append {
    my ($simple, $dict) = @_;

    #- normalize
    $simple = [ reverse(uniq(reverse @$simple)) ];
    $dict = [ reverse(uniq_ { my ($k, $v) = @{$_[0]}; $k eq 'mem' ? "$k=$v" : $k } reverse @$dict) ];

    join(' ', @$simple, map { "$_->[0]=$_->[1]" } @$dict);
}

sub normalize_append {
    my ($s) = @_;
    my ($simple, $dict) = unpack_append($s);
    pack_append($simple, $dict);
}

sub append__mem_is_memsize { $_[0] =~ /^\d+[kM]?$/i }

sub get_append {
    my ($b, $key) = @_;
    my ($simple, $dict) = unpack_append($b->{perImageAppend});
    if (member($key, @$simple)) {
	return 1;
    }
    my @l = map { $_->[1] } grep { $_->[0] eq $key } @$dict;

    #- suppose we want the memsize
    @l = grep { append__mem_is_memsize($_) } @l if $key eq 'mem';

    log::l("more than one $key in $b->{perImageAppend}") if @l > 1;
    $l[0];
}
sub modify_append {
    my ($b, $f) = @_;

    foreach (\$b->{perImageAppend}, map { \$_->{append} } grep { $_->{type} eq 'image' } @{$b->{entries}}) {
	my ($simple, $dict) = unpack_append($$_);
	$f->($simple, $dict);
	$$_ = pack_append($simple, $dict);
	log::l("modify_append: $$_");
    }
}
sub remove_append_simple {
    my ($b, $key) = @_;
    modify_append($b, sub {
	my ($simple, $_dict) = @_;
	@$simple = grep { $_ ne $key } @$simple;
    });
}
sub set_append {
    my $has_val = @_ > 2;
    my ($b, $key, $val) = @_;

    modify_append($b, sub {
	my ($simple, $dict) = @_;
	if ($has_val) {
	    @$dict = grep { $_->[0] ne $key || $key eq 'mem' && append__mem_is_memsize($_->[1]) != append__mem_is_memsize($val) } @$dict;
	    push @$dict, [ $key, $val ] if !($val eq '' || $key eq 'mem' && !$val);
	} else {
	    @$simple = grep { $_ ne $key } @$simple;
	    push @$simple, $key;
	}
    });
}
sub may_append {
    my ($b, $key, $val) = @_;
    set_append($b, $key, $val) if !get_append($b, $key);
}

sub configure_entry {
    my ($entry) = @_;
    if ($entry->{type} eq 'image') {
	my $specific_version;
	$entry->{kernel_or_dev} =~ /vmlinu.-(.*)/ and $specific_version = $1;
	readlink("$::prefix/$entry->{kernel_or_dev}") =~ /vmlinu.-(.*)/ and $specific_version = $1;

	if ($specific_version) {
	    $entry->{initrd} or $entry->{initrd} = "/boot/initrd-$specific_version.img";
	    mkinitrd($specific_version, $entry->{initrd}, $entry->{vga}) or undef $entry->{initrd};
	}
    }
    $entry;
}

sub dev2prompath { #- SPARC only
    my ($dev) = @_;
    my ($wd, $num) = $dev =~ /^(.*\D)(\d*)$/;
    require c;
    $dev = c::disk2PromPath($wd) and $dev = $dev =~ /^sd\(/ ? "$dev$num" : "$dev;$num";
    $dev;
}

sub get_kernels_and_labels() {
    my $dir = "$::prefix/boot";
    my @l = grep { /^vmlinuz-/ } all($dir);
    my @kernels = grep { ! -l "$dir/$_" } @l;

    my @preferred = ('', 'secure', 'enterprise', 'smp');
    my %weights = map_index { $_ => $::i } @preferred;
    
    require pkgs;
    @kernels = 
      sort { c::rpmvercmp($b->{version}, $a->{version}) || $weights{$a->{ext}} <=> $weights{$b->{ext}} } 
      grep { -d "$::prefix/lib/modules/$_->{complete_version}" }
      map {
	  s/vmlinuz-//;
	  { complete_version => $_, /(.*mdk)(.*)/ ? (ext => $2, version => $1) : (version => $_) };
      } @kernels;

    my %majors;
    foreach (@kernels) {
	push @{$majors{$1}}, $_ if $_->{version} =~ /^(2\.\d+)/
    }
    while (my ($major, $l) = each %majors) {
	$l->[0]{version} = $major if @$l == 1;
    }

    if (-e "$::prefix/usr/lib/lsb") {
	my ($kernel_24, $other) = partition { $_->{ext} eq '' && $_->{version} =~ /^\Q2.4/ } @kernels;
	@kernels = (@$kernel_24, @$other);
    }
    my %labels;
    foreach (@kernels) {
	my $label = '';
	if (exists $labels{$label}) {
	    $label = '-' . $_->{ext} if $_->{ext};
	}
	if (exists $labels{$label}) {
	    $label = '-' . $_->{version} . $_->{ext};
	}
	$labels{$label} = $_->{complete_version};
    }
    %labels;
}

# sanitize_ver: long function when it could be shorter but we are sure
#		to catch everything and can be readable if we want to
#		add new scheme name.
# DUPLICATED from /usr/share/loader/common.pm
sub sanitize_ver {
    my ($string) = @_;

    my ($main_version, undef, $extraversion, $rest) = 
      $string =~ m!(\d+\.\d+\.\d+)(-((?:pre|rc)\d+))?(.*)!;

    if (my ($mdkver, $cpu, $nproc, $mem) = $rest =~ m|-(.+)-(.+)-(.+)-(.+)|) {
	$rest = "$cpu$nproc$mem-$mdkver";
    }

    my $return = "$main_version$extraversion$rest";

    $return =~ s|\.||g;
    $return =~ s|mdk||;
    $return =~ s|64GB|64G|;
    $return =~ s|4GB|4G|;
    $return =~ s|secure|sec|;
    $return =~ s|enterprise|ent|;

    return $return;
}

sub suggest {
    my ($bootloader, $hds, $fstab, %options) = @_;
    my $root_part = fsedit::get_root($fstab);
    my $root = isLoopback($root_part) ? "loop7" : $root_part->{device};
    my $boot = fsedit::get_root($fstab, 'boot')->{device};
    my $partition = first($boot =~ /\D*(\d*)/);
    #- PPC xfs module requires enlarged initrd
    my $xfsroot = isThisFs("xfs", $root_part);

    require c; c::initSilo() if arch() =~ /sparc/;

    my ($onmbr, $unsafe) = $bootloader->{crushMbr} ? (1, 0) : suggest_onmbr($hds->[0]);
    add2hash_($bootloader, arch() =~ /sparc/ ?
	{
	 entries => [],
	 timeout => 10,
	 use_partition => 0, #- we should almost always have a whole disk partition.
	 root          => "/dev/$root",
	 partition     => $partition || 1,
	 boot          => $root eq $boot && "/boot", #- this helps for getting default partition for silo.
	} : arch() =~ /ppc/ ?
	{
	 defaultos => "linux",
	 entries => [],
	 'init-message' => "Welcome to Mandrake Linux!",
	 delay => 30,	#- OpenFirmware delay
	 timeout => 50,
	 enableofboot => 1,
	 enablecdboot => 1,
	 useboot => $boot,
	 xfsroot => $xfsroot,
	} :
	{
	 bootUnsafe => $unsafe,
	 entries => [],
	 timeout => $onmbr && 10,
	 nowarn => 1,
	   if_(arch() !~ /ia64/,
	 boot => "/dev/" . ($onmbr ? $hds->[0]{device} : fsedit::get_root($fstab, 'boot')->{device}),
	 map => "/boot/map",
         ),
	});

    if (!$bootloader->{message} || $bootloader->{message} eq "1") {
	my $msg_en =
#-PO: these messages will be displayed at boot time in the BIOS, use only ASCII (7bit)
N_("Welcome to the operating system chooser!

Choose an operating system from the list above or
wait for default boot.

");
	my $msg = translate($msg_en);
	#- use the english version if more than 20% of 8bits chars
	$msg = $msg_en if int(grep { $_ & 0x80 } unpack "c*", $msg) / length($msg) > 0.2;
	$bootloader->{message} = $msg;
    }

    add2hash_($bootloader, { memsize => $1 }) if cat_("/proc/cmdline") =~ /\bmem=(\d+[KkMm]?)(?:\s.*)?$/;
    if (my ($s, $port, $speed) = cat_("/proc/cmdline") =~ /console=(ttyS(\d),(\d+)\S*)/) {
	log::l("serial console $s $port $speed");
	set_append($bootloader, 'console' => $s);
	any::set_login_serial_console($port, $speed);
    }

    #- add a restore entry if installation is done from disk, in order to allow redoing it.
    if (my $hd_install_path = any::hdInstallPath()) {
	my ($cmdline, $vga);
	if ($::restore && -e "/tmp/image/boot/vmlinuz" && -e "/tmp/image/boot/all.rdz" &&
	    ($cmdline = cat_("/tmp/image/boot/grub/menu.lst") =~ m|kernel \S+/boot/vmlinuz (.*)$|m)) {
	    #- cmdline should'n have any reference to vga=...
	    $cmdline =~ s/vga=(\S+)//g and $vga = $1;
	    log::l("copying kernel and stage1 install to $::prefix/boot/restore");
	    eval { mkdir "$::prefix/boot/restore";
		   cp_af("/tmp/image/boot/vmlinuz", "$::prefix/boot/restore/vmlinuz");
		   cp_af("/tmp/image/boot/all.rdz", "$::prefix/boot/restore/all.rdz") };
	    unless ($@) {
		log::l("adding a restore bootloader entry on $hd_install_path (remapped to $::prefix/boot/restore)");
		add_entry($bootloader, {
					type => 'image',
					label => 'restore',
					kernel_or_dev => "/boot/restore/vmlinuz",
					initrd => "/boot/restore/all.rdz",
					append => "$cmdline recovery", #- the restore entry is a recovery entry
					if_($vga, vga => $vga),
				       });
	    }
	} else {
	    log::l("no restore bootloader need to be used on $hd_install_path");
	}
    }

    my %labels = get_kernels_and_labels();
    $labels{''} or die "no kernel installed";

    while (my ($ext, $version) = each %labels) {
	add_kernel($bootloader, $version, $ext, $root,
	       {
		if_($options{vga_fb} && $ext eq '', vga => $options{vga_fb}), #- using framebuffer
		if_($options{vga_fb} && $options{quiet}, append => "splash=silent"),
	       });

	if ($options{vga_fb} && $ext eq '') {
	    add_kernel($bootloader, $version, $ext, $root, { label => 'linux-nonfb' });
	}
    }

    #- remove existing libsafe, don't care if the previous one was modified by the user?
    @{$bootloader->{entries}} = grep { $_->{label} ne 'failsafe' } @{$bootloader->{entries}};

    add_kernel($bootloader, $labels{''}, '', $root,
	       { label => 'failsafe', append => 'devfs=nomount failsafe' });

    if (arch() =~ /sparc/) {
	#- search for SunOS, it could be a really better approach to take into account
	#- partition type for mounting point.
	my $sunos = 0;
	foreach (@$hds) {
	    foreach (@{$_->{primary}{normal}}) {
		my $path = $_->{device} =~ m|^/| && $_->{device} !~ m|^/dev/| ? $_->{device} : dev2prompath($_->{device});
		add_entry($bootloader,
			  {
			   type => 'other',
			   kernel_or_dev => $path,
			   label => "sunos"   . ($sunos++ ? $sunos : ''),
			  }) if $path && isSunOS($_) && type2name($_->{type}) =~ /root/i;
	    }
	}
    } elsif (arch() =~ /ppc/) {
	#- if we identified a MacOS partition earlier - add it
	if (defined $partition_table::mac::macos_part) {
	    add_entry($bootloader,
		      {
		       label => "macos",
		       kernel_or_dev => $partition_table::mac::macos_part
		      });
	}
    } elsif (arch() !~ /ia64/) {
	#- search for dos (or windows) boot partition. Don't look in extended partitions!
	my %nbs;
	foreach (@$hds) {
	    foreach (@{$_->{primary}{normal}}) {
		isFat_or_NTFS($_) or next;
		my $from_magic = { type => fsedit::typeOfPart($_->{device}) };
		isFat_or_NTFS($from_magic) or next;
		my $label = 'windows';
		add_entry($bootloader,
			  {
			   type => 'other',
			   kernel_or_dev => "/dev/$_->{device}",
			   label => $label . ($nbs{$label}++ ? $nbs{$label} : ''),
			     $_->{device} =~ /[1-4]$/ ? (
			   table => "/dev/$_->{rootDevice}"
			     ) : (
			   unsafe => 1
                             ),
			  })
	    }
	}
    }
    foreach ('secure', 'enterprise', 'smp') {
	if (get_label("linux-$_", $bootloader)) {
	    $bootloader->{default} ||= "linux-$_";
	    last;
	}
    }
    $bootloader->{default} ||= "linux";
    $bootloader->{method} ||= first(method_choices($fstab, $bootloader));
}

sub detect_bootloader() {
    chomp_(run_program::rooted_get_stdout($::prefix, 'detectloader'));
}

sub method_choices {
    my ($fstab, $bootloader) = @_;
    my %choices = (
	if_(arch() =~ /sparc/,
	    'silo' => N("SILO"),
        ), if_(arch() !~ /sparc|ppc/ && !isLoopback(fsedit::get_root($fstab)) && whereis_binary('lilo'),
	    if_(!detect_devices::matching_desc('ProSavageDDR'), 'lilo-graphic' => N("LILO with graphical menu")),
	    'lilo-menu'    => N("LILO with text menu"),
	), if_(arch() !~ /sparc|ppc/ && !isRAID(fsedit::get_root($fstab)) && whereis_binary('grub'),
	    'grub' => N("Grub"),
        ), if_(arch() =~ /ppc/,
	    'yaboot' => N("Yaboot"),
        ),
    );
    my $prefered;
    $prefered ||= 'grub' if $::isStandalone && detect_bootloader() =~ /GRUB/;
    $prefered ||= 'lilo-' . (member($bootloader->{install}, 'text', 'menu', 'graphic') ? $bootloader->{install} : 'graphic');
    my $default = exists $choices{$prefered} ? $prefered : first(keys %choices);

    $default, \%choices;
}

sub suggest_floppy {
    my ($bootloader) = @_;

    my $floppy = detect_devices::floppy() or return;
    $floppy eq 'fd0' or log::l("suggest_floppy: not adding $floppy"), return;

    add_entry($bootloader,
      {
       type => 'other',
       kernel_or_dev => '/dev/fd0',
       label => 'floppy',
       unsafe => 1
      });
}

sub keytable {
    my ($f) = @_;
    $f or return;

    if ($f !~ /\.klt$/) {
	my $file = "/boot/$f.klt";
	run_program::rooted($::prefix, "keytab-lilo.pl", ">", $file, $f) or return;
	$f = $file;
    }
    -r "$::prefix/$f" && $f;
}

sub has_profiles { my ($b) = @_; to_bool(get_label("office", $b)) }
sub set_profiles {
    my ($b, $want_profiles) = @_;

    my $office = get_label("office", $b);
    if ($want_profiles xor $office) {
	my $e = get_label("linux", $b);
	if ($want_profiles) {
	    push @{$b->{entries}}, { %$e, label => "office", append => "$e->{append} prof=Office" };
	    $e->{append} .= " prof=Home";
	} else {
	    # remove profiles
	    $e->{append} =~ s/\s*prof=\w+//;
	    @{$b->{entries}} = grep { $_ != $office } @{$b->{entries}};
	}
    }

}

sub get_of_dev {
    my ($unix_dev) = @_;
    my $of_dev;
    run_program::rooted_or_die($::prefix, "/usr/sbin/ofpath", ">", \$of_dev, $unix_dev);
    chomp($of_dev);
    log::l("OF Device: $of_dev");
    $of_dev;
}

sub install_yaboot {
    my ($bootloader, $_fstab, $_hds) = @_;
    $bootloader->{prompt} = $bootloader->{timeout};

    if ($bootloader->{message}) {
	eval { output("$::prefix/boot/message", $bootloader->{message}) }
	  or $bootloader->{message} = 0;
    }
    {
        local $\ = "\n";
	my $f = "$::prefix/etc/yaboot.conf";
	local *F;
	open F, ">$f" or die "cannot create yaboot config file: $f";
	log::l("writing yaboot config to $f");

	print F "#yaboot.conf - generated by DrakX";
	print F qq(init-message="\\n$bootloader->{'init-message'}\\n") if $bootloader->{'init-message'};

	if ($bootloader->{boot}) {
	    print F "boot=$bootloader->{boot}";
	    my $of_dev = get_of_dev($bootloader->{boot});
	    print F "ofboot=$of_dev";
	} else {
	    die "no bootstrap partition defined."
	}
	
	$bootloader->{$_} and print F "$_=$bootloader->{$_}" foreach qw(delay timeout);
	print F "install=/usr/lib/yaboot/yaboot";
	print F "magicboot=/usr/lib/yaboot/ofboot";
	$bootloader->{$_} and print F $_ foreach qw(enablecdboot enableofboot);
	$bootloader->{$_} and print F "$_=$bootloader->{$_}" foreach qw(defaultos default);
	#- print F "nonvram";
	my $boot = "/dev/" . $bootloader->{useboot} if $bootloader->{useboot};
		
	foreach (@{$bootloader->{entries}}) {

	    if ($_->{type} eq "image") {
		my $of_dev = '';
		if ($boot !~ /$_->{root}/ && $boot) {
		    $of_dev = get_of_dev($boot);
		    print F "$_->{type}=$of_dev," . substr($_->{kernel_or_dev}, 5);
		} else {
		    $of_dev = get_of_dev($_->{root});    			
		    print F "$_->{type}=$of_dev,$_->{kernel_or_dev}";
		}
		print F "\tlabel=", make_label_lilo_compatible($_->{label});
		print F "\troot=$_->{root}";
		if ($boot !~ /$_->{root}/ && $boot) {
		    print F "\tinitrd=$of_dev," . substr($_->{initrd}, 5) if $_->{initrd};
		} else {
		    print F "\tinitrd=$of_dev,$_->{initrd}" if $_->{initrd};
		}
		#- xfs module on PPC requires larger initrd - say 6MB?
		print F "\tinitrd-size=6144" if $bootloader->{xfsroot};
		print F qq(\tappend=" $_->{append}") if $_->{append};
		print F "\tread-write" if $_->{'read-write'};
		print F "\tread-only" if !$_->{'read-write'};
	    } else {
		my $of_dev = get_of_dev($_->{kernel_or_dev});
		print F "$_->{label}=$of_dev";		
	    }
	}
    }
    log::l("Installing boot loader...");
    my $f = "$::prefix/tmp/of_boot_dev";
    my $of_dev = get_of_dev($bootloader->{boot});
    output($f, "$of_dev\n");  
    $::testing and return;
    if (defined $install_steps_interactive::new_bootstrap) {
	run_program::run("hformat", $bootloader->{boot}) or die "hformat failed";
    }	
    my $error;
    run_program::rooted($::prefix, "/usr/sbin/ybin", "2>", \$error) or die "ybin failed: $error";
}

sub install_silo {
    my ($silo, $fstab) = @_;
    my $boot = fsedit::get_root($fstab, 'boot')->{device};
    my ($wd, $_num) = $boot =~ /^(.*\D)(\d*)$/;

    #- setup boot promvars for.
    require c;
    if ($boot =~ /^md/) {
	#- get all mbr devices according to /boot are listed,
	#- then join all zero based partition translated to prom with ';'.
	#- keep bootdev with the first of above.
	log::l("/boot is present on raid partition which is not currently supported for promvars");
    } else {
	if (!$silo->{use_partition}) {
	    foreach (@$fstab) {
		if (!$_->{start} && $_->{device} =~ /$wd/) {
		    $boot = $_->{device};
		    log::l("found a zero based partition in $wd as $boot");
		    last;
		}
	    }
	}
	$silo->{bootalias} = c::disk2PromPath($boot);
	$silo->{bootdev} = $silo->{bootalias};
        log::l("preparing promvars for device=$boot");
    }
    c::hasAliases() or log::l("clearing promvars alias as non supported"), $silo->{bootalias} = '';

    if ($silo->{message}) {
	eval { output("$::prefix/boot/message", $silo->{message}) } or $silo->{message} = 0;
    }
    {
        local $\ = "\n";
	my $f = "$::prefix/boot/silo.conf"; #- always write the silo.conf file in /boot ...
	symlinkf "../boot/silo.conf", "$::prefix/etc/silo.conf"; #- ... and make a symlink from /etc.
	local *F;
	open F, ">$f" or die "cannot create silo config file: $f";
	log::l("writing silo config to $f");

	$silo->{$_} and print F "$_=$silo->{$_}" foreach qw(partition root default append);
	$silo->{$_} and print F $_ foreach qw(restricted);
	print F "password=", $silo->{password} if $silo->{restricted} && $silo->{password}; #- also done by msec
	print F "timeout=", round(10 * $silo->{timeout}) if $silo->{timeout};