|
From: Allasso Travesser on 13 Feb 2005 23:30 Hello, I would like to clone my Debian Woody system onto a second larger hard disk. It seems to me that it would just be a matter of cleaning off the second disk, partioning using fdisk, and then running: dd if=/dev/hdc of=/dev/hda where hdc is the drive from which I am copying my current system, and hda is the drive I want to put this system on. current hdc partition table (2 Gb disk): Device Boot Start End Blocks Id System /dev/hdc1 1 13 52384+ 83 Linux /dev/hdc2 14 449 1757952 83 Linux /dev/hdc3 450 523 298368 82 Linux swap How I plan to partition hda (30 Gb disk): Device Boot Start End Blocks Id System /dev/hda1 1 13 52384 83 Linux /dev/hda2 14 3704 29647957+ 83 Linux /dev/hda3 3705 523 298368 82 Linux swap Can anyone see anything wrong with this, or would you tell me anything I should watch out for? Anything I should find out about my current system first? It seems that this could be fatal if it is not done right. Thank you, Allasso -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Blake Swadling on 13 Feb 2005 23:50 On Sun, 2005-02-13 at 21:12 -0700, Allasso Travesser wrote: > Hello, > > I would like to clone my Debian Woody system onto a second larger hard disk. > It seems to me that it would just be a matter of cleaning off the second > disk, partioning using fdisk, and then running: > > dd if=/dev/hdc of=/dev/hda > > where hdc is the drive from which I am copying my current system, and hda is > the drive I want to put this system on. > > current hdc partition table (2 Gb disk): > > Device Boot Start End Blocks Id System > /dev/hdc1 1 13 52384+ 83 Linux > /dev/hdc2 14 449 1757952 83 Linux > /dev/hdc3 450 523 298368 82 Linux swap > > How I plan to partition hda (30 Gb disk): > > Device Boot Start End Blocks Id System > /dev/hda1 1 13 52384 83 Linux > /dev/hda2 14 3704 29647957+ 83 Linux > /dev/hda3 3705 523 298368 82 Linux swap > > Can anyone see anything wrong with this, or would you tell me anything I > should watch out for? Anything I should find out about my current system > first? It seems that this could be fatal if it is not done right. > > Thank you, Allasso We routinely clone hard drives by doing a simple cp. make the filesystem, cp the files, then reinstall the bootloader I have attached an older script that has lilo stuff in it (I can't post the newer ones). We tend to do the chroot and lilo bit manually as we feel safer that way. works very nicely every time Cheers Blake ----------------------------- clone.sh -------------------------------- !/bin/bash mke2fs -j -L /boot /dev/hdc1 mke2fs -j -L / /dev/hdc2 mke2fs -j -L /home /dev/hdc4 mkswap -f /dev/hdc3 mount -t ext3 /dev/hdc2 /mnt/clone cp -axv / /mnt/clone mount -t ext3 /dev/hdc1 /mnt/clone/boot cp -axv /boot /mnt/clone mount -t ext3 /dev/hdc4 /mnt/clone/home cp -axv /home /mnt/clone cd /mnt/clone #chroot . #sbin/lilo -C /etc/lilo.conf.hdc #exit ----------------------------------------------------------------------- -- Blake Swadling <blake(a)swadling.com> Swadling.com -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: RituRaj on 14 Feb 2005 00:20 Hi; I have some problem regarding installing Redhat ES(3.0) on prolient server DL380 it is not detecting scsi controller. In that case can i install Linux on IDE and then upgrade the kernel(which will detect the scsi) and then copy the data from IDE to SCSI? Will the procedure of copy (script descibed below) work for IDE to SCSI ? or any additional steps needed? I am really sorry for posting this here but i am a Debian user ..only due to customer insistence i have to install RHL and i know i will get more sensible answers to my technical questions here than on Redhat. Thanks and Regards; Rituraj --- Blake Swadling <blake(a)swadling.com> wrote: > On Sun, 2005-02-13 at 21:12 -0700, Allasso Travesser > wrote: > > Hello, > > > > I would like to clone my Debian Woody system onto > a second larger hard disk. > > It seems to me that it would just be a matter of > cleaning off the second > > disk, partioning using fdisk, and then running: > > > > dd if=/dev/hdc of=/dev/hda > > > > where hdc is the drive from which I am copying my > current system, and hda is > > the drive I want to put this system on. > > > > current hdc partition table (2 Gb disk): > > > > Device Boot Start End Blocks Id System > > /dev/hdc1 1 13 52384+ 83 Linux > > /dev/hdc2 14 449 > 1757952 83 Linux > > /dev/hdc3 450 523 > 298368 82 Linux swap > > > > How I plan to partition hda (30 Gb disk): > > > > Device Boot Start End Blocks Id System > > /dev/hda1 1 13 52384 83 Linux > > /dev/hda2 14 3704 > 29647957+ 83 Linux > > /dev/hda3 3705 523 > 298368 82 Linux swap > > > > Can anyone see anything wrong with this, or would > you tell me anything I > > should watch out for? Anything I should find out > about my current system > > first? It seems that this could be fatal if it is > not done right. > > > > Thank you, Allasso > > We routinely clone hard drives by doing a simple cp. > > make the filesystem, cp the files, then reinstall > the bootloader > > I have attached an older script that has lilo stuff > in it (I can't post > the newer ones). We tend to do the chroot and lilo > bit manually as we > feel safer that way. > > works very nicely every time > > Cheers > Blake > > ----------------------------- clone.sh > -------------------------------- > !/bin/bash > mke2fs -j -L /boot /dev/hdc1 > mke2fs -j -L / /dev/hdc2 > mke2fs -j -L /home /dev/hdc4 > mkswap -f /dev/hdc3 > mount -t ext3 /dev/hdc2 /mnt/clone > cp -axv / /mnt/clone > mount -t ext3 /dev/hdc1 /mnt/clone/boot > cp -axv /boot /mnt/clone > mount -t ext3 /dev/hdc4 /mnt/clone/home > cp -axv /home /mnt/clone > cd /mnt/clone > #chroot . > #sbin/lilo -C /etc/lilo.conf.hdc > #exit > ----------------------------------------------------------------------- > > -- > Blake Swadling <blake(a)swadling.com> > Swadling.com > > > -- > To UNSUBSCRIBE, email to > debian-user-REQUEST(a)lists.debian.org > with a subject of "unsubscribe". Trouble? Contact > listmaster(a)lists.debian.org > > __________________________________ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Blake Swadling on 14 Feb 2005 00:40 On Sun, 2005-02-13 at 21:13 -0800, RituRaj wrote: > Hi; > > I have some problem regarding installing Redhat > ES(3.0) on prolient server DL380 it is not detecting > scsi controller. In that case can i install Linux on > IDE and then upgrade the kernel(which will detect the > scsi) and then copy the data from IDE to SCSI? > > Will the procedure of copy (script descibed below) > work for IDE to SCSI ? or any additional steps > needed? > I cant say that I have done the IDE to scsi clone but I can see no reason why it wont work. By all means if someone else knows of an obstacle please step in here. > I am really sorry for posting this here but i am a > Debian user ..only due to customer insistence i have > to install RHL and i know i will get more sensible > answers to my technical questions here than on > Redhat. No problems for me witht he RH thing. I am the only Debian user in the office here. All other machines are various flavours of RH from 7.3 to FC2 and I have used this script to clone Linux in all shapes and sizes. The only problems I have had have been related to getting the boot-loader to behave itself. Best of luck Blake -- Blake Swadling <blake(a)swadling.com> Swadling.com
From: Andreas Rippl on 14 Feb 2005 09:10
On Sun, Feb 13, 2005 at 09:12:35PM -0700, Allasso Travesser wrote: > Hello, > > I would like to clone my Debian Woody system onto a second larger hard disk. > It seems to me that it would just be a matter of cleaning off the second > disk, partioning using fdisk, and then running: > > dd if=/dev/hdc of=/dev/hda > > where hdc is the drive from which I am copying my current system, and hda is > the drive I want to put this system on. > > current hdc partition table (2 Gb disk): > > Device Boot Start End Blocks Id System > /dev/hdc1 1 13 52384+ 83 Linux > /dev/hdc2 14 449 1757952 83 Linux > /dev/hdc3 450 523 298368 82 Linux swap > > How I plan to partition hda (30 Gb disk): > > Device Boot Start End Blocks Id System > /dev/hda1 1 13 52384 83 Linux > /dev/hda2 14 3704 29647957+ 83 Linux > /dev/hda3 3705 523 298368 82 Linux swap > > Can anyone see anything wrong with this, or would you tell me anything I > should watch out for? Anything I should find out about my current system > first? It seems that this could be fatal if it is not done right. > > Thank you, Allasso > Hi Allasso, I was in a similar situation (not for cloning but in order to make backups), and I chose another approach which also should work for you. First, you 'init 1' to go to single user mode, a thing which I don't bother with for my backups, and then I do an rsync of all the partitions I need to backup. I also went through this procedure in order to clone a system, so it _does_ work. Just make sure to use 'rsync -ax' ('a' for archive and 'x' to stay within the current file system. Now to the reasons why I chose rsync over dd for this method. First it allows for an easy re-run (only needed for backup purposes), but more importantly, you don't have to care about partition sizes, e.g. what happens if you dd your hdc2 to hda2? I remember doing a dd for cloning and running into problems because of this. Anyway, just my 0.02 Euro Andreas -- Andreas Rippl -- I prefer encrypted mail |