Replacing Linux root partition HD: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
New page: 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 ...
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Moving a new HD into a Linux system and keeping the old 'system'
<pre>Moving a new HD into a Linux system and keeping the old 'system'


cd /
cd /
Line 9: Line 9:
mkdir /proc on new HD
mkdir /proc on new HD
mkswap /dev/hdaY
mkswap /dev/hdaY
To get the master boot record activated on the hdaX you do:
reboot using Linux CD
reboot using Linux CD
at CD prompt type
at CD prompt type
Line 18: Line 21:
reboot
reboot
And you should be done!
And you should be done!
</pre>

Latest revision as of 11:29, 3 January 2008

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

To get the master boot record activated on the hdaX you do:

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!