For me, creating a USB keydisk to use with Astlinux wasn't as easy as simply running genkdas the documentation suggested.  Here's How I did it.

Required responses are in bold


First I used fdisk to delete the funny dos partitions and create a single new partition

 

pbx root # fdisk /dev/sda

see Appendix for detail

pbx root # mount
(null) on /oldroot type ext2 (rw,nogrpid)
none on / type tmpfs (rw)
none on /proc type proc (rw)
none on /dev type tmpfs (rw)
none on /var type tmpfs (rw)
none on /tmp type tmpfs (rw)
none on /dev/pts type devpts (rw)
none on /sys type sysfs (rw)none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

Now run the Astlinux genkd utility

pbx root # genkd
Segmentation fault
This script will help to create a KeyDrive to store

your AstLinux configuration. MAKE SURE THAT YOUR DRIVE IS
CONNECTED.

I will use /dev/sda1
Please type yes to continue

Is this okay? yes
Creating partition...
Partitioning failed. You are on your own.
Filesystem created. Copying existing configuration...
cp: /stat/etc/wanpipe: No such file or directory
Done. I STRONGLY URGE YOU TO REBOOT NOW.
Type reboot to cleanly restart now.

Check it – note that it shows /dev/sda1 on /mnt/kd type ext2 (rw,nogrpid)

pbx root # mount
(null) on /oldroot type ext2 (rw,nogrpid)
none on / type tmpfs (rw)
none on /proc type proc (rw)
none on /dev type tmpfs (rw)
none on /var type tmpfs (rw)
none on /tmp type tmpfs (rw)
none on /dev/pts type devpts (rw)
none on /sys type sysfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

/dev/sda1 on /mnt/kd type ext2 (rw,nogrpid)

Check out what was put on the keydisk

pbx root # ls /mnt/kd -al
drwxr-xr-x 11 root root 1024 May 26 13:11 .
drwxr-xr-x 4 root root 80 Apr 4 2005 ..
-rw-r--r-- 1 root root 8192 May 26 13:09 astdb
drwxr-xr-x 2 root root 2048 May 26 13:09 asterisk
-rwxrwxr-x 1 root root 3710 Apr 13 17:53 astfw
drwxr-xr-x 2 root root 1024 May 26 13:09 cdr-csv
drwxr-xr-x 2 root root 1024 May 26 13:09 crontabs
-rw-r--r-- 1 root root 0 May 26 13:11 dnsmasq.leases
drwxr-xr-x 2 root root 1024 May 26 13:11 home
drwx------ 2 root root 12288 May 26 13:11 lost+found
drwxr-xr-x 2 root root 1024 May 26 13:11 monitor
-rw-r--r-- 1 root root 14779 May 26 13:11 rc.conf
drwxr-xr-x 2 root root 1024 May 26 13:11 ssh
drwxr-xr-x 2 root root 1024 May 26 13:09 tftpboot
drwxrwxr-x 3 root root 1024 May 4 17:17 voicemail

now test it

pbx root # cd /mnt/kd/
pbx kd # cp rc.conf chris.was.here
pbx kd # ls
astdb astfw chris.was.here dnsmasq.leases lost+found rc.conf tftpboot
asterisk cdr-csv crontabs home monitor ssh voicemail
pbx kd # reboot
pbx kd #

Appendix


fdisk steps

Command (m for help): p

Disk /dev/sda: 132 MB, 132590080 bytes

5 heads, 51 sectors/track, 1015 cylinders

Units = cylinders of 255 * 512 = 130560 bytes

Device Boot Start End Blocks Id System

/dev/sda1 ? 7332437 7993965 84344761 69 Unknown

Partition 1 has different physical/logical beginnings (non-Linux?):

phys=(68, 13, 10) logical=(7332436, 3, 33)

Partition 1 has different physical/logical endings:

phys=(288, 115, 43) logical=(7993964, 1, 16)

Partition 1 does not end on cylinder boundary.

/dev/sda2 ? 6672626 14005494 934940732+ 73 Unknown

Partition 2 has different physical/logical beginnings (non-Linux?):

phys=(371, 114, 37) logical=(6672625, 2, 5)

Partition 2 has different physical/logical endings:

phys=(366, 32, 33) logical=(14005493, 4, 27)

Partition 2 does not end on cylinder boundary.

/dev/sda3 ? 11 11 0 74 Unknown

Partition 3 has different physical/logical beginnings (non-Linux?):

phys=(371, 114, 37) logical=(10, 0, 24)

Partition 3 has different physical/logical endings:

phys=(372, 97, 50) logical=(10, 0, 23)

Partition 3 does not end on cylinder boundary.

/dev/sda4 1 18446744073706179642 18446744073279624704 0 Empty

Partition 4 has different physical/logical beginnings (non-Linux?):

phys=(0, 0, 0) logical=(0, 0, 1)

Partition 4 has different physical/logical endings:

phys=(0, 0, 0) logical=(13471033, 1, 6)

Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Command (m for help): d

Partition number (1-4): 1

Command (m for help): d

Partition number (1-4): 2

Command (m for help): d

Partition number (1-4): 3

Command (m for help): d

Selected partition 4

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1015, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1015, default 1015):

Using default value 1015

Command (m for help): t

Selected partition 1

Hex code (type L to list codes): b

Changed system type of partition 1 to b (Win95 FAT32)

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x

partitions, please see the fdisk manual page for additional

information.

Syncing disks.

pbx1 root # fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 133 MB, 133997056 bytes

5 heads, 52 sectors/track, 1006 cylinders

Units = cylinders of 260 * 512 = 133120 bytes

Device Boot Start End Blocks Id System

/dev/sda1 1 1006 130754 b Win95 FAT32

Command (m for help):q