diff --git a/target/rescue/build.sh b/target/rescue/build.sh index 74119c5c4..974699240 100644 --- a/target/rescue/build.sh +++ b/target/rescue/build.sh @@ -13,7 +13,9 @@ if [ "$ROCK_DEBUG_RESCUE_NOSTAGE2" != 1 -a \ "$ROCK_DEBUG_RESCUE_NOSTAGE1" != 1 ] then pkgloop - rm -rf $disksdir; mkdir -p $disksdir; chmod 700 $disksdir + rm -rf $disksdir + mkdir -p $disksdir + chmod 700 $disksdir fi # Re-evaluate CC and other variables (as we have built the cross cc now) @@ -35,7 +37,9 @@ fi echo_header "Creating ISO filesystem description." -cd $disksdir; rm -rf isofs; mkdir -p isofs +cd $disksdir +rm -rf isofs +mkdir -p isofs echo_status "Creating rescue/isofs directory.." ln system.tar.bz2 isofs/ diff --git a/target/rescue/build_stage1.sh b/target/rescue/build_stage1.sh index d0d06227a..33788cf51 100644 --- a/target/rescue/build_stage1.sh +++ b/target/rescue/build_stage1.sh @@ -16,24 +16,25 @@ cp -a $rootdir/lib/ld-*.so \ $rootdir/lib/libc.* \ $rootdir/lib/libc.* \ $rootdir/lib/libresolv* \ + $rootdir/lib/librt* \ + $rootdir/lib/libpthread* \ lib/ -if [[ $rockver != 2.0* ]] ; then - echo_status "Copy some additional libs for tar." - cp -a $rootdir/lib/lib{pthread,rt}{.,-}* \ - lib/ -fi - echo_status "Copy various helper applications." cp $rootdir/bin/{tar,gzip,bzip2} bin/ cp $rootdir/sbin/{insmod,ip} bin/ cp $rootdir/usr/bin/wget bin/ +cp $rootdir/usr/bin/busybox bin/ + + +while read x +do + X="${x##*/}" + [ -e "bin/$X" ] && continue + echo -n "providing $X by busybox: " + ln -v bin/busybox bin/$X +done < $rootdir/usr/share/doc/busybox/busybox.links -# -if [ "$ROCKCFG_RESCUE_INITRD_USEKISS" = 1 ]; then - echo_status "Adding kiss shell for expert use of the initrd image." - cp $rootdir/bin/kiss bin/ -fi cd .. echo_header "Creating initrd filesystem image: " diff --git a/target/rescue/build_stage2.sh b/target/rescue/build_stage2.sh index 0efd34b1b..1d2851688 100644 --- a/target/rescue/build_stage2.sh +++ b/target/rescue/build_stage2.sh @@ -10,11 +10,11 @@ package_map=' +00-dirtree +glibc22 +glibc23 -linux24-src -linux26-src -linux24benh-src -linux24-source -linux24-header -linux26-header -linux24benh-header --linux24 -linux26 -linux24benh --binutils -bin86 -nasm +-linux24 -linux26 -linux24benh +attr +-binutils -bin86 -nasm +dmapi +grub +lilo +yaboot +aboot +silo +parted +mac-fdisk +pdisk -+xfsprogs +mkdosfs +jfsutils ++xfsprogs +mkdosfs +jfsutils +xfsdump +e2fsprogs +reiserfsprogs +genromfs +lvm +raidtools +dump +eject +disktype +hdparm -memtest86 +openssl +openssh @@ -38,7 +38,7 @@ package_map=' +00-dirtree +glibc22 +glibc23 +sysfiles +libpcap +iptables +tcp_wrappers -kiss +kbd -syslinux -rescue-stage1-init +device-mapper +lvm2 +mdadm +dhcpcd -+smartmontools +ntfsprogs +lvm-wrapper ++smartmontools +ntfsprogs +lvm-wrapper -man-pages ' if [[ $rockver = 2.0* ]] ; then @@ -81,8 +81,11 @@ tar $taropt $pkgsdir/ncurses.tar.bz2 \ # echo_status "Installing some keymaps ..." tar $taropt $pkgsdir/kbd.tar.bz2 \ - usr/share/kbd/keymaps/amiga usr/share/kbd/keymaps/i386/qwerty \ - usr/share/kbd/keymaps/atari usr/share/kbd/keymaps/i386/qwertz \ + usr/share/kbd/keymaps/amiga \ + usr/share/kbd/keymaps/atari \ + usr/share/kbd/keymaps/i386/qwerty \ + usr/share/kbd/keymaps/i386/qwertz \ + usr/share/kbd/keymaps/i386/include \ usr/share/kbd/keymaps/sun find usr/share/kbd -name '*dvo*' -o -name '*az*' -o -name '*fgG*' | \ xargs rm -f @@ -141,6 +144,7 @@ EOF [ -f /proc/mounts ] || mount -t proc none /proc [ -d /mnt/boot ] || mkdir -p /mnt/boot [ -d /dev/pts ] && mount /dev/pts +rm -f /dev/fd ; ln -s /proc/self/fd /dev/fd grep -q '/mnt_boot' /proc/mounts && mount --move /old_root/mnt_boot /mnt/boot grep -q '/old_root' /proc/mounts && umount -n /old_root grep -v ^rootfs /proc/mounts > /etc/mtab diff --git a/target/rescue/config.hlp b/target/rescue/config.hlp index 147e34b88..b9e2cb75e 100644 --- a/target/rescue/config.hlp +++ b/target/rescue/config.hlp @@ -21,8 +21,3 @@ # --- ROCK-COPYRIGHT-NOTE-END --- -ROCKCFG_RESCUE_INITRD_USEKISS - If this options is enabled the kiss shell is installed into the first - stage initrd of the bootdisk. This is helpful for unusal installations - and debugging. - diff --git a/target/rescue/config.in b/target/rescue/config.in index 9f12bfe84..49933fa38 100644 --- a/target/rescue/config.in +++ b/target/rescue/config.in @@ -22,8 +22,6 @@ block_begin 0 -bool 'Include the kiss shell into the initrd' ROCKCFG_RESCUE_INITRD_USEKISS 1 - choice ROCKCFG_RESCUE_ACTION_SYSTEM_FAILURE "shell" \ "reboot" "reboot if system fails to extract." \ "panic" "panic if system fails to extract." \ @@ -61,6 +59,8 @@ pkgfilter sed ' / setserial / { p; d; }; / tcpdump / { p; d; }; / libpcap / { p; d; }; / tcp_wrappers / { p; d; }; / iptables / { p; d; }; / jfsutils / { p; d; }; +/ attr / { p; d; }; +/ dmapi / { p; d; }; / xfsprogs / { p; d; }; / kbd / { p; d; }; / eject / { p; d; }; / openssl / { p; d; }; / openssh / { p; d; }; @@ -90,9 +90,11 @@ pkgfilter sed ' / sysvinit / { s/^X /O /p; d; }; / uml_utilities / { s/^X /O /p; d; }; / python / { s/^X /O /p; d; }; +/ dmapi / { s/^X /O /p; d; }; ' if [[ $rockver = 2.0* ]] ; then pkgfilter sed ' + / linux24 / { s/^[XO] .......... /X -?-------- /p; d; }; / KERNEL / { s/^X /O /p; d; }; / linux26-src / { s/^X /O /p; d; }; ' diff --git a/target/rescue/contrib/mkisolinux.sh b/target/rescue/contrib/mkisolinux.sh index a984c4085..73c21b1f8 100644 --- a/target/rescue/contrib/mkisolinux.sh +++ b/target/rescue/contrib/mkisolinux.sh @@ -119,7 +119,7 @@ then fi cp -v $SYSTEM $TMPDIR/iso/rescue/system.tb2 - [ -n "$OVERLAY" ] && cp -v $OVERLAY $TMPDIR/iso/rescue/overlay.tar.bz2 + [ -n "$OVERLAY" ] && cp -v $OVERLAY $TMPDIR/iso/rescue/overlay.tb2 # # create grub fd @@ -158,7 +158,7 @@ DISPLAY display.txt LABEL rescue KERNEL krescue - APPEND initrd=rdrescue.gz root=/dev/ram boot=iso9660:/dev/cdroms/cdrom0 system=/mnt_boot/rescue/system.tb2 panic=60 + APPEND initrd=rdrescue.gz root=/dev/ram boot=iso9660:/dev/cdroms/cdrom0 system=/mnt_boot/rescue/system.tb2 overlay=/mnt_boot/rescue/overlay.tb2 panic=60 LABEL grub KERNEL memdisk