diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-07-13 12:15:44 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-07-13 12:15:44 +0000 |
commit | 7a0f1c3eea57413de17756e30eece4018224dec2 (patch) | |
tree | f27e7e991f11078943e5340c04952e53c8246f02 | |
parent | 5d7866bc867a4a048d9e917a7d26e9189feacd0d (diff) | |
download | drakx-7a0f1c3eea57413de17756e30eece4018224dec2.tar drakx-7a0f1c3eea57413de17756e30eece4018224dec2.tar.gz drakx-7a0f1c3eea57413de17756e30eece4018224dec2.tar.bz2 drakx-7a0f1c3eea57413de17756e30eece4018224dec2.tar.xz drakx-7a0f1c3eea57413de17756e30eece4018224dec2.zip |
no_comment
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | docs/README | 72 | ||||
-rw-r--r-- | perl-install/Makefile | 30 | ||||
-rw-r--r-- | perl-install/install_steps_auto_install.pm | 3 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 3 | ||||
-rw-r--r-- | rescue/kernel_read_part.c | 13 | ||||
-rwxr-xr-x | rescue/tree/etc/oem | 2 |
7 files changed, 92 insertions, 40 deletions
@@ -15,9 +15,6 @@ BOOT_IMG += $(RELEASE_BOOT_IMG) BOOT_RDZ = $(BOOT_IMG:%.img=%.rdz) BINS = install/install install/full-install install/local-install install/installinit/init DIRS = tools install install/installinit perl-install -ifeq (i386,$(ARCH)) -#DIRS += lnx4win -endif ROOTDEST = /export UPLOAD_DEST_ = ~/cooker @@ -47,11 +44,6 @@ build: $(BOOT_IMG) autoboot: ifeq (i386,$(ARCH)) - install -d $(ROOTDEST)/lnx4win - cp -f vmlinuz $(ROOTDEST)/lnx4win - cp -f cdrom.rdz $(ROOTDEST)/lnx4win/initrd.gz - /usr/sbin/rdev -v $(ROOTDEST)/lnx4win/vmlinuz 788 - install -d $(ROOTDEST)/boot cp -f vmlinuz {hd,cdrom,pcmcia,network}.rdz $(ROOTDEST)/boot /usr/sbin/rdev -v $(ROOTDEST)/boot/vmlinuz 788 @@ -95,7 +87,6 @@ upload: clean install upload Mandrake/mdkinst '' ;\ upload Mandrake/base {compss*,mdkinst_stage2.gz,rescue_stage2.gz} ;\ upload boot '' ;\ - upload lnx4win {initrd.gz,vmlinuz} ;\ for i in $(RELEASE_BOOT_IMG); do upload images $$i; done ;\ echo diff --git a/docs/README b/docs/README index 93143a4a4..70daaaa61 100644 --- a/docs/README +++ b/docs/README @@ -256,3 +256,75 @@ doesn't contain scsi modules nor ide. > - Architectural overview of each have a look at gi/install.fig + + +******************************************************************************** +* OEM ************************************************************************** +******************************************************************************** +> I am a system OEM in Bangalore,India selling systems bundled with +> Mandrake Linux. The problem is that with every system I sell, I need to +> install & configure the system which takes HOURS!. Can I do a diskcopy +> instead? +> +> Please Help. This is a major bottleneck for me. + +many solutions: + +- make an install on drive hdb, then either + 1. dd if=/dev/hdb of=/dev/hdc + 2. dd if=/dev/hdb of=/dev/hdc count=1 ; kernel_reread /dev/hdc ; + mke2fs /dev/hdc1 ; mount /dev/hdb1 /source ; mount /dev/hdc1 /dest ; cp -a /source /dest + +- try the oem feature + 3. - burn a cd out of *latest* cooker + - boot on it telling "oem" to syslinux + !! it will destroy every data on the harddrive !! + - you now have a very automated install matrix + (duplicate it with "dd if=/dev/hdb of=/dev/hdc bs=1M count=730") + + put the harddrive in the oem box, the user will now have an *very* automated + install, just asking the root password and user password. + + 4. (just like 3. without burning a cd, doing the first part by hand) + have a look at the /etc/oem script on the rescue and do it by hand... + + +cu Pixel. + + +comments: +1. maybe copy unnecessary things -> take too long + solution -> use bs=8k count=xxxx +2. kernel_reread can be found on the new rescue, source is also at end of this +mail. This solution works with one partition. Can be easily enhanced to many +primary partitions... For extended partitions, more complicated, but not much :) +3. has just been added in latest cooker. It may still have some pb. The main +current limitation is IDE only, though it can be fixed easily for special cases. + +-------------------------------------------------------------------------------- +#include <stdio.h> +#include <sys/mount.h> +#include <fcntl.h> + +void die(char *msg) +{ + perror(msg); + exit(1); +} + +void kernel_read(char *dev) +{ + int fd; + if ((fd = open(dev, O_RDONLY)) == -1) die("can't open device"); + ioctl(fd, BLKRRPART, 0); + close(fd); +} + +int main(int argc, char **argv) +{ + if (argc != 2) { + fprintf(stderr, "usage: kernel_read_part <hard drive device>\n"); + exit(1); + } + kernel_read(argv[1]); +} diff --git a/perl-install/Makefile b/perl-install/Makefile index 0c4226668..299a34b85 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -88,22 +88,20 @@ ifeq (sparc,$(ARCH)) endif for i in `cat /tmp/list`; do \ - if [ -e $$i ]; then \ - if (echo $$i | grep -q "lib/[^/]*\.so"); then \ - install -s $$i $(DEST)/lib; \ - else \ - d=$$i; \ - (echo $$d | grep -q "^[^/]") && d="$(REP4PMS)/$$d"; \ - d=`echo $(DEST)/$$d | sed 's/\/usr\/local\//\/usr\//'`; \ - install -d `dirname $$d` && \ - if (echo $$i | grep -q "\.pm"); then \ - perl -pe '$$_ =~ /^__END__/ and exit(0);' $$i > $$d; \ - elif (echo $$i | grep -q "\.so"); then \ - install -s $$i $$d; \ - else \ - cp -f $$i $$d; \ - fi; \ - fi; \ + if (echo $$i | grep -q "lib/[^/]*\.so"); then \ + install -s $$i $(DEST)/lib; \ + else \ + d=$$i; \ + (echo $$d | grep -q "^[^/]") && d="$(REP4PMS)/$$d"; \ + d=`echo $(DEST)/$$d | sed 's/\/usr\/local\//\/usr\//'`; \ + install -d `dirname $$d` && \ + if (echo $$i | grep -q "\.pm"); then \ + perl -pe '$$_ =~ /^__END__/ and exit(0);' $$i > $$d; \ + elif (echo $$i | grep -q "\.so"); then \ + install -s $$i $$d; \ + else \ + cp -f $$i $$d; \ + fi; \ fi; \ done mv -f $(DEST)/lib/libimlib-png.so $(DEST)/usr/lib diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index 71aac7080..8f92edb49 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -6,6 +6,9 @@ use vars qw(@ISA); @ISA = qw(install_steps); +use modules; + + #-###################################################################################### #- misc imports #-###################################################################################### diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index c4751a9d9..7595fd5e9 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -767,10 +767,11 @@ sub create_steps_window { $pixmap->signal_connect(enter_notify_event => sub { print "HERE\n" }); if ($step->{reachable}) { - my $button = new Gtk::Button + my $button = new Gtk::Button; $button->set_relief('none'); gtksignal_connect(gtkadd($button, $b), clicked => sub { die "setstep $step_name\n" }); $button; + } } grep { !eval $o->{steps}{$_}{hidden}; } @{$o->{orderedSteps}}), diff --git a/rescue/kernel_read_part.c b/rescue/kernel_read_part.c index 4b9d16d65..279dfe787 100644 --- a/rescue/kernel_read_part.c +++ b/rescue/kernel_read_part.c @@ -1,14 +1,7 @@ -#include <unistd.h> -#include <stdlib.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/stat.h> -#include <sys/wait.h> #include <sys/mount.h> #include <fcntl.h> - void die(char *msg) { perror(msg); @@ -18,15 +11,9 @@ void die(char *msg) void kernel_read(char *dev) { int fd; - - sync(); if ((fd = open(dev, O_RDONLY)) == -1) die("can't open device"); - sync(); - sleep(1); ioctl(fd, BLKRRPART, 0); - sync(); close(fd); - sync(); } int main(int argc, char **argv) diff --git a/rescue/tree/etc/oem b/rescue/tree/etc/oem index e95d572e1..d76e6db78 100755 --- a/rescue/tree/etc/oem +++ b/rescue/tree/etc/oem @@ -38,4 +38,4 @@ rm /hd/Mandrake/mdkinst/usr/bin/runinstall2 echo "Done, oem hard drive ready! Press enter to reboot" read -reboot
\ No newline at end of file +reboot |