Copying System
I've installed a copy of LFS on one of my hard disks partitions. I'd like to make a complete copy of the system to another partition and have done so with the 'cp -axv' command.
However when I reboot into the 'copied' system it halts halfway through booting complaining it is 'unable to open a console'. Can anyone help me with this? Thanks, Harry |
in general, you cannot copy a whole system using cp or similat commands. For starters, the boot process will not work because the boot loader will not know where to find the startup files. Depending on the configuration, there may also be code in the partition boot sector which does not get copied using cp.
What is on the system besides LFS? What is the boot loader--eg GRUB, LILO, etc.? |
Grub is installed on the MBR. Theres is a copy of GeeXboX and OpenSUSE 10 also on the system and all the kernels are installed into a seperate /boot partition of the hard drive.
I've altered menu.lst to add the relavent changes to include the 'copyed' system and altered the 'root' to point at the new system. |
HMMM...
I'm assuming that the system works with strange things like all the kernels in a common /boot partition. (I can't quite picture how GRUB boots into "/boot" and then the system knows which "/" to go to.) When you say that you altered 'root' to point at the copied system, how does that relate to the statement that all the kernels are in one /boot? To go further, we should also see the output of "fdisk -l" and the contents of the grub config file: /boot/grub/menu.lst Alternatively, how about doing all this in more conventional ways---eg make a new partition and install the OS to it. |
Quote:
eg: Quote:
|
This is how the entries in menu.lst are set out:
title LFS root (hd0,0) kernel /lfskernel-2.6.11.12 root=/dev/sda5 title LFS Copy root (hd0,0) kernel /lfskernel-2.6.11.12 root=/dev/sda6 The kernels boot out of sda1, ie; root (hd0,0) in Grub and are mounted as /boot, and the filesystems in sda's5 & 6 are then mounted as /. |
Quote:
|
OK--I am maybe in over my head.
to research further, what happens if you clone the partition instead of just copying all the files? but I also still question why you dont just make a new partition and install rather than try to copy. |
I want to keep the original system as it is - and use the copy as a testing system, but don't really want to have to compile all the packages again a second time just to do so.
|
It could be, you should check that everything in /dev/is ok & has the correct permissions.
An easier wat to copy the system is to do it from a liveCD because of pseudo file systems, /dev is one that has pseudo files and ones written to the HDD Eg, I use hda3 for bleeding edge testing, but when nothing is mounted in it there are still files in /dev. Code:
ls /mnt/hda3/dev [EDIT]You could use dd to copy the whole partition[/EDIT] |
Quote:
|
All times are GMT -5. The time now is 06:09 AM. |