[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

siteROCK patches to boot-floppies-2.2.17



The following patches are used for our credit card size CD to make the
install easier for regular people.

They add the following features:

1. Autopartitioning
2. New options on bootup (COPYCD copy the CD to the harddisk to avoid
having to reinsert the CD when the base system comes up. Base system
automatically reads .debs from /dist from the HD and then removes /dist
later before reconfigured apt to get stuff from openrock and so on)
3. Some dialogues removed if quiet is on.

I also want to add Will Lowe's pci autodetection to this before the next
release. And hopefully have the chance to clean it up.

This is pretty raw stuff but it works here.

--- boot-floppies-2.2.17.orig/debian/changelog
+++ boot-floppies-2.2.17/debian/changelog
@@ -1,3 +1,9 @@
+boot-floppies (2.2.17-1) stable; urgency=low
+
+  * Specially patched release for siterock
+
+ -- Christoph Lameter <christoph@lameter.com>  Wed, 11 Oct 2000 13:55:14 -0700
+
 boot-floppies (2.2.17) stable; urgency=low
 
   * Adam Di Carlo: 
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/bootconfig.c
+++ boot-floppies-2.2.17/utilities/dbootstrap/bootconfig.c
@@ -1667,7 +1667,7 @@
   asprintf(&opt[1].string, _("Install LILO in the %s boot sector."), Boot->mount_point);
   snprintf(prtbuf, sizeof(prtbuf), _("LILO can be installed either into the master boot record (MBR), or into the %s boot block. If installed into the MBR, LILO will take control of the boot process. If you choose not to install LILO into the MBR, you will have the opportunity later on to install an alternative MBR program (for bootstrapping LILO).\n"),
 	   Boot->name);
-  res = menuBox(prtbuf, _("Where should the Lilo boot loader be installed?"), opt, 2, 0);
+  if (bootargs.autopart) res=1; else res = menuBox(prtbuf, _("Where should the Lilo boot loader be installed?"), opt, 2, 0);
   boot = opt[res].tag;
   installed_mbr = (res == 0);
   free(opt[1].string);
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/choose_medium.c
+++ boot-floppies-2.2.17/utilities/dbootstrap/choose_medium.c
@@ -642,7 +642,7 @@
 		sprintf(devname, "/dev/hd%c", cdr.ide_disks[0]);
 	    device = devname;
 
-	    if (is_cdrom_install() == 1 && !bootargs.isverbose)
+	    if (is_cdrom_image() == 1 && !bootargs.isverbose)
 		/* if it's 1, then we made it here at the users request
 		 * otherwise, use the only drive we have */
 		status = 1;
@@ -693,7 +693,7 @@
 	boxResume();
     }
 
-    problemBox(_("Please place the Debian CD-ROM in the CD-ROM drive."),
+	if (!is_cdrom_image()) problemBox(_("Please place the Debian CD-ROM in the CD-ROM drive."),
 	       _("Please insert the CD-ROM"));
     if (!system("cat /proc/mounts | grep -q " CM_MOUNTPOINT_DIR))
       execlog("umount " CM_MOUNTPOINT_DIR, LOG_DEBUG);
@@ -863,7 +863,7 @@
 	chdir (pwd);
     }
 
-    problemBox(_("Please place the Debian CD-ROM in the CD-ROM drive."),
+	if (!is_cdrom_image()) problemBox(_("Please place the Debian CD-ROM in the CD-ROM drive."),
 	       _("Please insert the CD-ROM"));
 
     /*
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/dbootstrap.h
+++ boot-floppies-2.2.17/utilities/dbootstrap/dbootstrap.h
@@ -134,11 +134,16 @@
   char *mouse; 
   char *disksize;
   char *flavor;
+  char *install;
+  char *drivers;
+  char *tz;
   int cdrom;
   int ismono;
   int isdebug;
   int isverbose;
   int isquiet;
+  int copycd;
+  int autopart;
 } bootargs;
 
 enum extract_type {
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/extract_base.c
+++ boot-floppies-2.2.17/utilities/dbootstrap/extract_base.c
@@ -101,6 +101,11 @@
         free(file);
       }
     }
+    if (bootargs.copycd)
+    { 
+      pleaseWaitBox("CD Content is being copied to the Harddisk");
+      execlog("cp -a /instmnt/dists /target", LOG_INFO);
+    }
     execlog("umount /instmnt", LOG_INFO);
   } else {
     status=extract_from_floppy(Archive_Dir,"/target/" BASETGZ,_("Base System"), base_filenames, _("the base series"));
@@ -112,7 +117,6 @@
   }
   sprintf(prtbuf,"cp %s %s","/etc/inittab.install","/target/etc/inittab"); 
   execlog(prtbuf, LOG_INFO);
-
   sync();
   return 0;
 }
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/main.c
+++ boot-floppies-2.2.17/utilities/dbootstrap/main.c
@@ -163,6 +163,11 @@
     { "verbose",   1, &bootargs.isverbose}, /* chatty mode */
     { "quiet",     1, &bootargs.isquiet  }, /* quiet mode */
     { "cdrom",     1, &bootargs.cdrom    }, /* cdrom install */
+    { "install=",  0, &bootargs.install  }, /* install package no tasksel */
+    { "drivers=",  0, &bootargs.drivers  }, /* install drivers no driverconfig */
+    { "boottz=",   0, &bootargs.tz       }, /* tz skip tzconfig */
+    { "autopart",  1, &bootargs.autopart }, /* no partitioning question autopart */
+    { "copycd",    1, &bootargs.copycd   }, /* copy /dist cd contents to /target */
     { NULL,        0, NULL               }
   };
 
