Changeset 2351
- Timestamp:
- 10/29/07 08:47:48 (6 years ago)
- Location:
- pkg/main/parsix-installer/trunk
- Files:
-
- 5 edited
-
TODO (modified) (1 diff)
-
boot-tools.bm (modified) (8 diffs)
-
debian/changelog (modified) (1 diff)
-
parsix-installer (modified) (2 diffs)
-
parsix-installer.8 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pkg/main/parsix-installer/trunk/TODO
r96 r2351 1 - Detect existing installations automatically.2 1 - Some more clean-ups. -
pkg/main/parsix-installer/trunk/boot-tools.bm
r2338 r2351 545 545 } 546 546 547 # Make sure mtab in the chroot reflects the currently mounted partitions. 548 update_mtab() { 549 [ "$ROOT" ] || return 0 550 551 mtab=$ROOT/etc/mtab 552 grep "$ROOT" /proc/mounts | ( 553 while read devpath mountpoint fstype options n1 n2 ; do 554 devpath=`mapdevfs $devpath || echo $devpath` 555 mountpoint=`echo $mountpoint | sed "s%^$ROOT%%"` 556 # The sed line removes the mount point for root. 557 if [ -z "$mountpoint" ] ; then 558 mountpoint="/" 559 fi 560 echo $devpath $mountpoint $fstype $options $n1 $n2 561 done ) > $mtab 562 } 563 564 is_floppy () { 565 echo "$1" | grep -q '(fd' || echo "$1" | grep -q "/dev/fd" || echo "$1" | grep -q floppy 566 } 567 547 568 grub_write_chain() { 548 569 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF … … 581 602 } # grub_write_chain end 582 603 604 grub2_write_chain() { 605 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 606 607 # This entry automatically added by the Debian installer for a non-linux OS 608 # on $partition 609 menuentry "$title" { 610 set root=$grubdrive 611 chainloader +1 612 } 613 EOF 614 615 } # grub2_write_chain end 616 617 grub_write_linux() { 618 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 619 620 # This entry automatically added by the Debian installer for an existing 621 # linux installation on $mappedpartition. 622 title $label (on $mappedpartition) 623 root $grubdrive 624 kernel $kernel $params 625 EOF 626 if [ -n "$initrd" ]; then 627 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 628 initrd $initrd 629 EOF 630 fi 631 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 632 savedefault 633 boot 634 635 EOF 636 } # grub_write_linux end 637 638 grub2_write_linux() { 639 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 640 641 # This entry automatically added by the Debian installer for an existing 642 # linux installation on $mappedpartition. 643 menuentry "$label (on $mappedpartition)" { 644 set root=$grubdrive 645 linux $kernel $params 646 EOF 647 if [ -n "$initrd" ]; then 648 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 649 initrd $initrd 650 EOF 651 fi 652 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 653 } 654 655 EOF 656 } # grub2_write_linux end 657 658 grub_write_hurd() { 659 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 660 661 # This entry automatically added by the Debian installer for an existing 662 # hurd installation on $partition. 663 title $title (on $partition) 664 root $grubdrive 665 kernel /boot/gnumach.gz root=device:$hurddrive 666 module /hurd/ext2fs.static --readonly \\ 667 --multiboot-command-line=\${kernel-command-line} \\ 668 --host-priv-port=\${host-port} \\ 669 --device-master-port=\${device-port} \\ 670 --exec-server-task=\${exec-task} -T typed \${root} \\ 671 \$(task-create) \$(task-resume) 672 module /lib/ld.so.1 /hurd/exec \$(exec-task=task-create) 673 savedefault 674 boot 675 676 EOF 677 } # grub_write_hurd end 678 679 grub2_write_hurd() { 680 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst <<EOF 681 682 # This entry automatically added by the Debian installer for an existing 683 # hurd installation on $partition. 684 menuentry "$title (on $partition)" { 685 set root=$grubdrive 686 multiboot /boot/gnumach.gz root=device:$hurddrive 687 module /hurd/ext2fs.static --readonly \\ 688 --multiboot-command-line=\${kernel-command-line} \\ 689 --host-priv-port=\${host-port} \\ 690 --device-master-port=\${device-port} \\ 691 --exec-server-task=\${exec-task} -T typed \${root} \\ 692 \$(task-create) \$(task-resume) 693 module /lib/ld.so.1 /hurd/exec \$(exec-task=task-create) 694 } 695 583 696 grub_write_divider() { 584 697 cat >> $TARGET_MNT_POINT/boot/grub/menu.lst << EOF … … 591 704 EOF 592 705 } # grub_write_divider end 706 707 # Convert a linux non-devfs disk device name into the hurd's syntax 708 translate_hurd_to_grub () { 709 dr_type=$(expr "$1" : '.*\([hs]d\)[a-h][0-9]*') 710 dr_letter=$(expr "$1" : '.*d\([a-h]\)[0-9]*') 711 dr_part=$(expr "$1" : '.*d[a-h]\([0-9]*\)') 712 case "$dr_letter" in 713 a) dr_num=0 ;; 714 b) dr_num=1 ;; 715 c) dr_num=2 ;; 716 d) dr_num=3 ;; 717 e) dr_num=4 ;; 718 f) dr_num=5 ;; 719 g) dr_num=6 ;; 720 h) dr_num=7 ;; 721 esac 722 echo "$dr_type${dr_num}s$dr_part" 723 } 593 724 594 725 install_grub() … … 682 813 #Suspend2 683 814 SWAP=$(cat $TARGET_MNT_POINT/etc/fstab | grep swap | awk '{print $1}') 684 GRUB_CMDLINE="$GRUB_CMDLINE resume 2=swap:$SWAP"815 GRUB_CMDLINE="$GRUB_CMDLINE resume=swap:$SWAP" 685 816 #end Suspend2 686 817 … … 697 828 perl -pi -e "s|^# kopt=root=(.*) ro|# kopt=root=\1 ro $GRUB_CMDLINE|g" $TARGET_MNT_POINT/boot/grub/menu.lst 698 829 699 # Add other Operating Systems 830 # Add other Operating Systems, Be sure to remove installed Parsix partition 700 831 os-prober > /tmp/os-probed 832 cat /tmp/os-probed | grep -v "$HD_CHOICE" > /tmp/os-probed.tmp 833 mv /tmp/os-probed.tmp /tmp/os-probed 2>/dev/null 701 834 702 835 export device_map=$TARGET_MNT_POINT/boot/grub/device.map 836 837 # update menu.lst 838 chroot_it update-grub -y >/dev/null 2>/dev/null 839 840 PARSIXVER=`cat /etc/parsix-version | awk '{print $3}'` 841 sed -i "s/Debian GNU\/Linux/Parsix GNU\/Linux $PARSIXVER/g" $TARGET_MNT_POINT/boot/grub/menu.lst 842 sed -i 's/nomce\ \vga/nomce\ \quiet\ \vga/g' $TARGET_MNT_POINT/boot/grub/menu.lst 703 843 704 844 if [ -s /tmp/os-probed ]; then … … 706 846 fi 707 847 848 newline=" 849 " 850 # GRUB Legacy defaults 851 grub_version="grub" 852 853 OLDIFS="$IFS" 854 IFS="$newline" 708 855 for os in $(cat /tmp/os-probed); do 709 title=$(echo "$os" | cut -d: -f2) 710 shortname=$(echo "$os" | cut -d: -f3) 711 type=$(echo "$os" | cut -d: -f4) 712 713 case "$type" in 714 chain) 715 partition=$(mapdevfs $(echo "$os" | cut -d: -f1)) 716 grubdrive=$(translate_linux_to_grub "$partition") || true 717 if [ -n "$grubdrive" ]; then 718 grub_write_chain 719 fi 720 ;; 721 esac 722 done 856 IFS="$OLDIFS" 857 title=$(echo "$os" | cut -d: -f2) 858 shortname=$(echo "$os" | cut -d: -f3) 859 type=$(echo "$os" | cut -d: -f4) 860 case "$type" in 861 chain) 862 partition=$(mapdevfs $(echo "$os" | cut -d: -f1)) 863 grubdrive=$(translate_linux_to_grub "$partition") || true 864 if [ -n "$grubdrive" ]; then 865 case $grub_version in 866 grub) grub_write_chain ;; 867 grub2) grub2_write_chain ;; 868 esac 869 fi 870 ;; 871 linux) 872 partition=$(echo "$os" | cut -d: -f1) 873 mappedpartition=$(mapdevfs "$partition") 874 IFS="$newline" 875 for entry in $(linux-boot-prober "$partition"); do 876 IFS="$OLDIFS" 877 bootpart=$(echo "$entry" | cut -d: -f2) 878 mappedbootpart=$(mapdevfs "$bootpart") || true 879 if [ -z "$mappedbootpart" ]; then 880 mappedbootpart="$bootpart" 881 fi 882 label=$(echo "$entry" | cut -d : -f3) 883 if [ -z "$label" ]; then 884 label="$title" 885 fi 886 kernel=$(echo "$entry" | cut -d : -f4) 887 initrd=$(echo "$entry" | cut -d : -f5) 888 if echo "$kernel" | grep -q '^/boot/' && \ 889 [ "$mappedbootpart" != "$mappedpartition" ]; then 890 # separate /boot partition 891 kernel=$(echo "$kernel" | sed 's!^/boot!!') 892 initrd=$(echo "$initrd" | sed 's!^/boot!!') 893 grubdrive=$(translate_linux_to_grub "$mappedbootpart") || true 894 else 895 grubdrive=$(translate_linux_to_grub "$mappedpartition") || true 896 fi 897 params="$(echo "$entry" | cut -d : -f6-) $serial" 898 case $grub_version in 899 grub) grub_write_linux ;; 900 grub2) grub2_write_linux ;; 901 esac 902 IFS="$newline" 903 done 904 IFS="$OLDIFS" 905 ;; 906 hurd) 907 partition=$(mapdevfs $(echo "$os" | cut -d: -f1)) 908 grubdrive=$(translate_linux_to_grub "$partition") || true 909 hurddrive=$(translate_hurd_to_grub "$partition") || true 910 # Use the standard hurd boilerplate to boot it. 911 case $grub_version in 912 grub) grub_write_hurd ;; 913 grub2) grub2_write_hurd ;; 914 esac 915 ;; 916 esac 917 IFS="$newline" 918 done 919 IFS="$OLDIFS" 920 rm -f /tmp/os-probed 2>/dev/null 921 723 922 # End Adding other Operating Systems 724 725 # update menu.lst726 chroot_it update-grub -y >/dev/null 2>/dev/null727 923 728 924 # hook update-grub -y into the kernel installing chain … … 761 957 } 762 958 763 final_cleanup(){764 PARSIXVER=`cat /etc/parsix-version | awk '{print $3}'`765 sed -i "s/Debian GNU\/Linux/Parsix GNU\/Linux $PARSIXVER/g" $TARGET_MNT_POINT/boot/grub/menu.lst766 sed -i 's/nomce\ \vga/nomce\ \quiet\ \vga/g' $TARGET_MNT_POINT/boot/grub/menu.lst767 768 # disable auto-login, KDM and GDM769 if [ -f /etc/init.d/gdm ]; then770 sed -i -e "s/AutomaticLoginEnable=true//" \771 -e "s/AutomaticLogin=parsix//" \772 $TARGET_MNT_POINT/etc/gdm/gdm.conf773 elif [ -f /etc/init.d/kdm ]; then774 sed -i -e "s/AutoReLogin=1true//" \775 -e "s/AutoLoginEnable=true//" \776 -e "s/AutoLoginAgain=true//" \777 -e "s/AutoLoginDelay=1//" \778 -e "s/AutoLoginUser=parsix//" \779 $TARGET_MNT_POINT/etc/kde3/kdm/kdmrc780 fi781 782 # some clean-ups783 rm -rf $TARGET_MNT_POINT/none/784 rm -rf $TARGET_MNT_POINT/rr_moved/785 rm -f $TARGET_MNT_POINT/boot/message786 787 # cleaning unwanted links788 if [ -x $TARGET_MNT_POINT/etc/rcS.d/S00live-autoconfig ]; then789 rm -f $TARGET_MNT_POINT/etc/rcS.d/S00live-autoconfig790 fi791 if [ -x $TARGET_MNT_POINT/etc/rc6.d/S90live-reboot ]; then792 rm -f $TARGET_MNT_POINT/etc/rc6.d/S90live-reboot793 fi794 if [ -x $TARGET_MNT_POINT/etc/rc0.d/S90live-halt ]; then795 rm -f $TARGET_MNT_POINT/etc/rc0.d/S90live-halt796 fi797 798 if [ -x $TARGET_MNT_POINT/etc/rc5.d/S80xprep ]; then799 rm -f $TARGET_MNT_POINT/etc/rc5.d/S80xprep800 fi801 802 for x in $TARGET_MNT_POINT/home/*803 do804 if [ -f $TARGET_MNT_POINT/home/$x/Desktop/parsix-installer.desktop ]; then805 rm -f $TARGET_MNT_POINT/home/$x/Desktop/parsix-installer.desktop806 fi807 done808 }809 810 959 # Requierements: $BOOT_WHERE, $TARGET_MNT_POINT 811 960 # … … 866 1015 then 867 1016 install_grub 868 final_cleanup869 1017 else 870 1018 install_lilo -
pkg/main/parsix-installer/trunk/debian/changelog
r2337 r2351 1 parsix-installer (0.81.1) unstable; urgency=low 2 3 * Updated manpage 4 * Supports TuxOnIce 3.0 5 * Implemented other distro detection system based on D-I 6 * Moved final_cleanup to the right section 7 8 -- Alan Baghumian <alan@technotux.org> Mon, 29 Oct 2007 08:27:44 +0330 9 1 10 parsix-installer (0.81.0) barry; urgency=low 2 11 -
pkg/main/parsix-installer/trunk/parsix-installer
r2337 r2351 153 153 echo -e "XXX\n$*\nXXX" 154 154 logit "$*" 155 } 156 157 function final_cleanup 158 { 159 # disable auto-login, KDM and GDM 160 if [ -f /etc/init.d/gdm ]; then 161 sed -i -e "s/AutomaticLoginEnable=true//" \ 162 -e "s/AutomaticLogin=parsix//" \ 163 $TARGET_MNT_POINT/etc/gdm/gdm.conf 164 elif [ -f /etc/init.d/kdm ]; then 165 sed -i -e "s/AutoReLogin=1true//" \ 166 -e "s/AutoLoginEnable=true//" \ 167 -e "s/AutoLoginAgain=true//" \ 168 -e "s/AutoLoginDelay=1//" \ 169 -e "s/AutoLoginUser=parsix//" \ 170 $TARGET_MNT_POINT/etc/kde3/kdm/kdmrc 171 fi 172 173 # some clean-ups 174 rm -rf $TARGET_MNT_POINT/none/ 175 rm -rf $TARGET_MNT_POINT/rr_moved/ 176 rm -f $TARGET_MNT_POINT/boot/message 177 178 # cleaning unwanted links 179 if [ -x $TARGET_MNT_POINT/etc/rcS.d/S00live-autoconfig ]; then 180 rm -f $TARGET_MNT_POINT/etc/rcS.d/S00live-autoconfig 181 fi 182 if [ -x $TARGET_MNT_POINT/etc/rc6.d/S90live-reboot ]; then 183 rm -f $TARGET_MNT_POINT/etc/rc6.d/S90live-reboot 184 fi 185 if [ -x $TARGET_MNT_POINT/etc/rc0.d/S90live-halt ]; then 186 rm -f $TARGET_MNT_POINT/etc/rc0.d/S90live-halt 187 fi 188 189 if [ -x $TARGET_MNT_POINT/etc/rc5.d/S80xprep ]; then 190 rm -f $TARGET_MNT_POINT/etc/rc5.d/S80xprep 191 fi 192 193 for x in $TARGET_MNT_POINT/home/* 194 do 195 if [ -f $TARGET_MNT_POINT/home/$x/Desktop/parsix-installer.desktop ]; then 196 rm -f $TARGET_MNT_POINT/home/$x/Desktop/parsix-installer.desktop 197 fi 198 done 155 199 } 156 200 … … 333 377 { 334 378 echo "" 335 INSTALL_LIST="module_hd_doaction module_swap_doaction update_fstab old_installer add_bootmanager :"379 INSTALL_LIST="module_hd_doaction module_swap_doaction update_fstab old_installer add_bootmanager final_cleanup :" 336 380 INSTALL_LIST_NUM=$[6-1] 337 381 N=0; -
pkg/main/parsix-installer/trunk/parsix-installer.8
r1817 r2351 1 .TH Parsix-Installer 8 " July 2007" "Release: 0.80.2"1 .TH Parsix-Installer 8 "November 2007" "Release: 0.81.0" 2 2 .SH NAME 3 3 Parsix GNU/Linux Installation Script - parsix-installer … … 44 44 45 45 .SH MORE QUESTIONS 46 If you hve more questions about installing Parsix GNU/Linux on hard disk you can ask in Parsix IRC chanel at \fIirc.freenode.net/#parsix\fR or ask it in Parsix GNU/Linux Mailing List, for more information about Parsix Mailing list see \fIhttp:// lists.parsix.org\fR.46 If you hve more questions about installing Parsix GNU/Linux on hard disk you can ask in Parsix IRC chanel at \fIirc.freenode.net/#parsix\fR or ask it in Parsix GNU/Linux Mailing List, for more information about Parsix Mailing list see \fIhttp://parsix.org/mailman/listinfo\fR. 47 47 48 48 .SH FILES
Note: See TracChangeset
for help on using the changeset viewer.


