RE: [Cooker] How to Disk Copy a full Installation?

2000-07-22 Thread Greg Drake

Would it be possible to get a copy of the script?  Do you have to install
Linux first on each desktop/server, then do the untar?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 14, 2000 9:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [Cooker] How to Disk Copy a full Installation?


Sure... The way we do it in a university setting to mass install thousands
of computers is we tar up the image and untar it over the network to all
the new installations. Then with a minor script we change hostnames, etc.

Link World wrote:

 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.

 SUNIL GUPTA
 LinkWorld.

--
++

You have been infected with the Linux Virus!

This virus operates on the honor system. If you run any version of Linux,
please delete a dozen or so files from your hard drive at random and then
forward this message to everyone in your address book.

Thank you for your participation.

++





Re: [Cooker] How to Disk Copy a full Installation?

2000-07-14 Thread Kevin Maciunas

Link World wrote:
 
 Dear Mr. Christopher,
 
 Your Solution appears fine as a re-installation aid. But How do I do a
 DiskCopy? In Windows, I set up a secondary master, format it, and use Diskcopy
 c: d: /e/c/q/h/r/y from command prompt. The resulting disk when installed in
 the new system does not boot, so I set the bootable partition from Fdisk and
 the system is fully replicated. All program files  settings work. Is there
 any such DISKDUMP facility from hda to hdb in LINUX?
 
 Sunil Gupta
 LinkWorld.

Try man dd.  dd will copy the disk verbatim, so assuming they're the
same this will be a quick (and really, really dirty) way to do it.  If
they are not the same, then you can use a dump/restore (via a pipe, no
need to actually STORE things) or a tar copy (again, via a pipe).  You'd
have to partition first tho'.

/Kevin
-- 
Kevin J. Maciunas   [EMAIL PROTECTED]
Department of Computer Science  PH: +61-8-8303-5586
The University of Adelaide  FAX:+61-8-8303-4366
Adelaide 5005 South Australia




Re: [Cooker] How to Disk Copy a full Installation?

2000-07-14 Thread Anton Graham

Submitted 14-Jul-00 by Link World:

 Your Solution appears fine for a networked environment. But How do I
 do a DiskCopy? In Windows, I set up a secondary master, format it,
 and use Diskcopy c: d: /e/c/q/h/r/y from dos box. The resulting disk
 when installed in the new system does not boot, so I set the bootable
 patron from Fdisk and the system is fully replicated. All program
 files  settings work. Is there any such DISKDUMP facility from hda
 to hdb in LINUX?

If both drives are of the same size, simply do:

dd if=/dev/hda of=/dev/hdc
 
This will exactly duplicate everything, including partition tables,
from master on primary (hda) to master on secondary (hdc).  No
formatting or DOS box needed.

hth

-- 
   _
 _|_|_
  ( )   *Anton Graham
  /v\  / [EMAIL PROTECTED]
/(   )X
 (m_m)   GPG ID: 18F78541
Penguin Powered!




Re: [Cooker] How to Disk Copy a full Installation?

2000-07-14 Thread Derek Wildstar

On Fri, 14 Jul 2000, Link World wrote:

 Dear Mr. Till Kamppeter,
 
 Your Solution appears fine for a networked environment. But How do I do a
 DiskCopy? In Windows, I set up a secondary master, format it, and use
 Diskcopy c: d: /e/c/q/h/r/y from dos box. The resulting disk when installed
 in the new system does not boot, so I set the bootable patron from Fdisk and
 the system is fully replicated. All program files  settings work. Is there
 any such DISKDUMP facility from hda to hdb in LINUX?

There are several different ways to do this.

If the partitions are the same size, the 'dd' command usually works best:

dd if=/dev/hda1 of=/dev/hdb1
dd if=/dev/hda2 of=/dev/hdb2

"if" means "in file" "of" means "out file", in this case the devices you
want to copy from/to.  There are several other options, see the "man
dd" command for more info.

Another way, much better for different size partitions, is to use "cp
-a /usr /mnt/disk" or "cp -av /usr /mnt/disk"  Throwing the "v" in causes
every file to be printed out as it is copied, possibly slowing things down
a bit depending on your display speed but shows you what's going on.  Keep
in mind that if a directory called "/usr" doesn't exist, it will be
created on your mount point.  If you don't want this, cd into the
directory you want to copy then do "cp -a . /mnt/disk/"  You can use the
"x" option to keep the cp on one file system if you are moving your
system, for example if you have /usr mounted on a separate filesystem from
/ and don't want to copy it all at once, "cp -avx / /mnt/disk/" would copy
everything residing on the / partition to /mnt/dsisk.  The important thing
here is that the mount points themselves will not be
created.../mnt/disk/usr or /mnt/disk/mnt/disk would have to be created in
order to have a working system afterward.

