LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-11-2008, 12:01 PM   #1
dr.karabas
LQ Newbie
 
Registered: May 2008
Posts: 15

Rep: Reputation: 0
Editing Slackware installer options


Hi! Does anybody know how to edit the slackware installer files, probably the INShd file or the SetPKG, to make the installer work this way:

when chosen to install Slackware using files from the hard drive I want him to also install files from a one folder that is on the dvd...

To be more specific; i made a custom dvd and installer of Slackware with added folder that contains my own pkgs... And now I would like him to install normally from hdd but also install pkgs from my directory that is on that cd...

It may be important that my custom installer doesn't have the menu option to install from cd. So the script that would make him install my dir from cd apart from ones on hdd can be active no matter the installation source, and doesn't have to be connected with one specific menu option.

Can anybody help me tune the installer?

Last edited by dr.karabas; 07-11-2008 at 02:47 PM.
 
Old 07-11-2008, 05:50 PM   #2
dr.karabas
LQ Newbie
 
Registered: May 2008
Posts: 15

Original Poster
Rep: Reputation: 0
ok I've got the general point of what needs to be done. I need to place this code:

Quote:
mkdir /var/log/mount/$SLACK_SOURCE_LOCATION/ext/
mkdir /var/log/mount/$SLACK_SOURCE_LOCATION/fs/

mount /dev/cdrom /floppy [this is a directory already created with unpacking vmlinuz during boot]

mount --bind /floppy/slackware/ext /var/log/mount/$SLACK_SOURCE_LOCATION/ext/
mount --bind /mnt/floppy/slackware/fs /var/log/mount/$SLACK_SOURCE_LOCATION/fs/

in this:

Quote:
#!/bin/sh
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
while [ 0 ]; do
rm -f $TMP/SeTDS $TMP/SeTmount
# OK, at this point /var/log/mount should not have anything mounted on it,
# but we will umount just in case.
umount /var/log/mount 2> /dev/null
# Anything mounted on /var/log/mount now is a fatal error:
if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then
echo "Can't umount /var/log/mount. Reboot machine and run setup again."
exit
fi
# If the mount table is corrupt, the above might not do it, so we will
# try to detect Linux and FAT32 partitions that have slipped by:
if [ -d /var/log/mount/lost+found -o -d /var/log/mount/recycled \
-o -r /var/log/mount/io.sys ]; then
echo "Mount table corrupt. Reboot machine and run setup again."
exit
fi

while [ 0 ]; do
cat << EOF > $TMP/tempmsg
In order to install directly from the hard disk you must have a
partition (such as /dev/hda1, /dev/hdb5, etc) with the slackware
distribution's slackware/ directory like you'd find it on the FTP
site. It can be in another directory. For example, if the
distribution is in /stuff/slackware/, then you have to have
directories named /stuff/slackware/a, /stuff/slackware/ap, and so
on each containing the files that would be in that directory on
the FTP site. You may install from FAT or Linux partitions.

Please enter the partition (such as /dev/hda1) where the slackware
sources can be found, or [enter] to see a partition list:
EOF
dialog --title "INSTALLING FROM HARD DISK" --inputbox \
"`cat $TMP/tempmsg`" 18 70 2> $TMP/source.part
if [ ! $? = 0 ]; then
rm -f $TMP/source.part $TMP/tempmsg
exit
fi
rm -f $TMP/tempmsg
SLACK_DEVICE="`cat $TMP/source.part`"
rm -f $TMP/source.part
if [ "$SLACK_DEVICE" = "" ]; then
dialog --title "PARTITION LIST" --msgbox "`probe -l | grep -v cylind | grep dev | sort 2> /dev/null`" 22 75
continue;
fi
break;
done

dialog --title "SELECT SOURCE DIRECTORY" --inputbox \
"Now we need to know the full path on this partition to the\n\
slackware/ directory where the directories containing\n\
installation files and packages to be installed are kept.\n\
For example, if you downloaded slackware into the /stuff\n\
directory on your hard drive (so that you have the\n\
directories /stuff/slackware/a, /stuff/slackware/ap, and so on\n\
each containing the files that would be in that directory on\n\
the FTP site), then the full path to enter here would be:\n\
\n\
/stuff/slackware\n\
\n\
What directory are the slackware sources in?" \
19 65 2> $TMP/source.dir
if [ ! $? = 0 ]; then
rm -f $TMP/source.dir
exit
fi
SLACK_SOURCE_LOCATION="`cat $TMP/source.dir`"
rm -f $TMP/source.dir
if mount | grep $SLACK_DEVICE 1> /dev/null 2> /dev/null ; then
# This partition is already mounted, so we will have to
# tweak things funny.
rm -f /var/log/mount 2> /dev/null
rmdir /var/log/mount 2> /dev/null
PREFIX="`mount | grep $SLACK_DEVICE | cut -f 3 -d ' '`"
ln -sf $PREFIX /var/log/mount
else
SUCCESS=false
for type in ext3 ext2 vfat reiserfs hpfs msdos ; do
mount -r -t $type $SLACK_DEVICE /var/log/mount 1> /dev/null 2> /dev/null
if [ $? = 0 ]; then # mounted successfully
SUCCESS=true
break;
fi
done
if [ ! $SUCCESS = true ]; then # there was a mount error
cat << EOF > $TMP/tempmsg
There was a problem mounting your partition. Would you like to:

EOF
dialog --title "MOUNT ERROR" --menu "`cat $TMP/tempmsg`" 10 68 2 \
"Restart" "Start over" \
"Ignore " "Ignore the error and continue" 2> $TMP/dowhat
if [ ! $? = 0 ]; then
rm -f $TMP/dowhat
exit
fi
DOWHAT="`cat $TMP/dowhat`"
rm -f $TMP/dowhat
if [ "$DOWHAT" = "Restart" ]; then
umount /var/log/mount 2> /dev/null
continue;
fi
echo
fi # mount error
fi

if [ -d /var/log/mount/$SLACK_SOURCE_LOCATION ]; then
echo "/var/log/mount/$SLACK_SOURCE_LOCATION" > $TMP/SeTDS
echo "-source_mounted" > $TMP/SeTmount
echo "/dev/null" > $TMP/SeTsource
exit
else
cat << EOF > $TMP/tempmsg

Sorry, but the directory $SLACK_SOURCE_LOCATION does not exist
on partition $SLACK_DEVICE.

Would you like to try again?
EOF
dialog --title "SOURCE DIRECTORY NOT FOUND" --yesno "`cat $TMP/tempmsg`" 10 70
if [ ! $? = 0 ]; then
rm -f $TMP/tempmsg
exit
fi
rm -r $TMP/tempmsg
fi

done

the question is where in the second file, put the code from the first one?

Last edited by dr.karabas; 07-11-2008 at 05:53 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing Boot Options bryanlee1981 Linux - Newbie 3 03-16-2008 06:18 AM
LXer: Video Editing Options for Linux LXer Syndicated Linux News 0 08-22-2007 06:20 AM
LXer: Emacs editing: Options, registers, and bookmarks LXer Syndicated Linux News 0 07-21-2007 06:01 PM
SUSE Installer ISO editing help pokemaster SUSE / openSUSE 1 02-27-2006 09:25 AM
editing bash to auto activate some options? kintaroe Linux - Newbie 1 10-02-2004 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration