Commit 27e3ed99f7e5af7e841b6cae94555bc4d9cabc8d

Authored by Silvan Calarco
1 parent af01e050d4
Exists in master

installer: support for separate /boot partition (which is required for LVM support)

Showing 2 changed files with 838 additions and 495 deletions Side-by-side Diff

installer/installer.kmdr
Changes suppressed. Click to show
... ... @@ -1599,7 +1599,7 @@
1599 1599  
1600 1600 for d in $devices; do
1601 1601 # lvm device?
1602   - lvm_vgname=`sudo pvdisplay $d 2>/dev/null | grep "VG Name" | sed "s|.*VG Name[[:space:]]*||"`
  1602 + lvm_vgname=`sudo pvdisplay $d 2>/dev/null | grep "VG Name" | sed "s|.*VG Name[[:space:]]*||"`
1603 1603 if [ "$lvm_vgname" ]; then
1604 1604 diskdevice=$lvm_vgname
1605 1605 native_path="/dev/$lvm_vgname"
... ... @@ -1997,27 +1997,6 @@
1997 1997 <set>WordBreak|AlignTop</set>
1998 1998 </property>
1999 1999 </widget>
2000   - <widget class="ListBox">
2001   - <property name="name">
2002   - <cstring>devicesbox</cstring>
2003   - </property>
2004   - <property name="geometry">
2005   - <rect>
2006   - <x>10</x>
2007   - <y>90</y>
2008   - <width>540</width>
2009   - <height>130</height>
2010   - </rect>
2011   - </property>
2012   - <property name="populationText">
2013   - <string></string>
2014   - </property>
2015   - <property name="associations" stdset="0">
2016   - <stringlist>
2017   - <string></string>
2018   - </stringlist>
2019   - </property>
2020   - </widget>
2021 2000 <widget class="QLayoutWidget">
2022 2001 <property name="name">
2023 2002 <cstring>Layout4</cstring>
... ... @@ -2113,6 +2092,27 @@
2113 2092 </spacer>
2114 2093 </hbox>
2115 2094 </widget>
  2095 + <widget class="ListBox">
  2096 + <property name="name">
  2097 + <cstring>devicesbox</cstring>
  2098 + </property>
  2099 + <property name="geometry">
  2100 + <rect>
  2101 + <x>10</x>
  2102 + <y>90</y>
  2103 + <width>540</width>
  2104 + <height>130</height>
  2105 + </rect>
  2106 + </property>
  2107 + <property name="populationText">
  2108 + <string></string>
  2109 + </property>
  2110 + <property name="associations" stdset="0">
  2111 + <stringlist>
  2112 + <string></string>
  2113 + </stringlist>
  2114 + </property>
  2115 + </widget>
