17 steps to a bootable Linux clone

Post Reply
User avatar
pferland
Contributor
Contributor
Posts: 412
Joined: Mon Oct 22, 2007 8:38 am
Location: The Universe
Contact:

17 steps to a bootable Linux clone

Post by pferland » Tue Dec 28, 2010 5:44 am

1. Boot Live CD (I used OpenSuse 11)
2. mkdir /mnt/sda1 <-- mount points
3. mkdir /mnt/share <-- mount for network
4. mount /dev/sdb3 /tmp/sdb3
5. mount -t cifs -o username=USER,password=PASS //192.168.3.42/F /mnt/share
6. cd /mnt/sda1 <- go here to start copy
7. tar -pczf /mnt/share/backup.tar.gz . <- copy relative to this

8. Shutdown
9. Put in new hdd and restart Live CD
10. Run fdisk to create partition:
fdisk /dev/sda
n then p then 1 <- create a new primary partition
a <-- need the hdd to have the bootable flag
w <-- save and quit
11. mkfs.ext3 /dev/sda1 <-- make file system, format it
12. Extract tar to folder on share
13. cd *tar extracted folder*
14. cp -a * /mnt/sda1
15. Make sure /mnt/sda1/boot is populated, if not recopy the folder from the network share

16. Now setup grub and the menu.lst file so you can boot the new partition.

grub
grub> find /boot/grub/stage1 <-- find all Linux partitions
grub> root (hd1,2) <-- select the partition that has
/boot/grub/menu.lst
grub> setup (hd0) <-- drive that boots – usually hd0
grub> quit


17. Edit /boot/grub/menu.lst
grub may not have detected the correct /dev name for your hdd.
Go find the line that looks similar to this
kernel /boot/vmlinuz-2.6.21.1 root=/dev/device/detect-id/HD_NAME / ro quiet splash
Change (root=/dev/device/...) to (root=/dev/sda1) or what ever your hdd dev name is

You should now be bootable!


Modified from: http://ubuntuforums.org/showthread.php?t=470623
The best acceleration you can get on a Mac is 9.8ms^2

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest