Replacing Linux root partition HD

From Edgar BV Wiki
Revision as of 13:20, 2 March 2007 by Red (talk | contribs)
Jump to navigation Jump to search
Moving a new HD into a Linux system and keeping the old 'system'

cd /
tar cvzf root.tar.gz all directories EXCEPT /proc and other symbolically linked mountpoints
fdisk and mke2fs the new harddisk
mount new harddisk
copy root.tar.gz to new HD
untar on new HD
mkdir /proc on new HD
mkswap /dev/hdaY
reboot using Linux CD
at CD prompt type
linux root = /dev/hdaX
then continue
mount /dev/hdaX /target
cd target
lilo
reboot
And you should be done!