[SLE] moving my current installation
I have a fully up to date v9.3 system on a 40Gb harddrive. I want to transfer this installation to a new 160Gb harddrive. I want to remove the old 40Gb and trash it. (It's several years old an I want to change it before it fails). Question is how do I transfer the system over including grub etc. Phil -- Phil Burness Linux User since 1991 - currently using SuSE 9.3 Warrington - United Kingdom -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Phil Burness wrote:
I have a fully up to date v9.3 system on a 40Gb harddrive. I want to transfer this installation to a new 160Gb harddrive. I want to remove the old 40Gb and trash it. (It's several years old an I want to change it before it fails). Question is how do I transfer the system over including grub etc.
Phil
You can use a utility such as parted or partimage. It's best to use one of those system recue CDs, rather than working from a live system.
Phil Burness wrote:
I have a fully up to date v9.3 system on a 40Gb harddrive. I want to transfer this installation to a new 160Gb harddrive. I want to remove the old 40Gb and trash it. (It's several years old an I want to change it before it fails). Question is how do I transfer the system over including grub etc.
Install new harddrive in existing system e.g. as hdb. Then boot up rescue system or knoppix, mount filesystem(s) from olddisk and newdisk, and rsync -avL <olddisk> to <newdisk>. (double check those rsync parms before you hit enter). Remove old drive, run rescue/knoppix and reinstall grub. /Per Jessen, Zürich -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Am Donnerstag, 29. Juni 2006 17:41 schrieb Phil Burness:
I have a fully up to date v9.3 system on a 40Gb harddrive. I want to transfer this installation to a new 160Gb harddrive. I want to remove the old 40Gb and trash it. (It's several years old an I want to change it before it fails). Question is how do I transfer the system over including grub etc.
Phil -- Phil Burness Linux User since 1991 - currently using SuSE 9.3 Warrington - United Kingdom
There has been a (german) instruction manual once (2005) on the novell page, but I can't find it anymore online. However, I have a copy saved, so I try to translate from there: The given example assumes: - you have an old disk /dev/hda (1. IDE-HD) and - a new SCSI-disk /dev/sda (1. HD on SCSI-Bus) - root partition is /dev/hda5 (1. logical drive in the extended partition) - the new root partition shall be /dev/sda1 - the new disk is already formated and the file system is installed on it Boot with the resue system CD, log in and make two Mountpoints: mkdir /OLD mkdir /NEW Mount both partitions: mount /dev/hda5 /OLD mount /dev/sda1 /NEW check, if * /dev/hda5 really is the correctt root-partition * /dev/sda1 is empty change to the /OLD-directory: cd /OLD enter the following tar-command: tar -cSp --numeric-owner --atime-preserve -f - . | ( cd /NEW && tar -xSpv --atime-preserve -f - ) With this command all files should be brought from /OLD to /NEW and links and rights should stay preserved. Make sure to type the command with all spaces, e.g. before and after the dot, after the opening parenthesis, before the closing parenthesis. adjust some important files to the new root partition: * edit /NEW/etc/fstab according to the new situation, e.g.: old entry: /dev/hda5 / ext2 defaults 1 1 new entry: /dev/sda1 / ext2 defaults 1 1 * eventually also adjust /NEW/etc/lilo.conf . You can only start LILO after booting with the new partition. Change to the root directory and umount both partitions: cd / umount /OLD umount /NEW Reboot using CD1 or the Suse DVD and start the rescue system, from there start the "installed system" with entering the new root-partition (here: /dev/sda1 ) After the boot open Yast -> configure the boot menu, change the "Linux"-entry to the new root partition. The instruction sais, that Yast wants you to rename the entry (say from "Linux" to "Suse" or whatever) - but I don't know, if this is still true. Now you should be able to boot from the new drive. If you use LILO you have to adjust /etc/lilo.conf and restart LILO ------- As mentioned, this is old information. But I've used it to move my Suse 10.0 install from one disk to another and it worked (partition names, files system and fstab entries adapted, of course). Eventually better wait if somebody on the list shouts "stop, this doesn't work anymore!" before you go on with these instructions ;-) regards Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com special interest site: http://www.bauer-nudes.com -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Am Donnerstag, 29. Juni 2006 17:41 schrieb Phil Burness:
I have a fully up to date v9.3 system on a 40Gb harddrive. I want to transfer this installation to a new 160Gb harddrive. I want to remove the old 40Gb and trash it. (It's several years old an I want to change it before it fails). Question is how do I transfer the system over including grub etc.
Phil -- Phil Burness Linux User since 1991 - currently using SuSE 9.3 Warrington - United Kingdom
There has been a (german) instruction manual once (2005) on the novell page, but I can't find it anymore online. However, I have a copy saved, so I try to translate from there:
The given example assumes: - you have an old disk /dev/hda (1. IDE-HD) and - a new SCSI-disk /dev/sda (1. HD on SCSI-Bus) - root partition is /dev/hda5 (1. logical drive in the extended partition) - the new root partition shall be /dev/sda1 - the new disk is already formated and the file system is installed on it
Boot with the resue system CD, log in and make two Mountpoints:
mkdir /OLD mkdir /NEW
Mount both partitions:
mount /dev/hda5 /OLD mount /dev/sda1 /NEW
check, if
* /dev/hda5 really is the correctt root-partition * /dev/sda1 is empty
change to the /OLD-directory:
cd /OLD
enter the following tar-command:
tar -cSp --numeric-owner --atime-preserve -f - . | ( cd /NEW && tar -xSpv --atime-preserve -f - )
With this command all files should be brought from /OLD to /NEW and links and rights should stay preserved. Make sure to type the command with all spaces, e.g. before and after the dot, after the opening parenthesis, before the closing parenthesis.
adjust some important files to the new root partition:
* edit /NEW/etc/fstab according to the new situation, e.g.:
old entry: /dev/hda5 / ext2 defaults 1 1
new entry: /dev/sda1 / ext2 defaults 1 1
* eventually also adjust /NEW/etc/lilo.conf . You can only start LILO after booting with the new partition.
Change to the root directory and umount both partitions:
cd / umount /OLD umount /NEW
Reboot using CD1 or the Suse DVD and start the rescue system, from there start the "installed system" with entering the new root-partition (here: /dev/sda1 )
After the boot open Yast -> configure the boot menu, change the "Linux"-entry to the new root partition. The instruction sais, that Yast wants you to rename the entry (say from "Linux" to "Suse" or whatever) - but I don't know, if this is still true.
Now you should be able to boot from the new drive.
If you use LILO you have to adjust /etc/lilo.conf and restart LILO
-------
As mentioned, this is old information. But I've used it to move my Suse 10.0 install from one disk to another and it worked (partition names, files system and fstab entries adapted, of course).
Eventually better wait if somebody on the list shouts "stop, this doesn't work anymore!" before you go on with these instructions ;-)
regards
Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com special interest site: http://www.bauer-nudes.com This is why this list is so great - not only do I get the answer I want, but
On Thursday 29 June 2006 19:03, Daniel Bauer wrote: people even take the trouble to translate it for me - Fantastic and thanks. I have followed the instructions but the tar command exited due to errors.. It seems I have some files in /var/lib/scrollkeeper/TOC that root does not have permissions for (??) tar gave permissions denied message. (same for some .h files in /usr/src/linux/include/asm-arm) Also, there seems to be some files in /usr/src/linux/include that tar compained 'couldn't stat' before exiting. How do I get rid of the files in TOC or change their permissions? What is the 'couldn't stat message and how do I eliminate it? -- Phil Burness Linux User since 1991 - currently using SuSE 9.3 Warrington - United Kingdom -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Oops! Did a reply instead of reply-all. Resending... Phil Burness wrote:
I have a fully up to date v9.3 system on a 40Gb harddrive. I want to transfer this installation to a new 160Gb harddrive. I want to remove the old 40Gb and trash it. (It's several years old an I want to change it before it fails). Question is how do I transfer the system over including grub etc.
Phil
Hello Phil, First create partitions on the new hard drive, and copy the files from the current hard drive to the corresponding partitions on the new one. Next, chroot to the would-be root partition on the new drive. Then install grub in the following manner: (assume your new hdd is /dev/hdb) # grub-install /dev/hdb if grub is installed on the MBR or # grub-install /dev/hdb<x> if grub is installed in the boot sector of boot partition (/ if you have no boot partition) (hdb<x>) Stay in the chrooted shell. Edit /etc/fstab (new hdd) to change entries that refer to the partitions on the original drive to the new ones. Once that is done, edit /boot/grub/grub.conf (may be called menu.lst). Create a new entry in the file for the new hdd. Refer to the current entries and change the drive. Remember that grub counts partitions from 0, while (u)dev counts them from 1. (This step is to ensure that you can boot from the old drive if something goes wrong, without having to change the boot order in BIOS.) I've tried something like this before, and it didn't work! However, I believe the reason was that the kernel did not have reiserfs support compiled in, and could not use a reiserfs root file system. If this does not work, you can try autoyast to replicate your installation on the new drive, and then copy the /home partition. -- Regards, Aveek Bhattacharya M.Tech., Electrical Engineering, IIT Bombay -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
participants (5)
-
Aveek Bhattacharya
-
Daniel Bauer
-
James Knott
-
Per Jessen
-
Phil Burness