--- toast-linux	2005/02/05 23:59:08	1.133
+++ toast-linux	2005/02/06 04:14:39	1.134
@@ -123,6 +123,12 @@
   esac
 }
 
+good_disk_name()
+{
+  read removable < "/sys/block/$1/removable" 2>/dev/null
+  [ "$removable" = "0" ]
+}
+
 partition()
 {
   # Environment variables:
@@ -183,7 +189,7 @@
     done
   else
     while read major minor blocks name rest; do
-      valid_disk_name "$name" && DISKS="$DISKS $name"
+      valid_disk_name "$name" && good_disk_name "$name" && DISKS="$DISKS $name"
     done < /proc/partitions
     [ -z "$DISKS" ] && error "no disks found"
   fi
@@ -1970,6 +1976,13 @@
   cp $(SMALLK) $@/linux
   cp rootfs.gz $@/initrd
 
+cd: $(LARGEK) $(ISOLINUX) rootfs.gz
+  rm -fr $@
+  !CONFIGURE! $@
+  cp $(LARGEK) $@/isolinux/linux
+  cp $(ISOLINUX) $@/isolinux/isolinux.bin
+  cp rootfs.gz $@/isolinux/initrd
+
 floppy.img: floppy $(MFORMAT) $(SYSLINUX) $(MCOPY) $(MDIR)
   rm -f $@
   $(MFORMAT) -C -v "toast linux" -f $(FLOPPY_SIZE) -r 1 -i $@ ::
@@ -1977,10 +1990,13 @@
   $(MCOPY) -i $@ -s $</* ::
   $(MDIR) -a -i $@ ::
 
-cd.iso: floppy.img $(MKISOFS)
+floppy.iso: floppy.img $(MKISOFS)
   $(MKISOFS) -o $@ -b $< $<
 
-toast-linux: toast-linux.stub cd.iso.gz
+%.iso: % $(MKISOFS)
+  $(MKISOFS) -o $@ -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table $<
+
+toast-linux: toast-linux.stub floppy.iso.gz
   rm -f $@
   cat $^ > $@
   chmod +x $@
@@ -1991,7 +2007,7 @@
 chroot: sbin/setup
   TOAST_NICE=5 sbin/setup
 
-vmware: floppy.img cd.iso vmclean toast.vmx
+vmware: floppy.img floppy.iso vmclean toast.vmx
   vmware-vdiskmanager -c -a buslogic -s 16gb -t 1 toast.vmdk
   vmware -x toast.vmx
 
@@ -1999,7 +2015,7 @@
   ./mkhd hda.img $(HDA_CYLINDERS)
   HDA_CYLINDERS=$(HDA_CYLINDERS) bochs -qf bochs-config
 
-bochs-cd: cd.iso bochs-config-cd mkhd
+bochs-cd: floppy.iso bochs-config-cd mkhd
   ./mkhd hda.img $(HDA_CYLINDERS)
   HDA_CYLINDERS=$(HDA_CYLINDERS) bochs -qf bochs-config-cd
 
@@ -2214,7 +2230,7 @@
 ata2: enabled=0
 ata3: enabled=0
 ata0-master: type=disk, path="hda.img", mode=flat, cylinders=$HDA_CYLINDERS, heads=16, spt=63
-ata1-master: type=cdrom, path="cd.iso", status=ejected
+ata1-master: type=cdrom, path="floppy.iso", status=ejected
 parport1: enabled=1, file=""
 com1: enabled=1, dev=""
 usb1: enabled=1, ioaddr=0xff80, irq=10
@@ -2258,7 +2274,7 @@
 scsi0:0.fileName = "toast.vmdk"
 scsi0:0.mode = "undoable"
 ide1:0.present = "TRUE"
-ide1:0.fileName = "cd.iso"
+ide1:0.fileName = "floppy.iso"
 ide1:0.deviceType = "cdrom-image"
 ide1:0.startConnected = "FALSE"
 floppy0.fileName = "floppy.img"
@@ -2275,6 +2291,13 @@
 f1 help
 append initrd=initrd root=/dev/ram0 vga=ext rw
 
+--- FILE cd/isolinux/isolinux.cfg ---
+display logo
+prompt 1
+timeout 200
+f1 help
+append initrd=initrd root=/dev/ram0 rw
+
 --- FILE floppy/logo ---
 
 
@@ -2300,6 +2323,9 @@
 
 Press 0fF107 within 20 seconds, or risk losing the contents of all hard disks!
 
+--- FILE cd/isolinux/logo ---
+Fancy toast linux logo will go here.
+
 --- FILE floppy/help ---
 By default, the network will be configured automatically using DHCP.
 All available network interfaces will be tried sequentially, starting
@@ -2324,6 +2350,9 @@
 
   DISKS=hda,hdb,sda     install on specified disks only
   DESTROY=yes           overwrite existing disk contents
+
+--- FILE cd/isolinux/help ---
+Help for CD version will go here, maybe.
 
 --- FILE root/etc/hosts ---
 127.0.0.1 localhost