2116 2116 </widget>
2117 2117 <widget class="ScriptObject">
2118 2118 <property name="name">
... ... @@ -2275,224 +2275,6 @@
2275 2275 <attribute name="title">
2276 2276 <string>Home partition choice</string>
2277 2277 </attribute>
2278   - <widget class="GroupBox">
2279   - <property name="name">
2280   - <cstring>PartitionBox_2</cstring>
2281   - </property>
2282   - <property name="enabled">
2283   - <bool>true</bool>
2284   - </property>
2285   - <property name="geometry">
2286   - <rect>
2287   - <x>10</x>
2288   - <y>70</y>
2289   - <width>560</width>
2290   - <height>260</height>
2291   - </rect>
2292   - </property>
2293   - <property name="sizePolicy">
2294   - <sizepolicy>
2295   - <hsizetype>3</hsizetype>
2296   - <vsizetype>7</vsizetype>
2297   - <horstretch>0</horstretch>
2298   - <verstretch>0</verstretch>
2299   - </sizepolicy>
2300   - </property>
2301   - <property name="title">
2302   - <string>Where do you want to have openmamba home folder?</string>
2303   - </property>
2304   - <property name="associations" stdset="0">
2305   - <stringlist>
2306   - <string></string>
2307   - </stringlist>
2308   - </property>
2309   - <widget class="QLayoutWidget">
2310   - <property name="name">
2311   - <cstring>Layout2_2</cstring>
2312   - </property>
2313   - <property name="geometry">
2314   - <rect>
2315   - <x>10</x>
2316   - <y>220</y>
2317   - <width>540</width>
2318   - <height>19</height>
2319   - </rect>
2320   - </property>
2321   - <hbox>
2322   - <property name="name">
2323   - <cstring>unnamed</cstring>
2324   - </property>
2325   - <property name="margin">
2326   - <number>0</number>
2327   - </property>
2328   - <property name="spacing">
2329   - <number>6</number>
2330   - </property>
2331   - <widget class="Label">
2332   - <property name="name">
2333   - <cstring>Label3_2</cstring>
2334   - </property>
2335   - <property name="sizePolicy">
2336   - <sizepolicy>
2337   - <hsizetype>1</hsizetype>
2338   - <vsizetype>5</vsizetype>
2339   - <horstretch>0</horstretch>
2340   - <verstretch>0</verstretch>
2341   - </sizepolicy>
2342   - </property>
2343   - <property name="font">
2344   - <font>
2345   - <bold>1</bold>
2346   - </font>
2347   - </property>
2348   - <property name="text">
2349   - <string>Mount home from:</string>
2350   - </property>
2351   - <property name="alignment">
2352   - <set>AlignVCenter|AlignLeft</set>
2353   - </property>
2354   - </widget>
2355   - <widget class="Label">
2356   - <property name="name">
2357   - <cstring>showdevice_2</cstring>
2358   - </property>
2359   - <property name="sizePolicy">
2360   - <sizepolicy>
2361   - <hsizetype>7</hsizetype>
2362   - <vsizetype>5</vsizetype>
2363   - <horstretch>0</horstretch>
2364   - <verstretch>0</verstretch>
2365   - </sizepolicy>
2366   - </property>
2367   - <property name="text">
2368   - <string></string>
2369   - </property>
2370   - <property name="associations" stdset="0">
2371   - <stringlist>
2372   - <string></string>
2373   - </stringlist>
2374   - </property>
2375   - </widget>
2376   - </hbox>
2377   - </widget>
2378   - <widget class="QLayoutWidget">
2379   - <property name="name">
2380   - <cstring>Layout6_2</cstring>
2381   - </property>
2382   - <property name="geometry">
2383   - <rect>
2384   - <x>10</x>
2385   - <y>240</y>
2386   - <width>540</width>
2387   - <height>17</height>
2388   - </rect>
2389   - </property>
2390   - <hbox>
2391   - <property name="name">
2392   - <cstring>unnamed</cstring>
2393   - </property>
2394   - <property name="margin">
2395   - <number>0</number>
2396   - </property>
2397   - <property name="spacing">
2398   - <number>6</number>
2399   - </property>
2400   - <widget class="Label">
2401   - <property name="name">
2402   - <cstring>Label22_2_2</cstring>
2403   - </property>
2404   - <property name="sizePolicy">
2405   - <sizepolicy>
2406   - <hsizetype>3</hsizetype>
2407   - <vsizetype>5</vsizetype>
2408   - <horstretch>0</horstretch>
2409   - <verstretch>0</verstretch>
2410   - </sizepolicy>
2411   - </property>
2412   - <property name="text">
2413   - <string>Format (all current data will be lost)</string>
2414   - </property>
2415   - </widget>
2416   - <widget class="CheckBox">
2417   - <property name="name">
2418   - <cstring>format_home_box</cstring>
2419   - </property>
2420   - <property name="enabled">
2421   - <bool>false</bool>
2422   - </property>
2423   - <property name="sizePolicy">
2424   - <sizepolicy>
2425   - <hsizetype>3</hsizetype>
2426   - <vsizetype>0</vsizetype>
2427   - <horstretch>0</horstretch>
2428   - <verstretch>0</verstretch>
2429   - </sizepolicy>
2430   - </property>
2431   - <property name="text">
2432   - <string></string>
2433   - </property>
2434   - <property name="checked">
2435   - <bool>true</bool>
2436   - </property>
2437   - </widget>
2438   - </hbox>
2439   - </widget>
2440   - <widget class="ListBox">
2441   - <property name="name">
2442   - <cstring>devicesbox_2</cstring>
2443   - </property>
2444   - <property name="geometry">
2445   - <rect>
2446   - <x>10</x>
2447   - <y>90</y>
2448   - <width>540</width>
2449   - <height>130</height>
2450   - </rect>
2451   - </property>
2452   - <property name="currentItem">
2453   - <number>-1</number>
2454   - </property>
2455   - <property name="selectionMode">
2456   - <enum>Single</enum>
2457   - </property>
2458   - <property name="populationText">
2459   - <string></string>
2460   - </property>
2461   - <property name="associations" stdset="0">
2462   - <stringlist>
2463   - <string></string>
2464   - </stringlist>
2465   - </property>
2466   - </widget>
2467   - <widget class="Label">
2468   - <property name="name">
2469   - <cstring>Label24_2</cstring>
2470   - </property>
2471   - <property name="geometry">
2472   - <rect>
2473   - <x>10</x>
2474   - <y>20</y>
2475   - <width>540</width>
2476   - <height>60</height>
2477   - </rect>
2478   - </property>
2479   - <property name="font">
2480   - <font>
2481   - <italic>1</italic>
2482   - </font>
2483   - </property>
2484   - <property name="text">
2485   - <string>Please, select the disk partition that will contain user data.
2486   -&lt;br&gt;This is an optional choice, just go to the next step if you don't want a separate home partition.</string>
2487   - </property>
2488   - <property name="textFormat">
2489   - <enum>RichText</enum>
2490   - </property>
2491   - <property name="alignment">
2492   - <set>WordBreak|AlignTop</set>
2493   - </property>
2494   - </widget>
2495   - </widget>
2496 2278 <widget class="PixmapLabel">
2497 2279 <property name="name">
2498 2280 <cstring>PixmapLabel4_2</cstring>
... ... @@ -2670,6 +2452,45 @@
2670 2452 </widget>
2671 2453 <widget class="ScriptObject">
2672 2454 <property name="name">
  2455 + <cstring>setlabel_2</cstring>
  2456 + </property>
  2457 + <property name="geometry">
  2458 + <rect>
  2459 + <x>550</x>
  2460 + <y>50</y>
  2461 + <width>32</width>
  2462 + <height>32</height>
  2463 + </rect>
  2464 + </property>
  2465 + <property name="populationText">
  2466 + <string></string>
  2467 + </property>
  2468 + <property name="associations" stdset="0">
  2469 + <stringlist>
  2470 + <string>@execBegin
  2471 +@format_home_box.setEnabled(false)
  2472 +@if (@devicesbox_2.currentItem &gt;= 0)
  2473 + currdev=@String.section(@devicesbox_2.item(@devicesbox_2.currentItem)," ",0)
  2474 + if [ "$currdev" != "none" -a "$currdev" != "nessuna" ]; then
  2475 + dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_2 "@devicesbox_2.item(@devicesbox_2.currentItem)"
  2476 + dcop @dcopid KommanderIf "setEnabled(QString,bool)" format_home_box true
  2477 + dcop @dcopid KommanderIf "setEnabled(QString,bool)" formathome_group @format_home_box.checked()
  2478 + else
  2479 + dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_2 ""
  2480 + dcop @dcopid KommanderIf "setEnabled(QString,bool)" format_home_box false
  2481 + dcop @dcopid KommanderIf "setEnabled(QString,bool)" formathome_group false
  2482 + fi
  2483 + @dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, true)
  2484 + @BackBox.setChecked(true)
  2485 + dcop @dcopid KommanderIf "setCurrentItem(int)" 0
  2486 +@endif
  2487 +@execEnd
  2488 +@setBootableCheckbox.execute()</string>
  2489 + </stringlist>
  2490 + </property>
  2491 + </widget>
  2492 + <widget class="ScriptObject">
  2493 + <property name="name">