@@ -713,9 +718,9 @@
     }
    
 #ifdef USE_LANGUAGE_CHOOSER
-    release_notes (lang->msgcat);
+    if (!bootargs.isquiet) release_notes (lang->msgcat);
 #else
-    release_notes (NULL);
+    if (!bootargs.isquiet) release_notes (NULL);
 #endif
     is_root_a_floppy ();
 
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/main_menu.c
+++ boot-floppies-2.2.17/utilities/dbootstrap/main_menu.c
@@ -665,7 +665,7 @@
 	    items++;
 	}
 
-	rs = menuBox (bufT, _("Debian GNU/Linux Installation Main Menu"), choices, items, 0);
+	rs = menuBox (bufT, _("siteROCK Debian/Linux Installation Main Menu"), choices, items, 0);
 	data = ilist[rs];
 
 #ifndef _TESTING_
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/partition_config.c
+++ boot-floppies-2.2.17/utilities/dbootstrap/partition_config.c
@@ -132,6 +132,33 @@
     }
     free (swaps);
   }
+  /* prompt for autopartitioning */
+  if (yesNoBox(_("Autopartitioning will setup a default partition scheme on your harddisk and format all necessary partitions without any user interaction.\n\nALL EXISTING FILES WILL BE LOST\n\nIf you do not choose autopartitioning then you will be prompted for partitioning and formatting.\nDo you want to autopartition?"),_("Autopartitioning?")))
+  {
+  	/* invoke fdisk with specific arguments */
+  	boxSuspend();
+#define FORMAT_STRING "d\n1\nd\n2\nd\n3\nd\n4\nn\np\n1\n\n+20M\na\n1\nn\np\n2\n\n+200M\nt\n2\n82\nn\np\n3\n\n\nw\n" 
+  	sprintf(prtbuf,"echo -e '%s' | fdisk %s >/dev/null",FORMAT_STRING,d->name);
+  	status=system(prtbuf);
+  	fdisk_reread();
+  	/* format swap */
+  	sprintf(prtbuf,"mkswap %s2",d->name);status=system(prtbuf);
+  	/* Activate swap */
+  	sprintf(prtbuf,"%s2",d->name);swapon(prtbuf,0);
+  	/* format ext2 partitions */
+  	sprintf(prtbuf,"mkfs.ext2 %s3",d->name);status=system(prtbuf);
+  	sprintf(prtbuf,"mount -t ext2 %s3 /target",d->name);status=system(prtbuf);
+  	sprintf(prtbuf,"%s3",d->name);
+  	Root=fdisk_find_partition_by_name(prtbuf);
+  	check_pending_config();
+  	status=system("mkdir /target/boot");
+  	sprintf(prtbuf,"mkfs.ext2 %s1",d->name);status=system(prtbuf);
+  	sprintf(prtbuf,"mount -t ext2 %s1 /target/boot",d->name);status=system(prtbuf);
+  	bootargs.autopart=1;
+  	boxResume();
+  	return 0;
+  }
+  
 #if #cpu(i386)
   if (! bootargs.isquiet)
     wideMessageBox(_(
@@ -433,7 +460,11 @@
 #endif
 		   _("Pre-2.2 Linux Kernel Compatibility?"));
   } else {
-    Oflag = DLG_YES;
+    Oflag = DLG_NO;
+/* Pre 2.2 compatibility by default would mean no sparse superblocks (slow
+ * mount and generall suggishness) as well as no filetype information in
+ * directories. */
+					   
   }
 
   cflag = get_cflag(p->name);
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/reboot_system.c
+++ boot-floppies-2.2.17/utilities/dbootstrap/reboot_system.c
@@ -23,6 +23,9 @@
 	return 1;
     }
   }
+  if (bootargs.copycd)
+  { problemBox(_("Please remove the CD from the drive and press a key"),_("Reboot"));
+  }
 
   if(!is_network_configured())
     write_common_network();
--- boot-floppies-2.2.17.orig/utilities/dbootstrap/util.c
+++ boot-floppies-2.2.17/utilities/dbootstrap/util.c
@@ -383,7 +383,10 @@
     write_userconfig("DEBUG", "true");
   if ( bootargs.cdrom )
     write_userconfig("CDROM", "true");
-
+  if ( bootargs.install )
+    write_userconfig("INSTALL",bootargs.install);
+  if ( bootargs.copycd )
+    write_userconfig("COPYCD","true");
   return 0;
 }
 



Reply to: