Re: [vox-tech] Cloning a drive?

2004-06-21 Thread Paul
Thanks for all the (knwoledge, ideas, suggestions, etc).
I tested the ideas on a couple of old drives (does anyone throw away old 
drives?) and it seems to work

Set it up with source drive in hdc and destination in hda.
Booted knoppix in text mode so neither disk would be in use.
Using cfdisk, setup hda with two partitions (/ & swap).
Used mke2fs -j to format hda1 (I want to move from a reiserfs to ext3).
Used cp -av /dev/hdc /dev/hda.
It looks like the transfer worked right and if I edited lilo.conf and 
ran lilo hda would have been bootable, but I went to bed
-and-
The next morning I decided I didn't want to move a few years of cruft 
over to my new disk after all. So plan b is to start with a fresh 
install and move  the data and config file I need.

I think I'll try a knoppix hard disk install.
Thanks for all your help, you people are great.
Paul
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-21 Thread ME
ME said:

> # mkdir /new
> Now, in the "/new" create the mount-points for the mounted volumes. If
> /boot was /dev/hda1 then # mkdir /new/boot and then make the first
> partition of the new disk mount to that mount point with "mount" (see man
> page) The "/new" shoudl resemble the old disk's mounted volumes.

For example, if we assume /dev/hda1 is /boot, /dev/hda2 is /, and
/dev/hda3 is swap and the "new" drive is a secondary slave:
# mkdir /new
# mount /dev/hdd2 /new
# mkdir /new/boot
# mount /dev/hdd1 /new/boot

Order matters. Lower partitions must be mounted before child dirs can be
created and stored on the parent volume.

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-21 Thread ME
Tim Riley said:
> On Sat, 2004-06-19 at 12:08, Paul wrote:
>> I need to move my desktop from a (full) 10G drive to a (spare) 20G
>> drive.
>
> I would first try dd. After booting from a CD:
>
> # dd if=/dev/hda of=/dev/hdb
>
> This should make the first 10G of /dev/hdb the same as /dev/hda.
> So to recover the second 10G on /dev/hdb, run fdisk on /dev/hdb
> and create an additional partition.
>
> Disclaimer: I haven't done disk surgery in several years.
>
> 

Gah! This can cause problems with the MBR information on where to find
partition boundaries and make it difficult to make changes later as the
geometry of the older smaller disk will be different fromm the new disk.

There is a howto on migrating your disk, and it pretty much comes down to
this assuming IDE/ATA, Only Linux on the system, you have an EBD (Emegency
Boot Disk) and one very large volume for Linux, and one swap partition:

Power down.

Connect the new drive to an empty slot/cable.

Make is slave if necessary.

Power up the machine and boot into Linux.

Use fdisk and look at the present partition information.
 Find which is swap and which is your "/"
  (let us assume /dev/hda1 is "/" and /dev/hd2 is swap)

Use fdisk to create partitions which are at least the same size as the
ones on the original disk, and make sure the numbering for the partition
is the same. If /dev/hda1 was "/boot" and /dev/hda2 was "/" and /dev/hda3
was swap, then make the first partition on the new disk "/boot", the
second "/" and the third "swap" and make sure the size of each is equal to
or greater than the size of the partition on the old disk)

Use fdisk to specify the "filesystem type" of partition. (Easiest to use
the same filesystem type as your present system's mounted volumes)

Format the "new" drive's partitions with mkfs (see man pages.)

# mkdir /new
Now, in the "/new" create the mount-points for the mounted volumes. If
/boot was /dev/hda1 then # mkdir /new/boot and then make the first
partition of the new disk mount to that mount point with "mount" (see man
page) The "/new" shoudl resemble the old disk's mounted volumes.

If you use procfs (have a mounted /proc) then:
# cd /new
# mkdir /proc

If you use "devfs (have a /dev which is mounted as tyep "devfs" then:
# cd /new
# mkdir /dev
Else, you have the older "dev":
# cd /new
# cp -aR /dev ./
(the -R is supposed to be a recursive copy, but unlike the -r, the "-R" is
supposed to handle the device specil files like c,b,f, etc and copy the
type instead of the contents.)

Now for the other directories in "/" you can do a cp -aR for each dir from
/new:
# cd /new
(Make sure that /proc, /dev, /tmp, /cdrom, /floppy, and /mnt are not in
this list below.)
# cp -aR /bin /etc /home /lib /sbin /var /boot /root /sys /usr ./

If you have mount points like /cdrom /floppy or other mount points in /mnt
then you will want to make sure each of these are dirs not copied with
contents, but instead are just made in new (you know how to mdkir)

If you have a symlink in / which points to your running kernel, then make
a relative symlink from /new to the kernel (relative meaning that the link
should not start with a "/" but should start with a directory name like:)
# cd /new
# ln -s boot/kernel/mykernel samelinknamein-new-as-wasinold

At this point, all of your data should be copied to the new disk.

Now sync and shutdown:
# sync
# shutdown -h now

Swap the drives so that the new is the primary master and the old is
either not connected or is a salve or on another free slot (secondary
master slave or primary slave)

Put in your EBD.

Boot your machine and boot from the EBD.

Do not boot from the "EBD" as-is. Pass it an arguement for a "root" which
matches the partition number on the new disk that was "/"
In this case, you have made the new disk the primary master and you have
retained the same partition numbering as the old drive. This will make the
new drive become /dev/hda and ensure the data in /etc/fstab on the new
drive is correct as well:
Assuming lilo for the EBD, press shift, and then "tab" to list the
kernels. In RedHat, the LILO screed tells you you can press control-x or
something to get "advanced options" Get to this command line:

LILO:
listofkernelsavailable   for   booting
Select the appropriate kernel name and type it. I';ll assum your kernel is
"mykernel":

LILO:
mykernel root=/dev/hda2
(The above assumes that the 2nd partition on your new drive was "/")
(then press return)

At this point, your kernel should boot from the EBD, but have its "/"
actually be your new local HD.

Log in as root. Run lilo:
# lilo

Sync and reboot. (Do not forget to remove your EBD)
# sync
# reboot
(remove EBD)

Now the system should boot on its own and all should be well. If it does
not, you still have your Old drive around with all of its data.

Enjoy
-ME

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-21 Thread Tim Riley
On Sat, 2004-06-19 at 12:08, Paul wrote:
> I need to move my desktop from a (full) 10G drive to a (spare) 20G drive.

I would first try dd. After booting from a CD:

# dd if=/dev/hda of=/dev/hdb

This should make the first 10G of /dev/hdb the same as /dev/hda.
So to recover the second 10G on /dev/hdb, run fdisk on /dev/hdb
and create an additional partition.

Disclaimer: I haven't done disk surgery in several years.



___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-21 Thread Marc Hasbrouck
Ghost 2003 documentation states it can clone ext2 and
ext3 partitions. It may have problems with GRUB as
well. Older versions choked on it. I suspect the
Linux/Unix instructions given previously will work
best in this case.

Marc Hasbrouck


--- Jimbo <[EMAIL PROTECTED]> wrote:
> UmmmI not much up on linux but I use a program
> called Ghost by symantec.
> I have not only been able to copy whole drives but
> have been able to copy
> partitions as well.  I have onlydone this with
> windoze but it should be able
> to copy linux just as easy.  It boots from a floppy
> and is very user
> friendly, just point and click.  If you want I can
> bring it over sometime
> and help you out, just give me a holler off list.
> 
> Jimbo
> and yes, all cars break down, eventually.
> 
> - Original Message - 
> From: "Paul" <[EMAIL PROTECTED]>
> To: "lugod's technical discussion forum"
> <[EMAIL PROTECTED]>
> Sent: Saturday, June 19, 2004 12:08 PM
> Subject: [vox-tech] Cloning a drive?
> 
> 
> > I need to move my desktop from a (full) 10G drive
> to a (spare) 20G drive.
> >
> > The ideal results would be copy everything over,
> then run lilo on the
> > new drive, then it would boot up looking just like
> the old one.
> >
> > Some googling found me an out of date HOWTO and a
> few sites with
> > instructions that were a little vague, so I
> thought I would ask the
> experts.
> >
> > Has anybody done this?
> >
> > Is it easy - not to hard - increadibly difficult -
> don't even think
> > about it?
> >
> > How do I do it - or better yet - a site with
> almost idiot proof
> > instructions.
> >
> > What are the things that can go wrong?
> >
> > Thanks, Paul
> > ___
> > vox-tech mailing list
> > [EMAIL PROTECTED]
> > http://lists.lugod.org/mailman/listinfo/vox-tech
> >
> 
> 
> ___
> vox-tech mailing list
> [EMAIL PROTECTED]
> http://lists.lugod.org/mailman/listinfo/vox-tech
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-20 Thread Charles McLaughlin
I use a program called partimage for this task.  Essentially it is a 
free clone of Ghost.  Last I checked it couldn't resize a partition 
while restoring from an image file.  But you might want to check it out 
-- boot off a Knoppix CD and run it from there.

Charles
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-19 Thread Jimbo
UmmmI not much up on linux but I use a program called Ghost by symantec.
I have not only been able to copy whole drives but have been able to copy
partitions as well.  I have onlydone this with windoze but it should be able
to copy linux just as easy.  It boots from a floppy and is very user
friendly, just point and click.  If you want I can bring it over sometime
and help you out, just give me a holler off list.

Jimbo
and yes, all cars break down, eventually.

- Original Message - 
From: "Paul" <[EMAIL PROTECTED]>
To: "lugod's technical discussion forum" <[EMAIL PROTECTED]>
Sent: Saturday, June 19, 2004 12:08 PM
Subject: [vox-tech] Cloning a drive?


> I need to move my desktop from a (full) 10G drive to a (spare) 20G drive.
>
> The ideal results would be copy everything over, then run lilo on the
> new drive, then it would boot up looking just like the old one.
>
> Some googling found me an out of date HOWTO and a few sites with
> instructions that were a little vague, so I thought I would ask the
experts.
>
> Has anybody done this?
>
> Is it easy - not to hard - increadibly difficult - don't even think
> about it?
>
> How do I do it - or better yet - a site with almost idiot proof
> instructions.
>
> What are the things that can go wrong?
>
> Thanks, Paul
> ___
> vox-tech mailing list
> [EMAIL PROTECTED]
> http://lists.lugod.org/mailman/listinfo/vox-tech
>


___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-19 Thread Mark K. Kim
Reiser and EXT3 aren't too different for what you're trying to do, so just
make EXT3 on the new hard drive and make the layout like the reiser and
you'll be fine. (If you had a VFAT and wanted to transfer to EXT3, that'd
be a problem, but UNIX partitions in general are cross-transferrable
without [much] difficulty.)

The newer versions of LILO supports partition labels, but I don't think
Debian uses it by default so you probably won't have to worry about
labels.

Good luck! =)

-Mark


On Sat, 19 Jun 2004, Paul wrote:

> Details I didn't know to mention:-)
>
> 10G is Debian(unstable) on a one partition(/) reiser filesystem.
> 20G is empty and I would like to use EXT3 if its not too hard to do
> I use lilo.
> I have disk caddies for hda and hdc so swapping is easy
> I'm comfortable with command line
>
> Mark K. Kim wrote:
> > On Sat, 19 Jun 2004, Paul wrote:
> >
> >
> >>I need to move my desktop from a (full) 10G drive to a (spare) 20G drive.
> >>
> >>The ideal results would be copy everything over, then run lilo on the
> >>new drive, then it would boot up looking just like the old one.
> >
> >
> > Nah... it doesn't work like that... unfortunately.
> >
> snip
> >
> > 1. Assuming you still have the 10G hard drives on your computer, put the
> > 20G in it.  Take off a CDROM drive if you don't have a spare connection or
> > space -- you'll be able to put it back in later.  Boot off of the 10G as
> > you normally do.
> >
> > 2. After boot, as root, make partitions on the 20G drive using `cfdisk`.
> > Format each partition using the proper program (mkfs.ext3 for EXT3, mkswap
> > for Linux swap partitions, mkfs.vfat for VFAT partitions, etc.)  Notes:
> >
> snip
> Would it be better to Knoppix so that neither disk is in use?
> >
> > 3. Run `cp -a` to copy over all the files from the 10G to 20G, one
> > partition at a time.  Notes:
>
> Bingo! will 'cp -a' copy "everything" keeping links, symlinks and other
> stuff intact? The man page didn't go into a lot of details.
> >
> snip
> >
> > 4. Make a bootdisk using `mkboot` (no arguments).  Just in case, prepare a
> > bootable Linux CD, like Knoppix.
> >
> > 5. Turn off the computer.  Take the 10G out, and move to 20G to where the
> > 10G was.  Reboot with the bootdisk or a bootable Linux CD.  If you boot
> > with a bootable Linux CD, after booting, run `chroot <20G's root
> > partition>`.
> >
> > 6. After you boot successfully, run `lilo`.  If you use Grub instead of
> > Lilo, run `grub-install` (I think.)
> >
> Sounds very doable
> >
> >>What are the things that can go wrong?
> >
> >
> > Keep your 10G hard drive and don't write over it for about a month before
> > you do anything.  If you discover that something didn't copy over, you can
> > copy it over from the 10G drive.
> >
> > -Mark
> >
> ___
> vox-tech mailing list
> [EMAIL PROTECTED]
> http://lists.lugod.org/mailman/listinfo/vox-tech
>

-- 
Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.jsp?id=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-19 Thread Paul
Details I didn't know to mention:-)
10G is Debian(unstable) on a one partition(/) reiser filesystem.
20G is empty and I would like to use EXT3 if its not too hard to do
I use lilo.
I have disk caddies for hda and hdc so swapping is easy
I'm comfortable with command line
Mark K. Kim wrote:
On Sat, 19 Jun 2004, Paul wrote:

I need to move my desktop from a (full) 10G drive to a (spare) 20G drive.
The ideal results would be copy everything over, then run lilo on the
new drive, then it would boot up looking just like the old one.

Nah... it doesn't work like that... unfortunately.
snip
1. Assuming you still have the 10G hard drives on your computer, put the
20G in it.  Take off a CDROM drive if you don't have a spare connection or
space -- you'll be able to put it back in later.  Boot off of the 10G as
you normally do.
2. After boot, as root, make partitions on the 20G drive using `cfdisk`.
Format each partition using the proper program (mkfs.ext3 for EXT3, mkswap
for Linux swap partitions, mkfs.vfat for VFAT partitions, etc.)  Notes:
snip
Would it be better to Knoppix so that neither disk is in use?
3. Run `cp -a` to copy over all the files from the 10G to 20G, one
partition at a time.  Notes:
Bingo! will 'cp -a' copy "everything" keeping links, symlinks and other 
stuff intact? The man page didn't go into a lot of details.

snip
4. Make a bootdisk using `mkboot` (no arguments).  Just in case, prepare a
bootable Linux CD, like Knoppix.
5. Turn off the computer.  Take the 10G out, and move to 20G to where the
10G was.  Reboot with the bootdisk or a bootable Linux CD.  If you boot
with a bootable Linux CD, after booting, run `chroot <20G's root
partition>`.
6. After you boot successfully, run `lilo`.  If you use Grub instead of
Lilo, run `grub-install` (I think.)
Sounds very doable

What are the things that can go wrong?

Keep your 10G hard drive and don't write over it for about a month before
you do anything.  If you discover that something didn't copy over, you can
copy it over from the 10G drive.
-Mark
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-19 Thread MB
Here is how I clone drives -- normally I boot into linux ( on a separate 
system ), and then mount the original drive via external  usb case, and 
then mount the clone drive via a second external usb case.  This method 
should work just as well if you boot with a knoppix or other cdrom linux 
distro, and have both drives on the IDE bus.

1. Boot knoppix cd.
2. Mount your original drive -- mount /dev/hda1 /mnt/orig_10gig_drive
3. partition your clone drive -- cfdisk /dev/hdb (or wherever your drive 
need to be mounted from)
   a. I have just one partition, so if you have /tmp or /home or 
whatever on separate partitions, then you will need to adjust these 
instructions accordingly, so that your new drive has a similar layout -- 
i.e. if your original drive has one partition for linux and a swap 
partition, make the clone the same adjusting the sizes to accommodate 
the full 20gig drive.  That includes making the clone partitions in the 
same order on the drive.
   b. don't forget to make your main/root partition "bootable" and your 
swap partition as a type "83"
   c. you can check the partitions on the original drive with -- fdisk -l

4. format your clone drive -- mke2fs -v /dev/hdb1 ( add -j for an ext3 
filesystem )

5. mount your clone drive -- mount /dev/hdb1 /mnt/clone_20gig_drive
6. copy all files from old drive to clone -- cp --preserve=all -r  
/mnt/orig_10gig_drive/* /mnt/clone_20gig_drive/.

7. create /mnt/clone_20gig_drive/lilo_tmp_hdb.conf with something like:
boot=/dev/hdb
disk=/dev/hdb
root=/dev/hdb1
map=/mnt/clone_20gig_drive/boot/map # I don't remember...
install=/mnt/clone_20gig_drive/boot/boot.b # copy from host
#loader=/mnt/usbDrive2/boot/chain.b# -"-
#backup=/dev/null
vga=normal
default=linux
lba32
prompt
timeout=100
delay=100
image=/mnt/clone_20gig_drive/vmlinuz
   optional
   label=linux
   append="root=/dev/hda1" # kernel options
   read-only
8. Then run -- lilo -v -C /mnt/clone_20gig_drive/lilo_tmp_hdb.conf
9. Remove your original 10 gig drive, and replace with new 20 gig drive, 
changing the drive jumper as needed.

10. boot new system.
Good luck.
Mark
Paul wrote:
I need to move my desktop from a (full) 10G drive to a (spare) 20G drive.
The ideal results would be copy everything over, then run lilo on the 
new drive, then it would boot up looking just like the old one.

Some googling found me an out of date HOWTO and a few sites with 
instructions that were a little vague, so I thought I would ask the 
experts.

Has anybody done this?
Is it easy - not to hard - increadibly difficult - don't even think 
about it?

How do I do it - or better yet - a site with almost idiot proof 
instructions.

What are the things that can go wrong?
Thanks, Paul
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Cloning a drive?

2004-06-19 Thread Mark K. Kim
On Sat, 19 Jun 2004, Paul wrote:

> I need to move my desktop from a (full) 10G drive to a (spare) 20G drive.
>
> The ideal results would be copy everything over, then run lilo on the
> new drive, then it would boot up looking just like the old one.

Nah... it doesn't work like that... unfortunately.

> Some googling found me an out of date HOWTO and a few sites with
> instructions that were a little vague, so I thought I would ask the experts.

It depends on the partition type.  As long as the HOWTO covers your
partition type (VFAT, EXT3, etc.), it should still be current.

> Has anybody done this?
>
> Is it easy - not to hard - increadibly difficult - don't even think
> about it?
>
> How do I do it - or better yet - a site with almost idiot proof
> instructions.

1. Assuming you still have the 10G hard drives on your computer, put the
20G in it.  Take off a CDROM drive if you don't have a spare connection or
space -- you'll be able to put it back in later.  Boot off of the 10G as
you normally do.

2. After boot, as root, make partitions on the 20G drive using `cfdisk`.
Format each partition using the proper program (mkfs.ext3 for EXT3, mkswap
for Linux swap partitions, mkfs.vfat for VFAT partitions, etc.)  Notes:

  - Make sure there's a tool to make the partition you need.  Some
partition making tools aren't available under Linux (like NTFS)

  - If you got Windows, especially a later version of Windows, upgarding
the partition gets a little complicated, especially with NTFS.  Post
again and tell us if you got Windows98SE or later.

  - When you make the partitions, some installations require you to label
each partition (/, /usr, /home, /usr/local, etc.) to get the
bootloaders to recognize them magically.  You should do that now if
your system requires it (You need it if you use Grub, or if your
/etc/lilo.conf and/or /etc/fstab uses labels instead of the /dev
device names.)  Use `cfdisk` to see what the labels are on your
10G, and make the same labels on your 20G.  Make sure you label
the partitions in the same order, so partition 1 on 10G has the
same label as partition 1 on the 20G, 2 on 10G has the same label
on 2 on 20G, etc.

3. Run `cp -a` to copy over all the files from the 10G to 20G, one
partition at a time.  Notes:

  - You MUST copy the corresponding partitions, so copy partition 1 on 10G
to partition 1 on 20G, partition 2 on 10G to partition 2 on 20G,
partition 3 on 10G to partition 3 on 20G, etc.  So when you plan out
cfdisk in step #3, you'll need to keep that in mind.

  - Don't overwrite the lost+found directory on each partition.  If you
write over one, delete it, and use `mklost+found` to create a new one.

  - While `cp -a * /destination` will copy over all the files in the
working directory and its subdirectories, it won't copy over the
hidden files.  So copy carefully.

4. Make a bootdisk using `mkboot` (no arguments).  Just in case, prepare a
bootable Linux CD, like Knoppix.

5. Turn off the computer.  Take the 10G out, and move to 20G to where the
10G was.  Reboot with the bootdisk or a bootable Linux CD.  If you boot
with a bootable Linux CD, after booting, run `chroot <20G's root
partition>`.

6. After you boot successfully, run `lilo`.  If you use Grub instead of
Lilo, run `grub-install` (I think.)

> What are the things that can go wrong?

Keep your 10G hard drive and don't write over it for about a month before
you do anything.  If you discover that something didn't copy over, you can
copy it over from the 10G drive.

-Mark

-- 
Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.jsp?id=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


[vox-tech] Cloning a drive?

2004-06-19 Thread Paul
I need to move my desktop from a (full) 10G drive to a (spare) 20G drive.
The ideal results would be copy everything over, then run lilo on the 
new drive, then it would boot up looking just like the old one.

Some googling found me an out of date HOWTO and a few sites with 
instructions that were a little vague, so I thought I would ask the experts.

Has anybody done this?
Is it easy - not to hard - increadibly difficult - don't even think 
about it?

How do I do it - or better yet - a site with almost idiot proof 
instructions.

What are the things that can go wrong?
Thanks, Paul
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech