copy_linux_to_a_new_harddisk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
copy_linux_to_a_new_harddisk [24.02.2012 15:00]
Pascal Suter
copy_linux_to_a_new_harddisk [06.06.2014 10:54] (current)
Pascal Suter
Line 18: Line 18:
   * chroot to the target drive and install grub: <code>   * chroot to the target drive and install grub: <code>
 mount --bind /dev/ /tmp/target/dev mount --bind /dev/ /tmp/target/dev
 +mount --bind /sys/ /tmp/target/sys
 +mount --bind /proc/ /tmp/target/proc
 chroot /tmp/target chroot /tmp/target
 grub-install /dev/sdb grub-install /dev/sdb
 +update-grub
 grub grub
 find /boot/grub/menulst</code>(if you have an own partiton for boot, you can leave boot away in the above command) <code> find /boot/grub/menulst</code>(if you have an own partiton for boot, you can leave boot away in the above command) <code>
Line 25: Line 28:
 setup (hd0) setup (hd0)
 </code> </code>
 +  * if you are moving your installation to new hardware (other than just the harddisk) you might need to update your initrd image to contain the necessary drivers (i.e. in redhat based systems). run ''dracut''
   * reboot your system   * reboot your system
  • copy_linux_to_a_new_harddisk.1330092032.txt.gz
  • Last modified: 24.02.2012 15:00
  • by Pascal Suter