Here we go....
Primary hard drive
You will need to have your hard drive partitioned hda=1-4 primary parts, 4 should most likely be the swap part... One of these parts should be equal to the whole OS image about 5gb (virgin install of everything) more as needed to suit your additions.
Makin' partitions...
If you have not already done so you will have to format these parts. It is assumed here that you ran cfdisk or fdisk during the install and divided you harddrive in to partitions.
As root we will format the partition
mke2fs /dev/hda# #where hda# is the partition number
You will need to mount this part somewhere.
You must create the mount points for each level before you mount the
partitions at that level.
Example.
mkdir /backup [1st level]
mount -t ext2 /dev/hda# /backup #your part number at hda#
you may enter this in your /etc/fstab as
/dev/hda# /backup ext2 rw,dev.sync 1 1
now for the fun part...... Backing up your stuff. If your install is all on one partition it is simple...
cd / && echo cp -a `/bin/ls -1Ab | egrep -v "^backup$|^proc$|^mnt$"` /backup | sh
Or you can use this editted to suit your system....
#!/bin/sh
# cpbackup (beta) - A cp backup utility, 04-17-2004
# Written by Nichole_knc
#
# This script makes a full backup of the / hd location to a specified hd
# location. Example; / on hda1 copied to / on hdc1
# It was birthed to have a complete / image preserved and used in
# conjunction with a rescue disk (cd or floppy), lilo or gnub as a second
# complete system. There is no user interaction with this. It is for doing
# an unattended backup.
# It is supplied without warranties or guarantees...
# Free to use and abuse.
# NOTE; insure you modifiy this script to bypass any mounted hard drives,
# smb file systems or network file systems you have mapped or mounted.
# Otherwise you backup image will get real big real quick...
# lets do the system first
cp -Rap /bin /backup/
cp -Rap /sbin /backup/
cp -Rap /boot /backup/
cp -Rap /etc /backup/
cp -Rap /lib /backup/
cp -Rap /usr /backup/
cp -Rap /var /backup/
cp -Rap /opt /backup/
cp -Rap /root /backup/
cp -Rap /lost+found /backup/
# userland stuff
# write in your /home stuff here
# make as many lines needed to cover your user dieectories
cp -Rap /home/<users here> /backup/home/
# these should be used with extreme caution
# tmp will normally copy ok.
cp -Rap /tmp /backup/
# copying devices can at times cause problems... i.e. lockup
cp -Rap /dev /backup/
# now the killer and a don't use unless you wish to back up the world
# you can easily see why...
# however if you desire to backup everything you have you could use additional lines here
# you could use this to copy other areas you wish to back up as it would copy everything mounted.
# as in this example
# cp -Rap /mnt/hd2 /backup/
# cp -Rap /mnt /mnt/backup/
Now on the partition we will
mkdir /backup/proc
mkdir /backup/mnt
mkdir /backup/mnt/<other directories>
You can cron this script to run as you wish (daily,weekly,monthly)
for more info man crontab
crontab -e [user]
The usb drive is a whole different game.
You can use the above to copy your system to the usb harddrive but to boot from it requires:
1> you computer can boot from a usb device via the bios
or
2> you make a boot disk with a initd ram image to mount this usb device and use it as root.
number 1 is the easiest as you can configure lilo to use that drive.
number 2 is a large subject and I will attempt to point you to some HOWTOs where you can gleam some info to cover it and make yourself a boot cd... Also there is info on the net about usb hard drive booting a google should bring these up. On a light note: if you have installed slack and set it so you need a boot disk to start up the computer that is a bit old fashion for a modern machine.
googled results
http://www.google.com/search?hl=en&l...ux&btnG=Search
these assume you installed the HOWTOs locally
file:///usr/doc/Linux-HOWTOs/Bootdisk-HOWTO
file:///usr/doc/Linux-HOWTOs/CD-Writing-HOWTO
file:///usr/doc/Linux-HOWTOs/BootPrompt-HOWTO
file:///usr/doc/Linux-HOWTOs/Multi-Disk-HOWTO
Not directly related it gives a full example of building a custom cd with a ram image
see 3.1. Build a Live Linux CDROM
file:///usr/doc/Linux-HOWTOs/Diskless-HOWTO
I hope you find all this helpfullllll....