- How to migrate to new disk?
- Posted by Yvan@office on December 5th, 2003
I have RH 8 installation on *one partition* on disk 1. It was suppose to
be a test installation, but now that all is configured, I would like to
move it to another HDD.
I partitioned new HDD as I wanted, and now I am wondering how to copy
entire installation on it.
I Googled for a while and I believe that I found a solution:
After "formating" partitions:
# mke2fs -j /dev/hdfx
I am suppose to:
# shutdown now
and mount /dev/hdfx /mnt/new/x
then:
# cd /var
find . -xdev | cpio -admpv /mnt/new/6
Now that way I can copy /home, /usr and /var. What do I do with / ?
I also need to edit /mnt/new/1/etc/fstab and configure grub.
--
___ ____
/__/ / \ ** Registrovani korisnik Linuksa #291606 **
/ / \/ /\ \ ** http://counter.li.org/ **
/__/\____/--\__\ ** Reply at: ivica - at - ptt - dot - yu **
- Posted by John-Paul Stewart on December 5th, 2003
"Yvan@office" wrote:
There's no need to shutdown right now, AFAIK.
Same thing for /. Just be sure to exclude /home, /usr, and /var when
copying it.
Yep. That's fairly straightforward to, although I use LILO rather than
Grub.
Have you read the "Hard Disk Upgrade HOWTO" from the Linux Documentation
Project? It should cover everything you need to know.
http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/index.html
- Posted by Robert Heller on December 6th, 2003
Yvan@office <nevazeca-invalid@address-a.com>,
In a message on Fri, 5 Dec 2003 14:16:32 +0100, wrote :
Y> I have RH 8 installation on *one partition* on disk 1. It was suppose to
Y> be a test installation, but now that all is configured, I would like to
Y> move it to another HDD.
Y>
Y> I partitioned new HDD as I wanted, and now I am wondering how to copy
Y> entire installation on it.
Y>
Y> I Googled for a while and I believe that I found a solution:
Y>
Y> After "formating" partitions:
Y>
Y> # mke2fs -j /dev/hdfx
Y>
Y> I am suppose to:
Y>
Y> # shutdown now
Y>
Y> and mount /dev/hdfx /mnt/new/x
Y>
Y> then:
Y>
Y> # cd /var
Y> find . -xdev | cpio -admpv /mnt/new/6
Y>
Y> Now that way I can copy /home, /usr and /var. What do I do with / ?
*I* would not use cpio, but would use dump & restore. Dump & restore
copies by file system and will only copy one file system at a time and
won't 'wander off' the selected file system.
You would do:
mount /dev/hdfx /mnt/new/
where '/dev/hdfx' is the new root (/) file system, then:
dump -0f - / | (cd /mnt/new/; restore -rf -)
When this finishes, you would do:
mount /dev/hdfy /mnt/new/var
where /dev/hdfy is the /var file system (if /var is not a separate file
system skip this step)
dump -0f - /var | (cd /mnt/new/var; restore -rf -)
repeat for /usr, /home, etc.
Y>
Y> I also need to edit /mnt/new/1/etc/fstab and configure grub.
Right.
Y>
Y>
Y>
Y> --
Y> ___ ____
Y> /__/ / \ ** Registrovani korisnik Linuksa #291606 **
Y> / / \/ /\ \ ** http://counter.li.org/ **
Y> /__/\____/--\__\ ** Reply at: ivica - at - ptt - dot - yu **
Y>
\/
Robert Heller ||InterNet: heller@cs.umass.edu
http://vis-www.cs.umass.edu/~heller || heller@deepsoft.com
http://www.deepsoft.com /\FidoNet: 1:321/153
- Posted by Ed Murphy on December 6th, 2003
On Fri, 05 Dec 2003 10:27:39 -0500, John-Paul Stewart wrote:
Unfortunately, -xdev won't do the exclusion:
This will do it. (This should be all one line; watch out for word
wrap.) Replace FOO with an appropriate cpio command.
find . -path '/home' -prune -o -path '/usr' -prune -o -path '/var' -prune -o -print | FOO
- Posted by Yvan on December 9th, 2003
Nedavno Ed Murphy pise:
I did that, then changed /etc/fstab to match new partition setup on new
disk and configured grub. But after reboot:
VFS Mounted root (ext2 filesystem).
Red Hat nash version 3.4.28 starting
Loading jbd module
Journalled Block Device driver loaded Loading ext3 module
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
EXT3-fs: unable to read superblock
mount: error 22 mounting ext3
pivot root: pivot_root(sysroot,/sysroot/initrd) failed:2 umount
/initrd/proc failed:2
Kernel panic: No init found. Try passing init=option to kernel.
.... and CapsLock and ScrollLock led's start flashing :-(
I checked /dev/hdg1 with e2fsck and it's OK.
What's wrong?
--
___ ____
/__/ / \ ** Registrovani korisnik Linuksa #291606 **
/ / \/ /\ \ ** http://counter.li.org/ **
/__/\____/--\__\ ** Reply at: ivica - at - ptt - dot - yu **
- Posted by Yvan@office on December 11th, 2003
???????
--
___ ____
/__/ / \ ** Registrovani korisnik Linuksa #291606 **
/ / \/ /\ \ ** http://counter.li.org/ **
/__/\____/--\__\ ** Reply at: ivica - at - ptt - dot - yu **