# In Unix, if you haven't found at least 5 ways to do the same thing,
# then you haven't looked hard enough!

#Partition names:  /dev/sdXX  /dev/hdXX
#Never use Dos fdisk!

fdisk
        #Primary  (1-4)
        #Extended (1-4, but no Linux assigned numbers)
        #Logical  (5 and up)
        #Partition types: 83=Linux 82=swap Dos=6
        #Boot Flag
#REBOOT!

Command (m for help): m
a   toggle a bootable flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
p   print the partition table
q   quit without saving changes
t   change a partition's system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
Command (m for help): p

Disk /dev/sda: 255 heads, 63 sectors, 530 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot   Begin    Start      End   Blocks   Id  System
/dev/sda1   *        1        1      128  1028128+   6  DOS 16-bit >=32M
/dev/sda2          129      129      256  1028160   63  GNU HURD
/dev/sda3          257      257      320   514080   83  Linux native
/dev/sda4          321      321      530  1686825    5  Extended
/dev/sda5          321      321      338   144553+  82  Linux swap
/dev/sda6          339      339      530  1542208+  12  Unknown

# TO COPY LINUX BOOT PARTITIONS:  (new partition = /dev/XXXX)
#
fdisk /dev/XXX # change partitions
#reboot to Linux to be safe
mke2fs -c /dev/XXXX
mount /dev/XXXX /mnt/new
(cd /; tar clpf - .) | (cd /mnt/new; tar xpf -)
vi /mnt/new/etc/fstab
cp /zImage /dev/fd0
rdev /dev/fd0 /dev/XXXX
#reboot to new partition with floppy
rdev /zImage /dev/XXXX
vi /etc/lilo.conf
lilo

# TO COPY WIN95 BOOT PARTITIONS:  
#
fdisk /dev/XXX # change partitions and set active flag for C:
#reboot to Linux to be safe
dd if=/dev/zero of=/dev/hda1 bs=512 count=1 # and BE CAREFUL! - see "man fdisk"
#Reboot to W95 boot disk
format /s C:
#Reboot to Linux
mount /dev/XXXX /mnt/new -t vfat -o uni_xlate # newly formatted partition.
mount /dev/XXXX /mnt/old -t vfat -o uni_xlate # old dos partition.
(cd /mnt/old; tar clpf - .) | (cd /mnt/new; tar xpf -)
vi /etc/lilo.conf
lilo
#if W95 won't boot, try booting to W95 boot disk and "sys c:"