Browse Source

Tobias Hintze <th@rocklinux.org>:


			
			
				rocklinux
			
			
		
Tobias Hintze 21 years ago
parent
commit
91ce4b4277
6 changed files with 34 additions and 28 deletions
  1. +6
    -2
      target/rescue/build.sh
  2. +12
    -11
      target/rescue/build_stage1.sh
  3. +10
    -6
      target/rescue/build_stage2.sh
  4. +0
    -5
      target/rescue/config.hlp
  5. +4
    -2
      target/rescue/config.in
  6. +2
    -2
      target/rescue/contrib/mkisolinux.sh

+ 6
- 2
target/rescue/build.sh

@ -13,7 +13,9 @@ if [ "$ROCK_DEBUG_RESCUE_NOSTAGE2" != 1 -a \
"$ROCK_DEBUG_RESCUE_NOSTAGE1" != 1 ] "$ROCK_DEBUG_RESCUE_NOSTAGE1" != 1 ]
then then
pkgloop pkgloop
rm -rf $disksdir; mkdir -p $disksdir; chmod 700 $disksdir
rm -rf $disksdir
mkdir -p $disksdir
chmod 700 $disksdir
fi fi
# Re-evaluate CC and other variables (as we have built the cross cc now) # 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." 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.." echo_status "Creating rescue/isofs directory.."
ln system.tar.bz2 isofs/ ln system.tar.bz2 isofs/

+ 12
- 11
target/rescue/build_stage1.sh

@ -16,24 +16,25 @@ cp -a $rootdir/lib/ld-*.so \
$rootdir/lib/libc.* \ $rootdir/lib/libc.* \
$rootdir/lib/libc.* \ $rootdir/lib/libc.* \
$rootdir/lib/libresolv* \ $rootdir/lib/libresolv* \
$rootdir/lib/librt* \
$rootdir/lib/libpthread* \
lib/ 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." echo_status "Copy various helper applications."
cp $rootdir/bin/{tar,gzip,bzip2} bin/ cp $rootdir/bin/{tar,gzip,bzip2} bin/
cp $rootdir/sbin/{insmod,ip} bin/ cp $rootdir/sbin/{insmod,ip} bin/
cp $rootdir/usr/bin/wget 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 .. cd ..
echo_header "Creating initrd filesystem image: " echo_header "Creating initrd filesystem image: "

+ 10
- 6
target/rescue/build_stage2.sh

@ -10,11 +10,11 @@ package_map=' +00-dirtree +glibc22 +glibc23
-linux24-src -linux26-src -linux24benh-src -linux24-src -linux26-src -linux24benh-src
-linux24-source -linux24-source
-linux24-header -linux26-header -linux24benh-header -linux24-header -linux26-header -linux24benh-header
-linux24 -linux26 -linux24benh
-binutils -bin86 -nasm
-linux24 -linux26 -linux24benh +attr
-binutils -bin86 -nasm +dmapi
+grub +lilo +yaboot +aboot +grub +lilo +yaboot +aboot
+silo +parted +mac-fdisk +pdisk +silo +parted +mac-fdisk +pdisk
+xfsprogs +mkdosfs +jfsutils
+xfsprogs +mkdosfs +jfsutils +xfsdump
+e2fsprogs +reiserfsprogs +genromfs +lvm +e2fsprogs +reiserfsprogs +genromfs +lvm
+raidtools +dump +eject +disktype +raidtools +dump +eject +disktype
+hdparm -memtest86 +openssl +openssh +hdparm -memtest86 +openssl +openssh
@ -38,7 +38,7 @@ package_map=' +00-dirtree +glibc22 +glibc23
+sysfiles +libpcap +iptables +tcp_wrappers +sysfiles +libpcap +iptables +tcp_wrappers
-kiss +kbd -syslinux -rescue-stage1-init -kiss +kbd -syslinux -rescue-stage1-init
+device-mapper +lvm2 +mdadm +dhcpcd +device-mapper +lvm2 +mdadm +dhcpcd
+smartmontools +ntfsprogs +lvm-wrapper
+smartmontools +ntfsprogs +lvm-wrapper -man-pages
' '
if [[ $rockver = 2.0* ]] ; then if [[ $rockver = 2.0* ]] ; then
@ -81,8 +81,11 @@ tar $taropt $pkgsdir/ncurses.tar.bz2 \
# #
echo_status "Installing some keymaps ..." echo_status "Installing some keymaps ..."
tar $taropt $pkgsdir/kbd.tar.bz2 \ 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 usr/share/kbd/keymaps/sun
find usr/share/kbd -name '*dvo*' -o -name '*az*' -o -name '*fgG*' | \ find usr/share/kbd -name '*dvo*' -o -name '*az*' -o -name '*fgG*' | \
xargs rm -f xargs rm -f
@ -141,6 +144,7 @@ EOF
[ -f /proc/mounts ] || mount -t proc none /proc [ -f /proc/mounts ] || mount -t proc none /proc
[ -d /mnt/boot ] || mkdir -p /mnt/boot [ -d /mnt/boot ] || mkdir -p /mnt/boot
[ -d /dev/pts ] && mount /dev/pts [ -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 '/mnt_boot' /proc/mounts && mount --move /old_root/mnt_boot /mnt/boot
grep -q '/old_root' /proc/mounts && umount -n /old_root grep -q '/old_root' /proc/mounts && umount -n /old_root
grep -v ^rootfs /proc/mounts > /etc/mtab grep -v ^rootfs /proc/mounts > /etc/mtab

+ 0
- 5
target/rescue/config.hlp

@ -21,8 +21,3 @@
# --- ROCK-COPYRIGHT-NOTE-END --- # --- 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.

+ 4
- 2
target/rescue/config.in

@ -22,8 +22,6 @@
block_begin 0 block_begin 0
bool 'Include the kiss shell into the initrd' ROCKCFG_RESCUE_INITRD_USEKISS 1
choice ROCKCFG_RESCUE_ACTION_SYSTEM_FAILURE "shell" \ choice ROCKCFG_RESCUE_ACTION_SYSTEM_FAILURE "shell" \
"reboot" "reboot if system fails to extract." \ "reboot" "reboot if system fails to extract." \
"panic" "panic if system fails to extract." \ "panic" "panic if system fails to extract." \
@ -61,6 +59,8 @@ pkgfilter sed '
/ setserial / { p; d; }; / tcpdump / { p; d; }; / setserial / { p; d; }; / tcpdump / { p; d; };
/ libpcap / { p; d; }; / tcp_wrappers / { p; d; }; / libpcap / { p; d; }; / tcp_wrappers / { p; d; };
/ iptables / { p; d; }; / jfsutils / { p; d; }; / iptables / { p; d; }; / jfsutils / { p; d; };
/ attr / { p; d; };
/ dmapi / { p; d; };
/ xfsprogs / { p; d; }; / xfsprogs / { p; d; };
/ kbd / { p; d; }; / eject / { p; d; }; / kbd / { p; d; }; / eject / { p; d; };
/ openssl / { p; d; }; / openssh / { p; d; }; / openssl / { p; d; }; / openssh / { p; d; };
@ -90,9 +90,11 @@ pkgfilter sed '
/ sysvinit / { s/^X /O /p; d; }; / sysvinit / { s/^X /O /p; d; };
/ uml_utilities / { s/^X /O /p; d; }; / uml_utilities / { s/^X /O /p; d; };
/ python / { s/^X /O /p; d; }; / python / { s/^X /O /p; d; };
/ dmapi / { s/^X /O /p; d; };
' '
if [[ $rockver = 2.0* ]] ; then if [[ $rockver = 2.0* ]] ; then
pkgfilter sed ' pkgfilter sed '
/ linux24 / { s/^[XO] .......... /X -?-------- /p; d; };
/ KERNEL / { s/^X /O /p; d; }; / KERNEL / { s/^X /O /p; d; };
/ linux26-src / { s/^X /O /p; d; }; / linux26-src / { s/^X /O /p; d; };
' '

+ 2
- 2
target/rescue/contrib/mkisolinux.sh

@ -119,7 +119,7 @@ then
fi fi
cp -v $SYSTEM $TMPDIR/iso/rescue/system.tb2 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 # create grub fd
@ -158,7 +158,7 @@ DISPLAY display.txt
LABEL rescue LABEL rescue
KERNEL krescue 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 LABEL grub
KERNEL memdisk KERNEL memdisk

Loading…
Cancel
Save