On Sat, May 08, 2004 at 06:36:06PM +1000, Russell Davie wrote: > Hi > I want to move the Linux partition in hda9 to hda1. > Yes, after too much procrastination, Linux is been promoted from ext. > partiton to replace the other OS! > how can this be done with out trashing the system? > I plan to copy on to another hdisk as well, though not yet installed. > regards > Russell
There are two ways to do it that have worked for me. One way is to turn hda1 into an ext2 (or ext3) partition with cfdisk and mke2fs (and perhaps tunefs -j to make it ext3), then copy in the whole filesystem from hda9 (not including /proc, or better yet do it when it's not running, like from knoppix or a rescue disk) with cp -a /mnt-hda1/* /mnt-hda2/ or similar. The other way is to dd if=/dev/hda9 of=/dev/hda1 (from a rescue disk), to make a bit for bit copy of the partition. Another way to do this would be to image /dev/hda1 with partimage or similar and restore to /dev/hda9. (dd can be really slow, but IIRC you can find out how it's going by sending kill -1 `pidof dd` or something like that). But whatever you do you have to modify /etc/lilo.conf and /etc/fstab on the new partition. Modifying the files is easy, you just mount the new filesystem. Then you have to run lilo on the new partition. You can do this with chroot from the existing installation. It's something like chroot /mnt-hda1 /sbin/lilo or you can boot from a rescue disk. I'm no expert, so expect some corrections :-) Depending on your boot manager setup it might be different for example. Patrick Lesslie -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
