diff options
author | Eric Hameleers <alien@slackware.com> | 2016-02-24 00:15:16 +0100 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2016-02-24 00:15:16 +0100 |
commit | 03de2f0990af4b74b179f011113af6919764905f (patch) | |
tree | c1789af39df4811cf292fc980d71c930fe23e746 /make_slackware_live.sh | |
parent | 0f832ff604283fdf61904d4b5b66ff3460647eba (diff) | |
download | liveslak-03de2f0990af4b74b179f011113af6919764905f.tar.gz liveslak-03de2f0990af4b74b179f011113af6919764905f.tar.xz |
Add 'setup2hd' - this script will install the Live OS to local hard disk.
The 'setup2hd' script is a modified version of 'setup' in the Slackware
installer, taken straight from the initrd.
The SOURCE selection has been removed since the script knows where to
find the Live media.
Except for the actual extraction of Slackware Live content to your
hard drive, the other hard disk installation steps are unmodified from
the stock Slackware installer.
Diffstat (limited to 'make_slackware_live.sh')
-rwxr-xr-x | make_slackware_live.sh | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh index e76549c..abd1e97 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -1016,9 +1016,44 @@ fi # Add our scripts to the Live OS: mkdir -p ${LIVE_ROOTDIR}/usr/local/sbin install -m0755 ${LIVE_TOOLDIR}/makemod ${LIVE_TOOLDIR}/iso2usb.sh ${LIVE_ROOTDIR}/usr/local/sbin/ -# And the documentation: + +# Only when we find a huge kernel, we will add a harddisk installer +# to the ISO. The huge kernel does not require an initrd and installation +# to the hard drive will not be complicated. +if [ -f ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* ]; then + # Extract the 'setup' files we need from the Slackware installer + # and move them to a single directory in the ISO: + mkdir -p ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN} + cd ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN} + gunzip -cd ${SL_PKGROOT}/../isolinux/initrd.img | cpio -i -d -H newc --no-absolute-filenames usr/lib/setup/* sbin/probe sbin/fixdate + mv -i usr/lib/setup/* sbin/probe . + rm -r usr sbin + cd - + # Fix some occurrences of '/mnt' that should not be used in the Live ISO: + sed -i -e 's, /mnt, ${T_PX},g' -e 's,T_PX=/mnt,T_PX=/setup2hd,g' ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/* + # Fix some occurrences of '/usr/lib/setup/' are covered by $PATH: + sed -i -e 's,/usr/lib/setup/,,g' -e 's,:/usr/lib/setup,:/usr/share/${LIVEMAIN},g' ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/* + # Add the Slackware Live HD installer: + mkdir -p ${LIVE_ROOTDIR}/usr/local/sbin + cat ${LIVE_TOOLDIR}/setup2hd | sed \ + -e "s/@DIRSUFFIX@/$DIRSUFFIX/g" \ + -e "s/@KVER@/$KVER/g" \ + -e "s/@LIVEDE@/$LIVEDE/g" \ + -e "s/@LIVEMAIN@/$LIVEMAIN/g" \ + -e "s/@SL_VERSION@/$SL_VERSION/g" \ + -e "s/@VERSION@/$VERSION/g" \ + > ${LIVE_ROOTDIR}/usr/local/sbin/setup2hd + chmod 755 ${LIVE_ROOTDIR}/usr/local/sbin/setup2hd +fi + +# Add the documentation: mkdir -p ${LIVE_ROOTDIR}/usr/doc/liveslak-${VERSION} install -m0644 ${LIVE_TOOLDIR}/README* ${LIVE_ROOTDIR}/usr/doc/liveslak-${VERSION}/ +mkdir -p ${LIVE_ROOTDIR}/usr/doc/slackware${DIRSUFFIX}-${SL_VERSION} +install -m0644 \ + ${DEF_SL_REPO}/slackware${DIRSUFFIX}-${SL_VERSION}/{CHANGES_AND_HINTS,COPY,README,RELEASE_NOTES,Slackware-HOWTO}* \ + ${DEF_SL_REPO}/slackware${DIRSUFFIX}-${SL_VERSION}/usb-and-pxe-installers/README* \ + ${LIVE_ROOTDIR}/usr/doc/slackware${DIRSUFFIX}-${SL_VERSION}/ # -------------------------------------------------------------------------- # echo "-- Configuring the X base system." |