2673 2494 <cstring>scanDevices_2</cstring>
2674 2495 </property>
2675 2496 <property name="geometry">
2676 2497  
2677 2498  
2678 2499  
2679 2500  
2680 2501  
2681 2502  
2682 2503  
... ... @@ -2741,44 +2562,223 @@
2741 2562 </stringlist>
2742 2563 </property>
2743 2564 </widget>
2744   - <widget class="ScriptObject">
  2565 + <widget class="GroupBox">
2745 2566 <property name="name">
2746   - <cstring>setlabel_2</cstring>
  2567 + <cstring>PartitionBox_2</cstring>
2747 2568 </property>
  2569 + <property name="enabled">
  2570 + <bool>true</bool>
  2571 + </property>
2748 2572 <property name="geometry">
2749 2573 <rect>
2750   - <x>550</x>
2751   - <y>50</y>
2752   - <width>32</width>
2753   - <height>32</height>
  2574 + <x>10</x>
  2575 + <y>70</y>
  2576 + <width>560</width>
  2577 + <height>260</height>
2754 2578 </rect>
2755 2579 </property>
2756   - <property name="populationText">
2757   - <string></string>
  2580 + <property name="sizePolicy">
  2581 + <sizepolicy>
  2582 + <hsizetype>3</hsizetype>
  2583 + <vsizetype>7</vsizetype>
  2584 + <horstretch>0</horstretch>
  2585 + <verstretch>0</verstretch>
  2586 + </sizepolicy>
2758 2587 </property>
  2588 + <property name="title">
  2589 + <string>Where do you want to have openmamba home folder?</string>
  2590 + </property>
2759 2591 <property name="associations" stdset="0">
2760 2592 <stringlist>
2761   - <string>@execBegin
2762   -@format_home_box.setEnabled(false)
2763   -@if (@devicesbox_2.currentItem &gt;= 0)
2764   - currdev=@String.section(@devicesbox_2.item(@devicesbox_2.currentItem)," ",0)
2765   - if [ "$currdev" != "none" -a "$currdev" != "nessuna" ]; then
2766   - dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_2 "@devicesbox_2.item(@devicesbox_2.currentItem)"
2767   - dcop @dcopid KommanderIf "setEnabled(QString,bool)" format_home_box true
2768   - dcop @dcopid KommanderIf "setEnabled(QString,bool)" formathome_group @format_home_box.checked()
2769   - else
2770   - dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_2 ""
2771   - dcop @dcopid KommanderIf "setEnabled(QString,bool)" format_home_box false
2772   - dcop @dcopid KommanderIf "setEnabled(QString,bool)" formathome_group false
2773   - fi
2774   - @dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, true)
2775   - @BackBox.setChecked(true)
2776   - dcop @dcopid KommanderIf "setCurrentItem(int)" 0
2777   -@endif
2778   -@execEnd
2779   -@setBootableCheckbox.execute()</string>
  2593 + <string></string>
2780 2594 </stringlist>
2781 2595 </property>
  2596 + <widget class="QLayoutWidget">
  2597 + <property name="name">
  2598 + <cstring>Layout6_2</cstring>
  2599 + </property>
  2600 + <property name="geometry">
  2601 + <rect>
  2602 + <x>10</x>
  2603 + <y>240</y>
  2604 + <width>540</width>
  2605 + <height>17</height>
  2606 + </rect>
  2607 + </property>
  2608 + <hbox>
  2609 + <property name="name">
  2610 + <cstring>unnamed</cstring>
  2611 + </property>
  2612 + <property name="margin">
  2613 + <number>0</number>
  2614 + </property>
  2615 + <property name="spacing">
  2616 + <number>6</number>
  2617 + </property>
  2618 + <widget class="Label">
  2619 + <property name="name">
  2620 + <cstring>Label22_2_2</cstring>
  2621 + </property>
  2622 + <property name="sizePolicy">
  2623 + <sizepolicy>
  2624 + <hsizetype>3</hsizetype>
  2625 + <vsizetype>5</vsizetype>
  2626 + <horstretch>0</horstretch>
  2627 + <verstretch>0</verstretch>
  2628 + </sizepolicy>
  2629 + </property>
  2630 + <property name="text">
  2631 + <string>Format (all current data will be lost)</string>
  2632 + </property>
  2633 + </widget>
  2634 + <widget class="CheckBox">
  2635 + <property name="name">
  2636 + <cstring>format_home_box</cstring>
  2637 + </property>
  2638 + <property name="enabled">
  2639 + <bool>false</bool>
  2640 + </property>
  2641 + <property name="sizePolicy">
  2642 + <sizepolicy>
  2643 + <hsizetype>3</hsizetype>
  2644 + <vsizetype>0</vsizetype>
  2645 + <horstretch>0</horstretch>
  2646 + <verstretch>0</verstretch>
  2647 + </sizepolicy>
  2648 + </property>
  2649 + <property name="text">
  2650 + <string></string>
  2651 + </property>
  2652 + <property name="checked">
  2653 + <bool>true</bool>
  2654 + </property>
  2655 + </widget>
  2656 + </hbox>
  2657 + </widget>
  2658 + <widget class="Label">
  2659 + <property name="name">
  2660 + <cstring>Label24_2</cstring>
  2661 + </property>
  2662 + <property name="geometry">
  2663 + <rect>
  2664 + <x>10</x>
  2665 + <y>20</y>
  2666 + <width>540</width>
  2667 + <height>60</height>
  2668 + </rect>
  2669 + </property>
  2670 + <property name="font">
  2671 + <font>
  2672 + <italic>1</italic>
  2673 + </font>
  2674 + </property>
  2675 + <property name="text">
  2676 + <string>Please, select the disk partition that will contain user data.
  2677 +&lt;br&gt;This is an optional choice, just go to the next step if you don't want a separate home partition.</string>
  2678 + </property>
  2679 + <property name="textFormat">
  2680 + <enum>RichText</enum>
  2681 + </property>
  2682 + <property name="alignment">
  2683 + <set>WordBreak|AlignTop</set>
  2684 + </property>
  2685 + </widget>
  2686 + <widget class="ListBox">
  2687 + <property name="name">
  2688 + <cstring>devicesbox_2</cstring>
  2689 + </property>
  2690 + <property name="geometry">
  2691 + <rect>
  2692 + <x>10</x>
  2693 + <y>90</y>
  2694 + <width>540</width>
  2695 + <height>130</height>
  2696 + </rect>
  2697 + </property>
  2698 + <property name="currentItem">
  2699 + <number>-1</number>
  2700 + </property>
  2701 + <property name="selectionMode">
  2702 + <enum>Single</enum>
  2703 + </property>
  2704 + <property name="populationText">
  2705 + <string></string>
  2706 + </property>
  2707 + <property name="associations" stdset="0">
  2708 + <stringlist>
  2709 + <string></string>
  2710 + </stringlist>
  2711 + </property>
  2712 + </widget>
  2713 + <widget class="QLayoutWidget">
  2714 + <property name="name">
  2715 + <cstring>Layout2_2</cstring>
  2716 + </property>
  2717 + <property name="geometry">
  2718 + <rect>
  2719 + <x>10</x>
  2720 + <y>220</y>
  2721 + <width>540</width>
  2722 + <height>19</height>
  2723 + </rect>
  2724 + </property>
  2725 + <hbox>
  2726 + <property name="name">
  2727 + <cstring>unnamed</cstring>
  2728 + </property>
  2729 + <property name="margin">
  2730 + <number>0</number>
  2731 + </property>
  2732 + <property name="spacing">
  2733 + <number>6</number>
  2734 + </property>
  2735 + <widget class="Label">
  2736 + <property name="name">
  2737 + <cstring>Label3_2</cstring>
  2738 + </property>
  2739 + <property name="sizePolicy">
  2740 + <sizepolicy>
  2741 + <hsizetype>1</hsizetype>
  2742 + <vsizetype>5</vsizetype>
  2743 + <horstretch>0</horstretch>
  2744 + <verstretch>0</verstretch>
  2745 + </sizepolicy>
  2746 + </property>
  2747 + <property name="font">
  2748 + <font>
  2749 + <bold>1</bold>
  2750 + </font>
  2751 + </property>
  2752 + <property name="text">
  2753 + <string>Mount home from:</string>
  2754 + </property>
  2755 + <property name="alignment">
  2756 + <set>AlignVCenter|AlignLeft</set>
  2757 + </property>
  2758 + </widget>
  2759 + <widget class="Label">
  2760 + <property name="name">
  2761 + <cstring>showdevice_2</cstring>
  2762 + </property>
  2763 + <property name="sizePolicy">
  2764 + <sizepolicy>
  2765 + <hsizetype>7</hsizetype>
  2766 + <vsizetype>5</vsizetype>
  2767 + <horstretch>0</horstretch>
  2768 + <verstretch>0</verstretch>
  2769 + </sizepolicy>
  2770 + </property>
  2771 + <property name="text">
  2772 + <string></string>
  2773 + </property>
  2774 + <property name="associations" stdset="0">
  2775 + <stringlist>
  2776 + <string></string>
  2777 + </stringlist>
  2778 + </property>
  2779 + </widget>
  2780 + </hbox>
  2781 + </widget>
2782 2782 </widget>
2783 2783 </widget>
2784 2784 <widget class="QWidget">
2785 2785  
2786 2786  
2787 2787  
2788 2788  
2789 2789  
... ... @@ -2828,53 +2828,21 @@
2828 2828 <set>AlignCenter</set>
2829 2829 </property>
2830 2830 </widget>
2831   - <widget class="ButtonGroup">
  2831 + <widget class="GroupBox">
2832 2832 <property name="name">
2833   - <cstring>BootloaderBox</cstring>
  2833 + <cstring>GroupBox16</cstring>
2834 2834 </property>
2835 2835 <property name="geometry">
2836 2836 <rect>
2837 2837 <x>10</x>
2838   - <y>70</y>
  2838 + <y>340</y>
2839 2839 <width>560</width>
2840   - <height>360</height>
  2840 + <height>90</height>
2841 2841 </rect>
2842 2842 </property>
2843   - <property name="sizePolicy">
2844   - <sizepolicy>
2845   - <hsizetype>3</hsizetype>
2846   - <vsizetype>4</vsizetype>
2847   - <horstretch>0</horstretch>
2848   - <verstretch>0</verstretch>
2849   - </sizepolicy>
2850   - </property>
2851 2843 <property name="title">
2852 2844 <string>Bootloader configuration</string>
2853 2845 </property>
2854   - <widget class="Label">
2855   - <property name="name">
2856   - <cstring>Label29_2</cstring>
2857   - </property>
2858   - <property name="geometry">
2859   - <rect>
2860   - <x>10</x>
2861   - <y>20</y>
2862   - <width>531</width>
2863   - <height>40</height>
2864   - </rect>
2865   - </property>
2866   - <property name="font">
2867   - <font>
2868   - <italic>1</italic>
2869   - </font>
2870   - </property>
2871   - <property name="text">
2872   - <string>Please select where you want to install the boot manager.</string>
2873   - </property>
2874   - <property name="alignment">
2875   - <set>WordBreak|AlignVCenter</set>
2876   - </property>
2877   - </widget>
2878 2846 <widget class="QLayoutWidget">
2879 2847 <property name="name">
2880 2848 <cstring>Layout5_2</cstring>
... ... @@ -2882,7 +2850,7 @@
2882 2850 <property name="geometry">
2883 2851 <rect>
2884 2852 <x>10</x>
2885   - <y>60</y>
  2853 + <y>50</y>
2886 2854 <width>530</width>
2887 2855 <height>26</height>
2888 2856 </rect>
... ... @@ -2899,7 +2867,7 @@
2899 2867 </property>
2900 2868 <widget class="Label">
2901 2869 <property name="name">
2902   - <cstring>Label3_2_3</cstring>
  2870 + <cstring>Label3_2_3_2</cstring>
2903 2871 </property>
2904 2872 <property name="sizePolicy">
2905 2873 <sizepolicy>
... ... @@ -2954,6 +2922,30 @@
2954 2922 </widget>
2955 2923 </hbox>
2956 2924 </widget>
  2925 + <widget class="Label">
  2926 + <property name="name">
  2927 + <cstring>Label29_2</cstring>
  2928 + </property>
  2929 + <property name="geometry">
  2930 + <rect>
  2931 + <x>10</x>
  2932 + <y>20</y>
  2933 + <width>531</width>
  2934 + <height>30</height>
  2935 + </rect>
  2936 + </property>
  2937 + <property name="font">
  2938 + <font>
  2939 + <italic>1</italic>
  2940 + </font>
  2941 + </property>
  2942 + <property name="text">
  2943 + <string>Please select where you want to install the boot manager.</string>
  2944 + </property>
  2945 + <property name="alignment">
  2946 + <set>WordBreak|AlignVCenter</set>
  2947 + </property>
  2948 + </widget>
2957 2949 <widget class="ScriptObject">
2958 2950 <property name="name">
2959 2951 <cstring>setBootableCheckbox</cstring>
... ... @@ -2991,6 +2983,288 @@
2991 2983 </property>
2992 2984 </widget>
2993 2985 </widget>
  2986 + <widget class="ScriptObject">
  2987 + <property name="name">
  2988 + <cstring>scanDevices_3</cstring>
  2989 + </property>
  2990 + <property name="geometry">
  2991 + <rect>
  2992 + <x>550</x>
  2993 + <y>0</y>
  2994 + <width>32</width>
  2995 + <height>32</height>
  2996 + </rect>
  2997 + </property>
  2998 + <property name="associations" stdset="0">
  2999 + <stringlist>
  3000 + <string>@devicesbox_3.clear
  3001 +@execBegin
  3002 +function get_udisks_key() {
  3003 + LANG=C udisks --show-info $1 | grep " $2:" | head -n1 | sed "s|[[:space:]]*$2:[[:space:]]*\(.*\)|\1|"
  3004 +}
  3005 +devices=`udisks --enumerate-device-files | grep -v /dev/disk | sort -n -r`
  3006 +partlabel=
  3007 +installdevice=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0)
  3008 +homedevice=@String.section(@devicesbox_3.item(@devicesbox_3.currentItem)," ",0)
  3009 +dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_3 "@i18n("none (just use a single partition for system and boot)")" 0
  3010 +for device in $devices; do
  3011 + [ "${device:5}" = "$installdevice" -o "${device:5}" = "$homedevice" ] &amp;&amp; continue
  3012 + if [ "${device:5:3}" != "dm-" ]; then
  3013 + native_path=`get_udisks_key $device native-path`
  3014 + [ -e $native_path/partition ] || continue
  3015 + fi
  3016 + is_system_internal=`get_udisks_key $device "system internal"`
  3017 + volsize=`get_udisks_key $device size`
  3018 + volsize=`expr $volsize / 1024 / 1024`
  3019 + if [ "${device:5:3}" = "dm-" ]; then
  3020 + volname=`sudo dmsetup info $device | grep "^Name:" | sed "s|.*[[:space:]]||"`
  3021 + else
  3022 + volname=`get_udisks_key $device label`
  3023 + fi
  3024 + [ $volsize -ge 512 ] || continue
  3025 + [ "$volname" ] || volname="unnamed"
  3026 + parttype=`get_udisks_key $device usage`
  3027 + [ "$parttype" ] || parttype="unknown"
  3028 + partscheme=`get_udisks_key $device scheme`
  3029 + [ "$partscheme" ] || partscheme="unknown"
  3030 + fstype=`get_udisks_key $device type`
  3031 + [ "$fstype" ] || fstype="unformatted"
  3032 + add_info=""
  3033 + [ "$is_system_internal" = "1" ] || {
  3034 + add_info=",removable"
  3035 + [ @removablebox.checked == 1 ] || continue
  3036 + }
  3037 + if [ "$partscheme" == "mbr" -o "$partscheme" == "embr" ]; then
  3038 + partlabel="$partlabel&lt;br&gt;${device:5} $fstype $volname $volsize MB"
  3039 + case "$fstype" in
  3040 + ext2|ext3|ext4|reiserfs|reiser4|unformatted)
  3041 + dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_3 "${device:5} ($fstype,$volname,$volsize MB${add_info})" 1 ;;
  3042 + *) ;;
  3043 + esac
  3044 + elif [ "$partscheme" == "gpt" -o "$partscheme" == "unknown" -a $volsize -gt 0 ]; then
  3045 + case "$fstype" in
  3046 + swap|iso9660) ;;
  3047 + ext2|ext3|ext4|reiserfs|reiser4|unformatted)
  3048 + dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_3 "${device:5} ($fstype,$volname,$volsize MB${add_info})" 1 ;;
  3049 + *) ;;
  3050 + esac
  3051 + fi
  3052 +done
  3053 +@execEnd
  3054 +</string>
  3055 + </stringlist>
  3056 + </property>
  3057 + </widget>
  3058 + <widget class="ScriptObject">
  3059 + <property name="name">
  3060 + <cstring>setlabel_3</cstring>
  3061 + </property>
  3062 + <property name="geometry">
  3063 + <rect>
  3064 + <x>550</x>
  3065 + <y>40</y>
  3066 + <width>32</width>
  3067 + <height>32</height>
  3068 + </rect>
  3069 + </property>
  3070 + <property name="populationText">
  3071 + <string></string>
  3072 + </property>
  3073 + <property name="associations" stdset="0">
  3074 + <stringlist>
  3075 + <string>@execBegin
  3076 +@if (@devicesbox_3.currentItem &gt;= 0)
  3077 + currdev=@String.section(@devicesbox_3.item(@devicesbox_3.currentItem)," ",0)
  3078 + if [ "$currdev" != "none" -a "$currdev" != "nessuna" ]; then
  3079 + dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_3 "@devicesbox_3.item(@devicesbox_3.currentItem)"
  3080 + else
  3081 + dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_3 ""
  3082 + fi
  3083 + @dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, true)
  3084 + @BackBox.setChecked(true)
  3085 + dcop @dcopid KommanderIf "setCurrentItem(int)" 0
  3086 +@endif
  3087 +@execEnd
  3088 +@setBootableCheckbox.execute()</string>
  3089 + </stringlist>
  3090 + </property>
  3091 + </widget>
  3092 + <widget class="ButtonGroup">
  3093 + <property name="name">
  3094 + <cstring>BootloaderBox</cstring>
  3095 + </property>
  3096 + <property name="geometry">
  3097 + <rect>
  3098 + <x>10</x>
  3099 + <y>70</y>
  3100 + <width>560</width>
  3101 + <height>260</height>
  3102 + </rect>
  3103 + </property>
  3104 + <property name="sizePolicy">
  3105 + <sizepolicy>
  3106 + <hsizetype>3</hsizetype>
  3107 + <vsizetype>4</vsizetype>
  3108 + <horstretch>0</horstretch>
  3109 + <verstretch>0</verstretch>
  3110 + </sizepolicy>
  3111 + </property>
  3112 + <property name="title">
  3113 + <string>Do you want a separate boot partition?</string>
  3114 + </property>
  3115 + <widget class="QLayoutWidget">
  3116 + <property name="name">
  3117 + <cstring>Layout2_2_2</cstring>
  3118 + </property>
  3119 + <property name="geometry">
  3120 + <rect>
  3121 + <x>10</x>
  3122 + <y>210</y>
  3123 + <width>540</width>
  3124 + <height>19</height>
  3125 + </rect>
  3126 + </property>
  3127 + <hbox>
  3128 + <property name="name">
  3129 + <cstring>unnamed</cstring>
  3130 + </property>
  3131 + <property name="margin">
  3132 + <number>0</number>
  3133 + </property>
  3134 + <property name="spacing">
  3135 + <number>6</number>
  3136 + </property>
  3137 + <widget class="Label">
  3138 + <property name="name">
  3139 + <cstring>Label3_2_2</cstring>
  3140 + </property>
  3141 + <property name="sizePolicy">
  3142 + <sizepolicy>
  3143 + <hsizetype>1</hsizetype>
  3144 + <vsizetype>5</vsizetype>
  3145 + <horstretch>0</horstretch>
  3146 + <verstretch>0</verstretch>
  3147 + </sizepolicy>
  3148 + </property>
  3149 + <property name="font">
  3150 + <font>
  3151 + <bold>1</bold>
  3152 + </font>
  3153 + </property>
  3154 + <property name="text">
  3155 + <string>Mount /boot from:</string>
  3156 + </property>
  3157 + <property name="alignment">
  3158 + <set>AlignVCenter|AlignLeft</set>
  3159 + </property>
  3160 + </widget>
  3161 + <widget class="Label">
  3162 + <property name="name">
  3163 + <cstring>showdevice_3</cstring>
  3164 + </property>
  3165 + <property name="sizePolicy">
  3166 + <sizepolicy>
  3167 + <hsizetype>7</hsizetype>
  3168 + <vsizetype>5</vsizetype>
  3169 + <horstretch>0</horstretch>
  3170 + <verstretch>0</verstretch>
  3171 + </sizepolicy>
  3172 + </property>
  3173 + <property name="text">
  3174 + <string></string>
  3175 + </property>
  3176 + <property name="associations" stdset="0">
  3177 + <stringlist>
  3178 + <string></string>
  3179 + </stringlist>
  3180 + </property>
  3181 + </widget>
  3182 + </hbox>
  3183 + </widget>
  3184 + <widget class="Label">
  3185 + <property name="name">
  3186 + <cstring>Label22_2_2_3</cstring>
  3187 + </property>
  3188 + <property name="geometry">
  3189 + <rect>
  3190 + <x>10</x>
  3191 + <y>240</y>
  3192 + <width>530</width>
  3193 + <height>16</height>
  3194 + </rect>
  3195 + </property>
  3196 + <property name="sizePolicy">
  3197 + <sizepolicy>
  3198 + <hsizetype>3</hsizetype>
  3199 + <vsizetype>5</vsizetype>
  3200 + <horstretch>0</horstretch>
  3201 + <verstretch>0</verstretch>
  3202 + </sizepolicy>
  3203 + </property>
  3204 + <property name="font">
  3205 + <font>
  3206 + <italic>1</italic>
  3207 + </font>
  3208 + </property>
  3209 + <property name="text">
  3210 + <string>Warning: selected partition will be formatted and all current data will be lost.</string>
  3211 + </property>
  3212 + </widget>
  3213 + <widget class="Label">
  3214 + <property name="name">
  3215 + <cstring>Label24_2_4</cstring>
  3216 + </property>
  3217 + <property name="geometry">
  3218 + <rect>
  3219 + <x>10</x>
  3220 + <y>20</y>
  3221 + <width>540</width>
  3222 + <height>40</height>
  3223 + </rect>
  3224 + </property>
  3225 + <property name="font">
  3226 + <font>
  3227 + <italic>1</italic>
  3228 + </font>
  3229 + </property>
  3230 + <property name="text">
  3231 + <string>Please, select the boot partition. This is an optional feature for advanced users, in most cases it is safe to skip this choice.</string>
  3232 + </property>
  3233 + <property name="textFormat">
  3234 + <enum>RichText</enum>
  3235 + </property>
  3236 + <property name="alignment">
  3237 + <set>WordBreak|AlignTop</set>
  3238 + </property>
  3239 + </widget>
  3240 + <widget class="ListBox">
  3241 + <property name="name">
  3242 + <cstring>devicesbox_3</cstring>
  3243 + </property>
  3244 + <property name="geometry">
  3245 + <rect>
  3246 + <x>10</x>
  3247 + <y>70</y>
  3248 + <width>540</width>
  3249 + <height>140</height>
  3250 + </rect>
  3251 + </property>
  3252 + <property name="currentItem">
  3253 + <number>-1</number>
  3254 + </property>
  3255 + <property name="selectionMode">
  3256 + <enum>Single</enum>
  3257 + </property>
  3258 + <property name="populationText">
  3259 + <string></string>
  3260 + </property>
  3261 + <property name="associations" stdset="0">
  3262 + <stringlist>
  3263 + <string></string>
  3264 + </stringlist>
  3265 + </property>
  3266 + </widget>
  3267 + </widget>
