Copying a Linux distro from one partition to the other...

Hola. Here is how my partition table looks:

Device Boot Start End Blocks Id System
/dev/hde1 1 1689 13566861 7 HPFS/NTFS
/dev/hde2 * 1690 2783 8787555 83 Linux
/dev/hde3 2784 2813 240975 82 Linux swap
/dev/hde4 2814 4111 10426185 5 Extended
/dev/hde5 2814 4065 10056658+ 83 Linux
/dev/hde6 4066 4111 369463+ 82 Linux swap

I have Debian on hde2 and LFS on hde5. I haven't used Debian for a long, long time now (I only needed it to build LFS), so I want to format hde2 and then copy my LFS partition onto it. Is this safe to do?

If yes, then will a simple `cp / /mnt/debian` suffice?

As long as your bootloader is on the MBR, then cp -r should do the trick. Remember to redo your config files!

Yes, most importantly /etc/fstab, bootloader config and root= for the kernel.

You could test it works before fully changing by doing 'chroot /dev/hd[whatever debian was]' and if it doesn't work tweak the config's until it does.

Cool, thanks for the info, guys. I was worried that certain software may have specific harddrive locations embedded in them, but maybe that is just one of the annoying quirks of Windows.

The bootloader is on the Debian partition (hde2). Windows doesn't want to put its bootloader anywhere else except the MBR, so I had to do it that way. I'm going to do what Tux said and chroot to do all the lilo stuff. Hopefully that works. Thanks again, guys. :slight_smile:

i would use cp -rp to preserve the rights on the files when you copy!

Install GRUB to the MBR and teach it to boot Windows.

I run RH9 and WinXP.... works for me. Don't be afraid to kill the windows bootloder.