Date: Tue, 29 Sep 1998 23:29:58 +0200 From: Alain Spineux Organization: UCL X-Mailer: Mozilla 4.5b2 [en] (X11; I; Linux 2.0.35 i686) X-Accept-Language: fr-FR MIME-Version: 1.0 To: andreoli@pisoft.it Subject: mulinux : speed up the boot for 30' mulinux is a very good job, very easy to configure and to modifie but : in your /etc/rc.6 .... killall5 -15 sleep 1 # 1 is not enougth for a program to save something killall5 -9 # to the floppy, i suggest you 5 or 10 sec .... AND to speed up the boot I propose to use my program ddifskip.c to replace dd in your /etc/rc.M .... echo "Loading ram2.bz2 (80 seconds) ... wait, wait :)" mount /dev/ram1 /usr cd / #dd if=/dev/fd0H1722 skip=$offset|bzip2 -ds|tar -xf - ddifskip /dev/fd0H1722 $offset|bzip2 -ds|tar -xf - .... my program uses lseek to skip first $offset blocks althought dd reads it ! /*** * ddifskip.c * * replace "dd if=argv[1] skip=argv[2]" * use "lseek" for skip to speed up * * for mulinux * * Alain Spineux 9/98 ***/ #include #include #include #include #define BUFSIZE 1024 int main(int argc, char *argv[]) #include { char buf[BUFSIZE]; int fd; int n; fd=open(argv[1], O_RDONLY); lseek(fd, 1024*atoi(argv[2]), SEEK_SET); while (1) { n=read(fd, buf, BUFSIZE); if (n == 0) break; /* EOF. */ if (n < 0) return -2; write(1, buf, n); } close(fd); return 0; } -- Spineux Alain ====================================================================== Spineux Alain E-MAIL : spineux@prm.ucl.ac.be INSTITUT STEVIN Catholic University of Louvain FAX : 32-10-472501 PLACE DU LEVANT 2 PHONE : 32-10-472516 B-1348 LOUVAIN-LA-NEUVE (BELGIUM) =======================================================================