2994 3268 </widget>
2995 3269 <widget class="QWidget">
2996 3270 <property name="name">
... ... @@ -3232,6 +3506,9 @@
3232 3506 installhomedevice=@String.section(@devicesbox_2.item(@devicesbox_2.currentItem)," ",0)
3233 3507 [ "$installhomedevice" = "none" ] &amp;&amp; installhomedevice=
3234 3508  
  3509 +installbootdevice=@String.section(@devicesbox_3.item(@devicesbox_3.currentItem)," ",0)
  3510 +[ "$installbootdevice" = "none" ] &amp;&amp; installbootdevice=
  3511 +
3235 3512 cat &gt;&gt;$conffile &lt;&lt; _EOF
3236 3513 INSTALL_DEVICE='/dev/$installdevice'
3237 3514 INSTALL_DRIVER='@driverlabel.text'
... ... @@ -3252,6 +3529,13 @@
3252 3529 _EOF
3253 3530 fi
3254 3531  
  3532 +if [ "$installbootdevice" -a "${installbootdevice:0:1}" != "n" ]; then
  3533 +cat &gt;&gt;$conffile &lt;&lt; _EOF
  3534 +INSTALL_BOOT_DEVICE='/dev/$installbootdevice'
  3535 +INSTALL_BOOT_FORMAT='1'
  3536 +INSTALL_BOOT_FSTYPE='@fstypebox.item(@fstypebox.currentItem)'
  3537 +_EOF
  3538 +fi
3255 3539 @execEnd
3256 3540  
3257 3541 @if (@Message.question(@i18n("Selected partition") (@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0)) @i18n("will be formatted; all data will be lost. OK to format?"), @i18n("Warning"), @i18n("OK"), @i18n("Abort")) == 1)
3258 3542  
3259 3543