Another thing to be careful of is "cp -a / /mnt/disk"  You will recurse
into /mnt/disk and end up with /mnt/disk/mnt/disk/mnt/disk... ... until
the destination parttion runs out of space.

The last step in either process is to mount the root filesysem somewhere
and do  /mnt/disk/sbin/lilo -r /mnt/disk after changing
/mnt/disk/lilo.conf to update the boot line in lilo.conf.  The best thing
to do is make a boot floppy if you're physically changing anything...it's
a bit tricky getting lilo to work on hdb if you are going to move it to
hda, for example...it's better to setup a boot floppy with your new root
partition then run lilo once you've booted from there.

-dwild




Re: [Cooker] How to Disk Copy a full Installation?

2000-07-14 Thread Robert L Martin

Dear Mr. Christopher,

Your Solution appears fine as a re-installation aid. But How do I do a
DiskCopy? In Windows, I set up a secondary master, format it, and use
Diskcopy
c: d: /e/c/q/h/r/y from command prompt. The resulting disk when
installed in
the new system does not boot, so I set the bootable partition from Fdisk
and
the system is fully replicated. All program files  settings work. Is
there
any such DISKDUMP facility from hda to hdb in LINUX?

-

given a formatted drive in say hdc wouldn't cp /dev/hda /dev/hdc or a
mount point to mount point copy do the same
thing (just use a lilo floppy to build the mbr)




Re: [Cooker] How to Disk Copy a full Installation?

2000-07-14 Thread Daniel Tabuenca

Sure... The way we do it in a university setting to mass install thousands
of computers is we tar up the image and untar it over the network to all
the new installations. Then with a minor script we change hostnames, etc.

Link World wrote:

 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.

 SUNIL GUPTA
 LinkWorld.

--
++

You have been infected with the Linux Virus!

This virus operates on the honor system. If you run any version of Linux,
please delete a dozen or so files from your hard drive at random and then
forward this message to everyone in your address book.

Thank you for your participation.

++






Re: [Cooker] How to Disk Copy a full Installation?

2000-07-13 Thread Pixel

Link World [EMAIL PROTECTED] writes:

 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= 
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]);
}




Re: [Cooker] How to Disk Copy a full Installation?

2000-07-13 Thread Till Kamppeter

The best is Kickstart, but when it is not possible to use it (too
different machines, distro w/o Kickstart) I do more or less the
following:

Prepare the copying:

   - Install one machine completely and make a boot disk for it
   - Connect the installed machine to your local network

