11 |
# Install Navigation Gui |
# Install Navigation Gui |
12 |
# |
# |
13 |
|
|
14 |
|
# ignore environment! |
15 |
|
LC_ALL=C |
16 |
|
|
17 |
#images: (get ${CDIMAGENAME}) |
#images: (get ${CDIMAGENAME}) |
18 |
source /mnt/cdrom/system/images.conf |
source /mnt/cdrom/system/images.conf |
19 |
|
|
35 |
#TOTALLINES=11072 # -> now in images.conf |
#TOTALLINES=11072 # -> now in images.conf |
36 |
|
|
37 |
# standard kernel opts |
# standard kernel opts |
38 |
KERNELOPTS="quiet splash=silent,theme=default" |
KERNELOPTS="quiet video=1024x768" |
39 |
|
|
40 |
|
# grub options |
41 |
|
GRUBLEGACYOPTS="" |
42 |
|
GRUB2OPTS="" |
43 |
|
GRUB2GFXPAYLOAD="1024x768x16,1024x768" |
44 |
|
|
45 |
|
# fdisk options |
46 |
|
FDISKPARTIONBELOW256MB=0 |
47 |
|
|
48 |
# default specialdevices |
# default specialdevices |
49 |
SPECIALDEVICE="" |
SPECIALDEVICE="" |
50 |
|
FORMFACTOR="desktop" |
51 |
|
|
52 |
# target filesystem |
# target filesystem |
53 |
FORMAT_FILESYSTEM="ext4" |
FORMAT_FILESYSTEM="ext4" |
98 |
Bitte ${SHDD}1 als \Z3bootable\Zn markieren." 12 81 |
Bitte ${SHDD}1 als \Z3bootable\Zn markieren." 12 81 |
99 |
} |
} |
100 |
|
|
101 |
dialog_setup_hdd_info_flash() |
dialog_setup_hdd_info_simple() |
102 |
{ |
{ |
103 |
local SHDD="$(echo $HDD | sed 's/\/dev\///')" |
local SHDD="$(echo $HDD | sed 's/\/dev\///')" |
104 |
|
|
148 |
then |
then |
149 |
case "${i}" in |
case "${i}" in |
150 |
"1") run_install_auto ;; |
"1") run_install_auto ;; |
151 |
"2") run_install_normal ;; |
"2") run_install_normal ;; |
152 |
"3") run_install_flash ;; |
"3") run_install_simple ;; |
153 |
"") dialog_setup_system_menu;; |
"") dialog_setup_system_menu;; |
154 |
esac |
esac |
155 |
fi |
fi |
211 |
# other devices |
# other devices |
212 |
run_hardware_detection |
run_hardware_detection |
213 |
case "${SPECIALDEVICE}" in |
case "${SPECIALDEVICE}" in |
214 |
zotac) echo " \n\n\n \\Z2Zotac Device erkannt!\\Zn \\" >> ${hwtmp} ;; |
zotac*) echo " \n\n\n \\Z2Zotac Device erkannt.\\Zn \\" >> ${hwtmp} ;; |
215 |
*) echo " \n\n\n \\ZnStandard Device erkannt!\\Zn \\" >> ${hwtmp} ;; |
rangee) echo " \n\n\n \\Z2Rangee Device erkannt.\\Zn \\" >> ${hwtmp} ;; |
216 |
|
maxdata) echo " \n\n\n \\Z2Maxdata Device erkannt.\\Zn \\" >> ${hwtmp} ;; |
217 |
|
i845) echo " \n\n\n \\Z2Intel i845 Device erkannt.\\Zn \\" >> ${hwtmp} ;; |
218 |
|
*) echo " \n\n\n \\ZnStandard Device erkannt.\\Zn \\" >> ${hwtmp} ;; |
219 |
esac |
esac |
220 |
|
if [[ ${FORMFACTOR} = laptop ]] |
221 |
|
then |
222 |
|
echo " \n \\ZnFormfactor Laptop, Powersave Modus 'ondemand' wird aktiviert.\\Zn \\" >> ${hwtmp} |
223 |
|
fi |
224 |
|
|
225 |
echo " \" 13 70" >> ${hwtmp} |
echo " \" 14 70" >> ${hwtmp} |
226 |
chmod a+x ${hwtmp} |
chmod a+x ${hwtmp} |
227 |
${hwtmp} |
${hwtmp} |
228 |
|
|
271 |
fi |
fi |
272 |
} |
} |
273 |
|
|
274 |
dialog_setup_hdd_partitions_manuell_flash() |
dialog_setup_hdd_partitions_manuell_simple() |
275 |
{ |
{ |
276 |
local i |
local i |
277 |
|
|
303 |
[[ ${RES} -eq 1 ]] && return 1 |
[[ ${RES} -eq 1 ]] && return 1 |
304 |
if [[ ${RES} -eq 0 ]] |
if [[ ${RES} -eq 0 ]] |
305 |
then |
then |
306 |
dialog_setup_hdd_info_flash |
dialog_setup_hdd_info_simple |
307 |
setup_hdd_partitions_manuell_flash |
setup_hdd_partitions_manuell_simple |
308 |
fi |
fi |
309 |
fi |
fi |
310 |
} |
} |
436 |
if [[ ${RES} -eq 0 ]] |
if [[ ${RES} -eq 0 ]] |
437 |
then |
then |
438 |
case ${METHOD} in |
case ${METHOD} in |
439 |
"1") dialog_setup_system_menu ;; |
"1") dialog_setup_system_menu ;; |
440 |
"2") dialog_hardware_detection ;; |
"2") dialog_hardware_detection ;; |
441 |
"3") install_do_reboot ;; |
"3") install_do_reboot ;; |
442 |
"4") /bin/bash --login -i ;; |
"4") /bin/bash --login -i ;; |
450 |
################################################# |
################################################# |
451 |
run_hardware_detection() |
run_hardware_detection() |
452 |
{ |
{ |
453 |
|
local hwinfo |
454 |
|
|
455 |
|
hwinfo="$(hwinfo --bios --storage --pci --gfxcard --sys)" |
456 |
|
|
457 |
# check for special devices/clients: |
# check for special devices/clients: |
458 |
# if zotac a zotac and the disk is a removeable device, then add rootdelay to kernelcmd |
# if zotac a zotac and the disk is a removeable device, then add rootdelay to kernelcmd |
459 |
local removable=0 |
local removable=0 |
460 |
if [[ ! -z $(hwinfo --bios --storage | grep -i zotac) ]] |
if [[ ! -z $(echo "${hwinfo}" | grep -i zotac) ]] |
461 |
then |
then |
462 |
for i in /sys/block/[hs]d*/removable |
for i in /sys/block/[hs]d*/removable |
463 |
do |
do |
467 |
fi |
fi |
468 |
done |
done |
469 |
|
|
470 |
export KERNELOPTS="${KERNELOPTS} rootdelay=8" |
# only add this for grub legacy, grub2 detect these settings on its own |
471 |
export SPECIALDEVICE="zotac" |
export GRUBLEGACYOPTS="rootdelay=8" |
472 |
|
# there are two zotac types in the wild, nvidia based gfx and intel |
473 |
|
if [[ ! -z $(echo "${hwinfo}" | grep -i nouveau) ]] |
474 |
|
then |
475 |
|
export SPECIALDEVICE="zotac_nvidia" |
476 |
|
else |
477 |
|
export SPECIALDEVICE="zotac_intel" |
478 |
|
fi |
479 |
|
fi |
480 |
|
|
481 |
|
# check for special devices/clients: |
482 |
|
# if a rangee and disk ist smaller then 256mb move partion one block further ahead |
483 |
|
if [[ ! -z $(echo "${hwinfo}" | grep -i CLE266) ]] |
484 |
|
then |
485 |
|
# for a rangee always define partion startblock +1 |
486 |
|
export FDISKPARTIONBELOW256MB="1" |
487 |
|
export SPECIALDEVICE="rangee" |
488 |
|
export GRUBLEGACYOPTS="" |
489 |
|
fi |
490 |
|
|
491 |
|
# check for special devices/clients: |
492 |
|
# check for maxdata / i810/ i815 Chipsets and disable KMS and use i810fb frambuffer |
493 |
|
if [[ ! -z $(echo "${hwinfo}" | grep -i i810) ]] || [[ ! -z $(echo "${hwinfo}" | grep -i i815) ]] |
494 |
|
then |
495 |
|
export SPECIALDEVICE="maxdata" |
496 |
|
export GRUBLEGACYOPTS="" |
497 |
|
fi |
498 |
|
|
499 |
|
# check for i845 Chipsets and disable KMS and use 915 drm driver |
500 |
|
if [[ ! -z $(echo "${hwinfo}" | grep -i i845) ]] |
501 |
|
then |
502 |
|
export SPECIALDEVICE="i845" |
503 |
|
# unset default video=1024x768 opt or the drm driver breaks |
504 |
|
export KERNELOPTS="quiet" |
505 |
|
export GRUBLEGACYOPTS="" |
506 |
|
# enable full kms support |
507 |
|
export GRUB2GFXPAYLOAD="keep" |
508 |
|
fi |
509 |
|
|
510 |
|
# check for radeon gfxcards |
511 |
|
if [[ ! -z $(echo "${hwinfo}" | grep -i radeon) ]] |
512 |
|
then |
513 |
|
# enable full kms support |
514 |
|
export GRUB2GFXPAYLOAD="keep" |
515 |
|
fi |
516 |
|
|
517 |
|
# check for special devices/clients: |
518 |
|
# check for laptops and activate cpufreq scaling |
519 |
|
if [[ $(echo "${hwinfo}" | grep 'Formfactor:' | sed 's:.*Formfactor\:\ \"\(.*\)\":\1:') = laptop ]] |
520 |
|
then |
521 |
|
export FORMFACTOR="laptop" |
522 |
|
export KERNELOPTS="${KERNELOPTS} cpufreq.governor=ondemand" |
523 |
|
fi |
524 |
|
} |
525 |
|
|
526 |
|
hdd_size_below_256mb() |
527 |
|
{ |
528 |
|
local hdd="$1" |
529 |
|
local size |
530 |
|
local retval |
531 |
|
[[ -z ${hdd} ]] && die "Error: get_hdd_size() no \$hdd given!" |
532 |
|
|
533 |
|
size=$(fdisk -l ${hdd} | grep "Disk.*${hdd}" | sed 's:.*,\ \(.*\)\ byte.*:\1:') |
534 |
|
if [[ ${size} -le 257000000 ]] |
535 |
|
then |
536 |
|
retval="0" |
537 |
|
else |
538 |
|
retval="1" |
539 |
fi |
fi |
540 |
|
|
541 |
|
return "${retval}" |
542 |
} |
} |
543 |
|
|
544 |
setup_hdd_partitions_auto() |
setup_hdd_partitions_auto() |
545 |
{ |
{ |
546 |
ROOTHDD="${HDD}1" |
ROOTHDD="${HDD}1" |
547 |
|
|
548 |
|
# run this only if FDISKPARTITIONBELOW256MB is not already 1 |
549 |
|
if [[ ${FDISKPARTIONBELOW256MB} != 1 ]] |
550 |
|
then |
551 |
|
if hdd_size_below_256mb ${HDD} |
552 |
|
then |
553 |
|
FDISKPARTIONBELOW256MB=1 |
554 |
|
else |
555 |
|
FDISKPARTIONBELOW256MB=0 |
556 |
|
fi |
557 |
|
fi |
558 |
|
|
559 |
## delete disk |
## delete disk |
560 |
dd if=/dev/zero of=${HDD} count=1 &> /dev/null || die |
dd if=/dev/zero of=${HDD} count=1 &> /dev/null || die |
561 |
|
|
562 |
## setup one bootable partition |
if [[ ${FDISKPARTIONBELOW256MB} = 1 ]] |
563 |
#1. n= new disk |
then |
564 |
#2. p= primary disk |
## setup one bootable partition |
565 |
#3. 1= first partition |
#1. n= new disk |
566 |
#4. ''= default sector start |
#2. p= primary disk |
567 |
#5. ''= defaul sector end |
#3. 1= first partition |
568 |
#6. a= bootable flag |
#4. 2= default sector start // small disk needs more space for grub2 mbr sector |
569 |
#7. 1= boot flag for partition 1 |
#5. ''= defaul sector end |
570 |
#8. w= write/quit |
#6. a= bootable flag |
571 |
fdisk ${HDD} &> /dev/null << EOF |
#7. 1= boot flag for partition 1 |
572 |
|
#8. w= write/quit |
573 |
|
fdisk ${HDD} &> /dev/null << EOF |
574 |
|
n |
575 |
|
p |
576 |
|
1 |
577 |
|
2 |
578 |
|
|
579 |
|
a |
580 |
|
1 |
581 |
|
w |
582 |
|
EOF |
583 |
|
else |
584 |
|
## setup one bootable partition |
585 |
|
#1. n= new disk |
586 |
|
#2. p= primary disk |
587 |
|
#3. 1= first partition |
588 |
|
#4. ''= default sector start |
589 |
|
#5. ''= defaul sector end |
590 |
|
#6. a= bootable flag |
591 |
|
#7. 1= boot flag for partition 1 |
592 |
|
#8. w= write/quit |
593 |
|
fdisk ${HDD} &> /dev/null << EOF |
594 |
n |
n |
595 |
p |
p |
596 |
1 |
1 |
600 |
1 |
1 |
601 |
w |
w |
602 |
EOF |
EOF |
603 |
|
fi |
604 |
} |
} |
605 |
|
|
606 |
setup_hdd_partitions_manuell() |
setup_hdd_partitions_manuell() |
613 |
cfdisk ${HDD} || die |
cfdisk ${HDD} || die |
614 |
} |
} |
615 |
|
|
616 |
setup_hdd_partitions_manuell_flash() |
setup_hdd_partitions_manuell_simple() |
617 |
{ |
{ |
618 |
ROOTHDD="${HDD}1" |
ROOTHDD="${HDD}1" |
619 |
|
|
628 |
mke2fs -j -q ${ROOTHDD} || die |
mke2fs -j -q ${ROOTHDD} || die |
629 |
} |
} |
630 |
|
|
631 |
setup_hdd_format_flash() |
setup_hdd_format_simple() |
632 |
{ |
{ |
633 |
mke2fs -j -q ${ROOTHDD} || die |
mke2fs -j -q ${ROOTHDD} || die |
634 |
} |
} |
642 |
cd ${INSTALLPATH} || die |
cd ${INSTALLPATH} || die |
643 |
} |
} |
644 |
|
|
645 |
install_mount_rootfs_flash() |
install_mount_rootfs_simple() |
646 |
{ |
{ |
647 |
mount ${ROOTHDD} ${INSTALLPATH} || die |
mount ${ROOTHDD} ${INSTALLPATH} || die |
648 |
install -d ${INSTALLPATH}/boot || die |
install -d ${INSTALLPATH}/boot || die |
658 |
{ |
{ |
659 |
local my_roothdd |
local my_roothdd |
660 |
local grubconf=${INSTALLPATH}/boot/grub/grub.conf |
local grubconf=${INSTALLPATH}/boot/grub/grub.conf |
661 |
local grub2conf=${INSTALLPATH}/boot/grub/grub.cfg |
local grub2conf=/boot/grub/grub.cfg |
662 |
|
|
663 |
# check for grub2 |
# check for grub2 |
664 |
if [[ -f ${INSTALLPATH}/sbin/grub-mkconfig ]] |
if [[ -f ${INSTALLPATH}/sbin/grub-mkconfig ]] |
666 |
# needed by grub-mkconfig on the first run |
# needed by grub-mkconfig on the first run |
667 |
if [[ ! -f ${INSTALLPATH}/boot/grub/video.lst ]] |
if [[ ! -f ${INSTALLPATH}/boot/grub/video.lst ]] |
668 |
then |
then |
669 |
install -m0644 ${INSTALLPATH}/lib/grub/*/video.lst /boot/grub/video.lst |
install -m0644 ${INSTALLPATH}/lib/grub/*/video.lst ${INSTALLPATH}/boot/grub/video.lst || die |
670 |
fi |
fi |
671 |
echo 'grub-mkdevicemap' > ${INSTALLPATH}/root/.bashrc |
|
672 |
echo "LC_ALL=C grub-mkconfig -o ${grub2conf}" >> ${INSTALLPATH}/root/.bashrc |
# set kernelopts |
673 |
echo "grub-install --no-floppy ${HDD}" >> ${INSTALLPATH}/root/.bashrc |
if [[ -f ${INSTALLPATH}/etc/conf.d/grub ]] |
674 |
|
then |
675 |
|
sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1\"${KERNELOPTS}\":" ${INSTALLPATH}/etc/conf.d/grub || die |
676 |
|
sed -i "s:^\(export GRUB_GFXPAYLOAD_LINUX=\).*:\1\"${GRUB2GFXPAYLOAD}\":" ${INSTALLPATH}/etc/conf.d/grub || die |
677 |
|
else |
678 |
|
echo "export GRUB_CMDLINE_LINUX_DEFAULT=\"${KERNELOPTS}\"" > ${INSTALLPATH}/etc/conf.d/grub || die |
679 |
|
echo "export GRUB_GFXPAYLOAD_LINUX=\"${GRUB2GFXPAYLOAD}\"" >> ${INSTALLPATH}/etc/conf.d/grub || die |
680 |
|
fi |
681 |
|
echo 'grub-mkdevicemap' > ${INSTALLPATH}/root/.installrc || die |
682 |
|
echo "LC_ALL=C grub-mkconfig -o ${grub2conf} &> /dev/null" >> ${INSTALLPATH}/root/.installrc || die |
683 |
|
echo "grub-install --no-floppy ${HDD} &> /dev/null" >> ${INSTALLPATH}/root/.installrc || die |
684 |
|
echo "exit 0" >> ${INSTALLPATH}/root/.installrc || die |
685 |
|
|
686 |
# grub-legacy |
# grub-legacy |
687 |
else |
else |
719 |
echo "# normal boot" >> ${grubconf} || die |
echo "# normal boot" >> ${grubconf} || die |
720 |
echo "title ${KRNVER}" >> ${grubconf} || die |
echo "title ${KRNVER}" >> ${grubconf} || die |
721 |
echo "root (hd0,0)" >> ${grubconf} || die |
echo "root (hd0,0)" >> ${grubconf} || die |
722 |
echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS}" >> ${grubconf} || die |
echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} ${GRUBLEGACYOPTS}" >> ${grubconf} || die |
723 |
if is_initrd_supported |
if is_initrd_supported |
724 |
then |
then |
725 |
echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die |
echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die |
730 |
echo "title ${KRNVER} - Re-run hardware-detection" >> ${grubconf} || die |
echo "title ${KRNVER} - Re-run hardware-detection" >> ${grubconf} || die |
731 |
echo "lock" >> ${grubconf} || die |
echo "lock" >> ${grubconf} || die |
732 |
echo "root (hd0,0)" >> ${grubconf} || die |
echo "root (hd0,0)" >> ${grubconf} || die |
733 |
echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} hardware-auto-detection" >> ${grubconf} || die |
echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} ${GRUBLEGACYOPTS} hardware-auto-detection" >> ${grubconf} || die |
734 |
if is_initrd_supported |
if is_initrd_supported |
735 |
then |
then |
736 |
echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die |
echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die |
740 |
echo "title ${KRNVER} - Reset *all* local settings" >> ${grubconf} || die |
echo "title ${KRNVER} - Reset *all* local settings" >> ${grubconf} || die |
741 |
echo "lock" >> ${grubconf} || die |
echo "lock" >> ${grubconf} || die |
742 |
echo "root (hd0,0)" >> ${grubconf} || die |
echo "root (hd0,0)" >> ${grubconf} || die |
743 |
echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} alx-reset-settings" >> ${grubconf} || die |
echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} ${GRUBLEGACYOPTS} alx-reset-settings" >> ${grubconf} || die |
744 |
if is_initrd_supported |
if is_initrd_supported |
745 |
then |
then |
746 |
echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die |
echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die |
747 |
fi |
fi |
748 |
|
|
749 |
# bootsector schreiben chrooted schreiben (lfs/magellan) |
# bootsector schreiben chrooted schreiben (lfs/magellan) |
750 |
cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF |
cat > ${INSTALLPATH}/root/.installrc << CHROOTEOF |
751 |
/usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null |
/usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null |
752 |
root (hd0,0) |
root (hd0,0) |
753 |
setup (hd0) |
setup (hd0) |
761 |
mount -t proc proc ${INSTALLPATH}/proc |
mount -t proc proc ${INSTALLPATH}/proc |
762 |
mount -t sysfs sysfs ${INSTALLPATH}/sys |
mount -t sysfs sysfs ${INSTALLPATH}/sys |
763 |
mount -o bind /dev ${INSTALLPATH}/dev |
mount -o bind /dev ${INSTALLPATH}/dev |
764 |
chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i |
chroot ${INSTALLPATH} /bin/bash --rcfile /root/.installrc -i |
765 |
umount ${INSTALLPATH}/proc |
umount ${INSTALLPATH}/proc |
766 |
umount ${INSTALLPATH}/sys |
umount ${INSTALLPATH}/sys |
767 |
umount ${INSTALLPATH}/dev |
umount ${INSTALLPATH}/dev |
768 |
rm ${INSTALLPATH}/root/.bashrc |
rm ${INSTALLPATH}/root/.installrc |
769 |
} |
} |
770 |
|
|
771 |
is_initrd_supported() |
is_initrd_supported() |
780 |
# only generate initrds if the cmd exists |
# only generate initrds if the cmd exists |
781 |
is_initrd_supported || return 0 |
is_initrd_supported || return 0 |
782 |
|
|
783 |
cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF |
DISKMODS="sd_mod" |
784 |
echo "MODULES=\"${FORMAT_FILESYSTEM} amd74xx piix sis5513 via82cxxx sd_mod ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via sata_via sata_sis sata_nv\"" > /etc/conf.d/mkinitrd |
OLDPATAMODS="amd74xx piix sis5513 via82cxxx" |
785 |
|
PATAMODS="ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via" |
786 |
|
SATAMODS="sata_via sata_sis sata_nv" |
787 |
|
DRMMODS="i915 mga nouveau r128 radeon savage sis tdfx ttm via" |
788 |
|
OTHERMODS="" |
789 |
|
case ${SPECIALDEVICE} in |
790 |
|
zotac_intel|i845) FBMODS=""; DRMMODS="i915" ;; |
791 |
|
zotac_nvidia) FBMODS=""; DRMMODS="nouveau" ;; |
792 |
|
rangee) FBMODS="" ;; ## fallback to vesafb, viafb does not run on all CLE266 boards |
793 |
|
# not working with kms enabled drivers -> segfaults |
794 |
|
#maxdata) FBMODS="i810fb" ;; ## check for maxdata / i810/ i815 Chipsets and disable KMS and use i810fb frambuffer |
795 |
|
maxdata) FBMODS="" ;; |
796 |
|
*) FBMODS="uvesafb" ;; |
797 |
|
esac |
798 |
|
|
799 |
|
if [[ ${FORMFACTOR} = laptop ]] |
800 |
|
then |
801 |
|
OTHERMODS="acpi-cpufreq cpufreq_ondemand cpufreq_conservative cpufreq_powersave" |
802 |
|
fi |
803 |
|
|
804 |
|
# install an appropriate uvesafb.conf |
805 |
|
install -d ${INSTALLPATH}/etc/modprobe.d || die |
806 |
|
echo "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" > ${INSTALLPATH}/etc/modprobe.d/uvesafb.conf || die |
807 |
|
|
808 |
|
# install an appropriate viafb.conf |
809 |
|
echo "options viafb viafb_mode=1024x768 viafb_refresh=60" > ${INSTALLPATH}/etc/modprobe.d/viafb.conf || die |
810 |
|
|
811 |
|
# install an appropriate i810fb.conf |
812 |
|
echo "options i810fb xres=1024 yres=768 bpp=16 mtrr=1 hsync1=30 hsync2=62 vsync1=30 vsync2=60" > ${INSTALLPATH}/etc/modprobe.d/i810fb.conf || die |
813 |
|
|
814 |
|
cat > ${INSTALLPATH}/root/.installrc << CHROOTEOF |
815 |
|
echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS} ${OTHERMODS}\"" > /etc/conf.d/mkinitrd |
816 |
mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null |
mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null |
817 |
exit 0 |
exit 0 |
818 |
CHROOTEOF |
CHROOTEOF |
821 |
mount -t proc proc ${INSTALLPATH}/proc |
mount -t proc proc ${INSTALLPATH}/proc |
822 |
mount -t sysfs sysfs ${INSTALLPATH}/sys |
mount -t sysfs sysfs ${INSTALLPATH}/sys |
823 |
mount -o bind /dev ${INSTALLPATH}/dev |
mount -o bind /dev ${INSTALLPATH}/dev |
824 |
chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i |
chroot ${INSTALLPATH} /bin/bash --rcfile /root/.installrc -i |
825 |
umount ${INSTALLPATH}/proc |
umount ${INSTALLPATH}/proc |
826 |
umount ${INSTALLPATH}/sys |
umount ${INSTALLPATH}/sys |
827 |
umount ${INSTALLPATH}/dev |
umount ${INSTALLPATH}/dev |
828 |
rm ${INSTALLPATH}/root/.bashrc |
rm ${INSTALLPATH}/root/.installrc |
829 |
} |
} |
830 |
|
|
831 |
is_uuid_supported() |
is_uuid_supported() |
879 |
|
|
880 |
# install network config skeleton |
# install network config skeleton |
881 |
install -m0644 ${INSTALLPATH}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLPATH}/etc/conf.d/ || die |
install -m0644 ${INSTALLPATH}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLPATH}/etc/conf.d/ || die |
882 |
|
|
883 |
|
# intel framebufer quirk |
884 |
|
if [[ -e /proc/fb ]] |
885 |
|
then |
886 |
|
if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]] |
887 |
|
then |
888 |
|
fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:') |
889 |
|
if [[ ${fbdev} != 0 ]] |
890 |
|
then |
891 |
|
sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALLPATH}/etc/splash/splash.conf || die |
892 |
|
fi |
893 |
|
fi |
894 |
|
fi |
895 |
} |
} |
896 |
|
|
897 |
install_system_settings_flash() |
install_system_settings_simple() |
898 |
{ |
{ |
899 |
# schreibe fstab |
# schreibe fstab |
900 |
if is_uuid_supported |
if is_uuid_supported |
915 |
swapoff ${SWAPHDD} || die |
swapoff ${SWAPHDD} || die |
916 |
} |
} |
917 |
|
|
918 |
install_umount_rootfs_flash() |
install_umount_rootfs_simple() |
919 |
{ |
{ |
920 |
cd / |
cd / |
921 |
umount ${INSTALLPATH} || die |
umount ${INSTALLPATH} || die |
952 |
dialog_install_successful |
dialog_install_successful |
953 |
} |
} |
954 |
|
|
955 |
run_install_flash() |
run_install_simple() |
956 |
{ |
{ |
957 |
dialog_hardware_detection |
dialog_hardware_detection |
958 |
|
|
959 |
dialog_setup_hdd_partitions_manuell_flash |
dialog_setup_hdd_partitions_manuell_simple |
960 |
dialog_setup_hdd_format |
dialog_setup_hdd_format |
961 |
setup_hdd_format_flash > /dev/null |
setup_hdd_format_simple > /dev/null |
962 |
install_mount_rootfs_flash |
install_mount_rootfs_simple |
963 |
(install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image |
(install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image |
964 |
|
|
965 |
dialog_install_settings |
dialog_install_settings |
966 |
sleep 1 |
sleep 1 |
967 |
install_system_settings_flash |
install_system_settings_simple |
968 |
install_initrd_chroot |
install_initrd_chroot |
969 |
|
|
970 |
dialog_install_bootsector |
dialog_install_bootsector |
971 |
install_bootsector_chroot |
install_bootsector_chroot |
972 |
|
|
973 |
install_umount_rootfs_flash |
install_umount_rootfs_simple |
974 |
dialog_install_successful |
dialog_install_successful |
975 |
} |
} |
976 |
|
|
980 |
|
|
981 |
dialog_setup_hdd_partitions_auto |
dialog_setup_hdd_partitions_auto |
982 |
dialog_setup_hdd_format |
dialog_setup_hdd_format |
983 |
setup_hdd_format_flash > /dev/null |
setup_hdd_format_simple > /dev/null |
984 |
install_mount_rootfs_flash |
install_mount_rootfs_simple |
985 |
(install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image |
(install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image |
986 |
|
|
987 |
dialog_install_settings |
dialog_install_settings |
988 |
sleep 1 |
sleep 1 |
989 |
install_system_settings_flash |
install_system_settings_simple |
990 |
install_initrd_chroot |
install_initrd_chroot |
991 |
|
|
992 |
dialog_install_bootsector |
dialog_install_bootsector |
993 |
install_bootsector_chroot |
install_bootsector_chroot |
994 |
|
|
995 |
install_umount_rootfs_flash |
install_umount_rootfs_simple |
996 |
dialog_install_successful |
dialog_install_successful |
997 |
} |
} |
998 |
|
|