SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have more or less finished my latest project, a LiveCD/DVD which runs completely in RAM (tmpfs).
The cool stuff is that the LiveCD/DVD can utilize a swap file on disk to expand the available RAM memory. This allows a complete Slackware installation to be used as a LiveDVD.
You can actually use ANY installation, just put e.g. diskimage.tar.gz file on a DVD and run live/livedvd image=diskimage.tar.gz. Be quick to change to your DVD after the kernel is booting.
Press enter to start the system or specify command as below:
boot: linux safevga (Start the system in safe graphical mode)
boot: linux autovga (Start the system in autodetect graphical mode)
boot: linux lang=en_US keyb=us (Change locale and keyboard layout)
boot: linux 3 (Start the system in command line mode)
boot: linux label="SW_13.0" (Specify the root partition label)
boot: 2.6.32.3-smp/vmlinuz root=/dev/sda1 rootdelay=10 (For experts)
boot: live (Run "Live" using disk image from DVD)
boot: live media=disk label=SW_13.0-USB (Run "Live" from USB-disk)
boot: rescue (Rescue and disk image installation tools running from CD/DVD)
boot: rescue media=disk label=SW_13.0-USB (Run rescue tools from USB-disk)
[F1] Display this message.
[F2] Display boot configuration.
[F3-F4] Display example backup/restore commands.
You can change the locale and keyboard at the boot prompt with:
linux lang=en_US keyb=us
2010-01-11
New 32-bit version with Kernel 2.6.32.3 and some other goodies.
2009-12-12
Added version based on Slackware-current for 64-bit.
2009-12-04
Improved the installer and rescue tools and added a boot option to change the locale and keyboard layout.
Upgraded to KDE 4.3.3.
Nvidia and ATI drivers are installed.
Flash and Realplayer are installed.
All preconfigured user accounts (anv1-anv5) are locked. No password is set for root.
2009-11-05
Updated with a version for Slackware 13.0 (with KDE 4.3.2):
There is also a few new options which can be useful when you need to rescue or backup a system. It also contains a simple installer (slackdeploy.sh) which can install the LiveDVD to a hard disk.
/Magnus
Last edited by uppman; 01-15-2010 at 07:48 AM.
Reason: New version 2010Jan11
Is there any relatively easy way to put this on a bootable usb stick?
I've been trying for a few days to put myslack on a bootable usb stick so that I can always have myslack with me - a teddy bear, so to speak.
My best chance was following the instructions at linux-live.org, but I've become bogged down too many times - I'll wait until the new year and perhaps take another stab.
I've also tried things like unetbootin, etc., but I'm having no luck.
I have, of course, been able to install slax to a usb stick, but it's just not the same.
So, can anyone offer help? Unfortunately, as of tomorrow, I'll be afk for a couple of weeks, so if you respond and I don't immediately get back to you, I'm not being rude, just incommunicado.
I have Slackware on a USB drive that I created. I use SYSLINUX ( http://syslinux.zytor.com/wiki/index.php/SYSLINUX ) to load the kernel. I use mkinitrd to create initrd.gz file that the kernel uses to first mount the loopback files where I keep all of my stuff. Unfortunately the filesize limit for FAT32 is 2GB according to "dd", so I use a couple 2GB files as loopback devices.
I recommend that if you want to do this like I did it, repartition your USB stick to have a ext2 file system on the drive if you still want to be able to use the USB stick with Windows systems. That way you will not have to mess with creating several loopback devices that are mounted at boot.
Converting an existing live CD is easier, as you only have to copy over the ISO and/or ramdisk to the USB drive after installing SYSLINUX. Use the same kernel options that the CD uses in your SYSLINUX.CFG file, changing out the root device if necessary. Fortunately, uppman's project is all ramdisk, so you won't have to fool around with getting the correct root device to load, as the root device will be in RAM. The downside is, if your computer uses USB 1, you will be waiting a long, long time for the system to load off the USB stick.
Anyone tried this stuff yet?
Now it's a childs play to install any backup disk image with my new improved installer!
Below is a sample run:
1. Pop in the DVD.
2. Type rescue at the boot prompt.
boot: rescue
*** Welcome to slackdeploy! ***
Author: Magnus Uppman <magnus_uppman@hotmail.com>
Install with two partitions (b)oot and root, or only (r)oot partition?
Show disk (i)nfo, Edit (d)isk
Reinstall (l)ilo to MBR, Reinstall lilo to (s)uperblock
Reinstall (p)lain MBR to boot the active partition
Backup par(t)ition
(q)uit, s(h)ell, (v)ersion
(i,d,l,s,p,b,r,t,q,h,v) ->b
Enter root partition device name:
(c)ancel. Show disk (i)nfo
(/dev/XXXy, c, i) ->/dev/hda2
Install root to /dev/hda2? (Warning, /dev/hda2 will be completely erased!!!)
(yes,No) ->yes
Enter boot partition device name:
(c)ancel. Show disk (i)nfo
(/dev/XXXy, c, i) ->/dev/hda1
Install extlinux to /dev/hda1? (Warning, /dev/hda1 will be completely erased!!!)
(yes,No) ->yes
Installing filesystem to root partition: /dev/hda2..
slackdeploy.sh
Code:
#!/bin/ash
#
# Author: Magnus Uppman, magnus_uppman@hotmail.com
# License: GPL
# Uses: lilo, mktemp, cfdisk, blkid, extlinux, mbr.bin, tar, mkfs (ext2,ext4)
# Changelog:
# 2009-11-23 No longer copies system_13.0.tar.gz to the root partition.
# v0.04, 2009-12-02 Added backup option. Removed set -e
VERSION=0.04
# Create temp dir
TMPDIR=`mktemp -d /tmp/slackdeploy.XXXXXX`
#echo $TMPDIR
mkdir $TMPDIR/install
mkdir $TMPDIR/boot
mkdir $TMPDIR/backup
mkdir $TMPDIR/backup-store
show_info()
{
cat /proc/partitions
/sbin/blkid -c /dev/null
}
edit_disk()
{
echo "Enter disk device name:"
echo -n "(/dev/XXX) ->"
read ASK
case $ASK in
/dev/???)
/sbin/cfdisk $ASK
;;
*)
echo "Wrong parameter, please try again!"
esac
}
reinstall_lilo_mbr()
{
echo "Enter root partition device name:"
echo -n "(/dev/XXXy) ->"
read ASK
case $ASK in
/dev/????)
# Install lilo to MBR?
ROOT_PART=$ASK
DISK=`echo $ROOT_PART | cut -c -8`
echo "Install lilo to the MBR on disk $DISK? Warning, the MBR on disk $DISK will be overwritten, make sure no other operating systems are installed on this disk!"
echo -n "(y/N)"
read ASK
case $ASK in
y)
echo "Installing lilo to MBR in $DISK"
mount $ROOT_PART $TMPDIR/install
/sbin/lilo -v -b $DISK -r $TMPDIR/install
umount $TMPDIR/install
;;
*)
echo "No changes made to the MBR!"
esac
;;
*)
echo "Wrong parameter, please try again!"
esac
}
reinstall_lilo_superblock()
{
echo "Enter root partition device name:"
echo -n "(/dev/XXXy) ->"
read ASK
case $ASK in
/dev/????)
ROOT_PART=$ASK
# Install lilo to superblock
echo "Installing lilo to superblock in $ROOT_PART"
mount $ROOT_PART $TMPDIR/install
/sbin/lilo -v -b $ROOT_PART -r $TMPDIR/install
umount $TMPDIR/install
;;
*)
echo "Wrong parameter, please try again!"
esac
}
reinstall_plain_mbr()
{
echo "Enter disk device name:"
echo -n "(/dev/XXX) ->"
read ASK
case $ASK in
/dev/???)
DISK=$ASK
echo "Install new MBR on disk ${DISK}? Warning, the MBR on disk $DISK will be overwritten, make sure no other operating systems are installed on this disk!"
echo -n "(y/N)"
read ASK
case $ASK in
y)
echo "Installing new MBR on $DISK"
cat /usr/lib/syslinux/mbr.bin > $DISK
;;
*)
echo "No changes made to the MBR!"
esac
;;
*)
echo "Wrong parameter, please try again!"
esac
}
install_root_part()
{
CONTINUE=0
while `test $CONTINUE -eq 0`
do
echo "Enter root partition device name:"
echo "(c)ancel. Show disk (i)nfo"
echo -n "(/dev/XXXy, c, i) ->"
read ASK
case $ASK in
/dev/????)
echo "Install root to ${ASK}? (Warning, ${ASK} will be completely erased!!!)"
echo -n "(yes,No) ->"
read WARN
case $WARN in
yes)
ROOT_PART=$ASK
CONTINUE=1
install_root
;;
*)
echo "Selection aborted!"
esac
;;
i)
show_info
;;
c)
CONTINUE=1
;;
*)
echo "Wrong parameter, please try again!"
esac
done
}
install_root_and_boot_part()
{
CONTINUE=0
while `test $CONTINUE -eq 0`
do
echo "Enter root partition device name:"
echo "(c)ancel. Show disk (i)nfo"
echo -n "(/dev/XXXy, c, i) ->"
read ASK
case $ASK in
/dev/????)
echo "Install root to ${ASK}? (Warning, ${ASK} will be completely erased!!!)"
echo -n "(yes,No) ->"
read WARN
case $WARN in
yes)
ROOT_PART=$ASK
CONTINUE=1
install_root_and_boot_part2
;;
*)
echo "Selection aborted!"
esac
;;
i)
show_info
;;
c)
CONTINUE=1
;;
*)
echo "Wrong parameter, please try again!"
esac
done
}
install_root_and_boot_part2()
{
CONTINUE=0
while `test $CONTINUE -eq 0`
do
echo "Enter boot partition device name:"
echo "(c)ancel. Show disk (i)nfo"
echo -n "(/dev/XXXy, c, i) ->"
read ASK
case $ASK in
/dev/????)
echo "Install extlinux to ${ASK}? (Warning, ${ASK} will be completely erased!!!)"
echo -n "(yes,No) ->"
read WARN
case $WARN in
yes)
BOOT_PART=$ASK
CONTINUE=1
install_root
install_boot
;;
*)
echo "Selection aborted!"
esac
;;
i)
show_info
;;
c)
CONTINUE=1
;;
*)
echo "Wrong parameter, please try again!"
esac
done
}
install_root()
{
echo "Installing filesystem to root partition: $ROOT_PART.."
echo "Note: The disk image system_13.0.tar.gz must be in the current working directory!"
ls -l ./system_13.0.tar.gz || exit
/sbin/mkfs -t ext4 $ROOT_PART || exit
mount $ROOT_PART $TMPDIR/install || exit
echo "Copying system to $ROOT_PART.."
tar --checkpoint=.10000 -xpzf ./system_13.0.tar.gz -C $TMPDIR/install || exit
# cp ./system_13.0.tar.gz $TMPDIR/install
# Install lilo to superblock
echo -n "Installing lilo to superblock in $ROOT_PART"
/sbin/lilo -v -b $ROOT_PART -r $TMPDIR/install || exit
umount $TMPDIR/install || exit
/sbin/e2label $ROOT_PART SW_13.0 || exit
echo "Root installed to partition: $ROOT_PART"
sync
}
install_boot()
{
echo "Installing extlinux to $BOOT_PART"
mount $ROOT_PART $TMPDIR/install || exit
/sbin/mkfs -t ext2 $BOOT_PART || exit
mount $BOOT_PART $TMPDIR/boot || exit
cp -a $TMPDIR/install/extlinux $TMPDIR/boot || exit
/sbin/extlinux --install $TMPDIR/boot/extlinux || exit
umount $TMPDIR/boot || exit
umount $TMPDIR/install || exit
echo "Extlinux installed to: $BOOT_PART"
DISK=`echo $BOOT_PART | cut -c -8`
echo "Install new MBR on disk ${DISK}? Warning, the MBR on disk $DISK will be overwritten, make sure no other operating systems are installed on this disk!"
echo -n "(y/N)"
read ASK
case $ASK in
y)
echo "Installing new MBR on $DISK, make sure that $BOOT_PART is active"
cat /usr/lib/syslinux/mbr.bin > $DISK
;;
*)
echo "No changes made to the MBR!"
esac
sync
}
backup_part()
{
CONTINUE=0
while `test $CONTINUE -eq 0`
do
echo "Enter device name for partition to backup:"
echo "(c)ancel. Show disk (i)nfo"
echo -n "(/dev/XXXy, c, i) ->"
read ASK
case $ASK in
/dev/????)
BACKUP_PART=$ASK
CONTINUE=1
backup_part2
;;
i)
show_info
;;
c)
CONTINUE=1
;;
*)
echo "Wrong parameter, please try again!"
esac
done
}
backup_part2()
{
CONTINUE=0
while `test $CONTINUE -eq 0`
do
echo "Enter device name for partition to store the backup on:"
echo "(c)ancel. Show disk (i)nfo"
echo -n "(/dev/XXXy, c, i) ->"
read ASK
case $ASK in
/dev/????)
BACKUP_DATE=`date -I`
DISK_NAME=`basename $BACKUP_PART`
BACKUP_NAME=${DISK_NAME}-${BACKUP_DATE}.tar.gz
echo "Store backup of partition $BACKUP_PART on partition ${ASK}? The backup will be stored as $BACKUP_NAME"
echo -n "(yes,No) ->"
read WARN
case $WARN in
yes)
BACKUP_STORE_PART=$ASK
CONTINUE=1
mount $BACKUP_PART $TMPDIR/backup || exit
mount $BACKUP_STORE_PART $TMPDIR/backup-store || exit
cd $TMPDIR/backup || exit
tar -cvpszf $TMPDIR/backup-store/${BACKUP_NAME} . || exit
cd - || exit
umount $TMPDIR/backup || exit
umount $TMPDIR/backup-store || exit
;;
*)
echo "Aborted!"
esac
;;
i)
show_info
;;
c)
CONTINUE=1
;;
*)
echo "Wrong parameter, please try again!"
esac
done
}
while true
do
echo
echo "*** Welcome to slackdeploy! ***"
echo "Author: Magnus Uppman <magnus_uppman@hotmail.com>"
echo
echo "Install with two partitions (b)oot and root, or only (r)oot partition?"
echo "Show disk (i)nfo, Edit (d)isk"
echo "Reinstall (l)ilo to MBR, Reinstall lilo to (s)uperblock"
echo "Reinstall (p)lain MBR to boot the active partition"
echo "Backup par(t)ition"
echo "(q)uit, s(h)ell, (v)ersion"
echo -n "(i,d,l,s,p,b,r,t,q,h,v) ->"
read ASK
case $ASK in
i)
show_info
;;
d)
edit_disk
;;
l)
reinstall_lilo_mbr
;;
s)
reinstall_lilo_superblock
;;
p)
reinstall_plain_mbr
;;
b)
install_root_and_boot_part
;;
r)
install_root_part
;;
t)
backup_part
;;
v)
echo "Version: "$VERSION
;;
q)
exit
;;
h)
/bin/sh
;;
*)
echo "Wrong parameter, please try again!"
esac
echo -n "Press Enter to continue.."
read ASK
done
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.