Do this for every copy copy:

   - Connect a second PC with blank HD to your network
   - Boot the machine with a rescue CD (CD of MDK 7.1, or SuSE, or some
 of these credit-card rescue CDs which you get on every Linux fair.
   - partition the harddisk with 'fdisk' and format it with 'mkfs' and
 'mkswap'.
   - Make it known for the first machine by entering it in roots
.rhosts,
 /etc/hosts and /etc/hosts.equiv
   - Get access to the network entering

hostname [your hostname]
ifconfig eth0 inet [your IP] netmask [your netmask]
route add default gw [your gateway IP]

   - Test the access with 'netstat -nr', 'ping [IP of first PC]'
   - Make mountpoints and mount all disk partitions, so that the later
 root directory will be /mnt.
   - Copy the 'root' partition

cd /mnt
rsh [IP of first PC] '(tar -cvplf - /)' | tar -xvpf -

   - Copy the other partitions

cd /mnt
rsh [IP of first PC] '(cd / ; tar -cvplf - usr)' | tar -xvpf -
cd /mnt/usr
rsh [IP of first PC] '(cd /usr ; tar -cvplf - local)' | tar
-xvpf -
cd ..

   - Adapt the configuration files (they are in /mnt/etc/... now) and
 edit /mnt/etc/inittab to start in a non-graphical run mode.
   - Boot the PC with the boot disk of the first PC, ignore all error
 messages.
   - Edit /etc/lilo.conf end enter 'lilo' to make the PC bootable.
   - Configure sound, graphics, network, printers, and so on with the
 Maandrake tools.
   - Boot the PC and all should work.


Link World wrote:
 
 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.
 
 SUNIL GUPTA
 LinkWorld.




Re: [Cooker] How to Disk Copy a full Installation?

2000-07-13 Thread Christopher Molnar

What about chooisng expert install and allowing it to create an
autoinstall floppy? I have to re-format and re-install cooker every time I
want to do clean testing. I use the autoinstall floppy (in RH known as
kickstart) about 4-5 times per day.


-Chris

On Thu, 13 Jul 2000, Link World wrote:

 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.
 
 SUNIL GUPTA
 LinkWorld.
 
 
 




Re: [Cooker] How to Disk Copy a full Installation?

2000-07-13 Thread Guillaume Cottenceau

Link World [EMAIL PROTECTED] writes:

 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?

You probably can take advantage of the auto_install stuff.

http://www.linux-mandrake.com/drakx/auto_inst.html

-- 
Guillaume Cottenceau -- Distribution Developer for MandrakeSoft
http://www.mandrakesoft.com/~gc/




Re: [Cooker] How to Disk Copy a full Installation?

2000-07-13 Thread Eric MC.D

Link World wrote:
 
 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.
 
 SUNIL GUPTA
 LinkWorld.
OMHO,
Norton Ghost.Suggested by NAQUIN Frédérick.
Eric





Re: [Cooker] How to Disk Copy a full Installation?

2000-07-13 Thread Link World

Dear Mr. Christopher,

Your Solution appears fine as a re-installation aid. But How do I do a
DiskCopy? In Windows, I set up a secondary master, format it, and use Diskcopy
c: d: /e/c/q/h/r/y from command prompt. The resulting disk when installed in
the new system does not boot, so I set the bootable partition from Fdisk and
the system is fully replicated. All program files  settings work. Is there
any such DISKDUMP facility from hda to hdb in LINUX?

Sunil Gupta
LinkWorld.

Christopher Molnar wrote:

 What about chooisng expert install and allowing it to create an
 autoinstall floppy? I have to re-format and re-install cooker every time I
 want to do clean testing. I use the autoinstall floppy (in RH known as
 kickstart) about 4-5 times per day.

 -Chris

 On Thu, 13 Jul 2000, Link World wrote:

  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.
 
  SUNIL GUPTA
  LinkWorld.
 
 
 






Re: [Cooker] How to Disk Copy a full Installation?

2000-07-13 Thread Link World

Dear Mr. Till Kamppeter,

Your Solution appears fine for a networked environment. But How do I do a
DiskCopy? In Windows, I set up a secondary master, format it, and use
Diskcopy c: d: /e/c/q/h/r/y from dos box. The resulting disk when installed
in the new system does not boot, so I set the bootable patron from Fdisk and
the system is fully replicated. All program files  settings work. Is there
any such DISKDUMP facility from hda to hdb in LINUX?

Sunil Gupta
LinkWorld.


Till Kamppeter wrote:

 The best is Kickstart, but when it is not possible to use it (too
 different machines, distro w/o Kickstart) I do more or less the
 following:

 Prepare the copying:

- Install one machine completely and make a boot disk for it
- Connect the installed machine to your local network

 Do this for every copy copy:

- Connect a second PC with blank HD to your network
- Boot the machine with a rescue CD (CD of MDK 7.1, or SuSE, or some
  of these credit-card rescue CDs which you get on every Linux fair.
- partition the harddisk with 'fdisk' and format it with 'mkfs' and
  'mkswap'.
- Make it known for the first machine by entering it in roots
 .rhosts,
  /etc/hosts and /etc/hosts.equiv
- Get access to the network entering

 hostname [your hostname]
 ifconfig eth0 inet [your IP] netmask [your netmask]
 route add default gw [your gateway IP]

- Test the access with 'netstat -nr', 'ping [IP of first PC]'
- Make mountpoints and mount all disk partitions, so that the later
  root directory will be /mnt.
- Copy the 'root' partition

 cd /mnt
 rsh [IP of first PC] '(tar -cvplf - /)' | tar -xvpf -

- Copy the other partitions

 cd /mnt
 rsh [IP of first PC] '(cd / ; tar -cvplf - usr)' | tar -xvpf -
 cd /mnt/usr
 rsh [IP of first PC] '(cd /usr ; tar -cvplf - local)' | tar
 -xvpf -
 cd ..

- Adapt the configuration files (they are in /mnt/etc/... now) and
  edit /mnt/etc/inittab to start in a non-graphical run mode.
- Boot the PC with the boot disk of the first PC, ignore all error
  messages.
- Edit /etc/lilo.conf end enter 'lilo' to make the PC bootable.
- Configure sound, graphics, network, printers, and so on with the
  Maandrake tools.
- Boot the PC and all should work.

 Link World wrote:
 
  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.
 
  SUNIL GUPTA
  LinkWorld.