Quote:
Originally posted by coopedw
Would it be possible to "migrate" my existing linux install from it's partition on my original hard drive to the new one, removing it from that partition and let windows have that extra 20g, while keeping my Linux set up how it is and located on the new hard drive?
basically, can I just move it over to the new hard drive? I really don't want to have to reinstall and get it all setup how I like it again. Or, would it be better to leave everything the way it is and just use the new hard drive to store files from both OS's? Is this possible? If anyone has any experience with this or some better ideas, or if you can see some giant snafu i'm about to hit (boot loader?), please let me know. I'm no expert at all this, so any help would be appreciated.
|
That all depends on if:
1) You want to use the 40GB to store data for both O/Ses.
If so, I would divide it with a swap as the first partition and a storage partition (vfat) for the rest of the drive. Then simply add the swap and storage partitions in your fstab and mount.
2) You want to duplicate your mandrake o/s to your 40GB hard drive.
a) You will need to first install the 40GB hard drive and correctly set your jumpers for both 60GB (master) and 40GB (slave) and boot into 9.1.
b) Partition and format the 40GB following the same format and filesystem as on the 60GB (mandrake's partitions only). You can create bigger sized partitions (BUT you can't decrease, must be equal or greater than).
Example: if hda5 is / reiserfs, hda6 is swap, hda7 is /usr resierfs and hda8 is /home ext3, then on the 40GB, make hdb1 reiserfs, hdb5 swap, hdb6 reiserfs and hdb7 ext3.
Make sure that the partition table is written to the 40GB hard drive and formatted to the filesystem you are using!
c) Unmount any windoze partitions.
d) Go to a terminal (Ctrl+Alt+F1)
e) Login as root
f) Make new mount points for your 40GB (following example is from the above partitiong scheme example; just modify to your specs)
Code:
cd /
mkdir /new-disk
mount -t reiserfs /dev/hdb1 /new-disk
mkdir /new-disk/usr
mount -t reiserfs /dev/hdb6 /new-disk/usr
mkdir /new-disk/home
mount -t ext3 /dev/hdb7 /new-disk/home
You do not need the make a directory for, nor mount swap.
g)
Code:
chmod 1777 /new-disk/tmp
h)
i) Check for the directories that will be copied to the 40GB by entering ls
It should print out /bin /dev /etc /home /initrd /lib /mnt /opt /root /sbin /tmp /usr /var + other mount points you may have added. /proc does not need to copied.
j) Now you should be at a single user prompt
Code:
cp -a /bin /boot /dev /etc /home /initrd /lib /mnt /opt /root /sbin /tmp /usr /var /new-disk
(If there are any mount points you have added that you want to copy, insert the directory before /new-disk . You will get an I/O error for your cdroms and floppy drives, but don't worry about that. Just make sure they don't have any disks in them when you copy over your files to the 40GB.)
k)
Code:
cp -dp /* /.* /new-disk
l)
Code:
mkdir /new-disk/proc
m) To check if the copied files match the original:
Code:
find / -path /proc -prune -o -path /new-disk -prune -o -xtype f -exec cmp {} /new-disk{} \;
n) Edit 40GB fstab
Again, by going by the above example, you need to edit fstab on the 40GB.
Code:
vi /new-disk/etc/fstab
Enter
i to insert (edit)
Example:
(Original fstab; you should have to edit your windoze nor cdroms/floppy)
/dev/hda5 / reiserfs notail 1 1
/dev/hda6 swap swap defaults 0 0
/dev/hda7 /usr reiserfs notail 1 2
/dev/hda8 /home ext3 notail 1 2
(Edited fstab)
/dev/hd
b1 / reiserfs notail 1 1
/dev/hd
b5 swap swap defaults 0 0
/dev/hd
b6 /usr reiserfs notail 1 2
/dev/hd
b7 /home ext2 notail 1 2
After you're done hit the
ESC key and enter
:,
w,
q
o) Edit 40GB lilo.conf
Code:
vi /new-disk/etc/lilo.conf
Enter
i to insert (edit)
Example:
(original lilo.conf)
...
image=/boot/vmlinuz...
label="..."
root=/dev/hda5
initrd=/boot/initrd...
...
(Editied lilo.conf)
...
image=boot/vmlinuz...
label="..."
root=/dev/hd
b1
initrd=/boot/initrd...
(Do this for failsafe too)
After you're done hit the
ESC key and enter
:,
w,
q
p)
Code:
/new-disk/sbin/lilo
q)
r) Since lilo is probably on the MBR, you will have to edit the original lilo.conf so the 40GB will boot (see o) )
s)
t)
u) Disconnect the 40GB hard drive and delete your mandrake partitions on the 60GB.
v) Reconnect the 40GB and for the 20GB of unsed partition on the 60GB, use partition magic to resize and reclaim for XP.