LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 06-30-2005, 04:02 PM   #1
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Rep: Reputation: 31
Move Mandriva to another drive


How can I move Mandriva to the free space on another drive? I had a hell of time getting it installed just right and don't want to reinstall. Thanks.
 
Old 06-30-2005, 05:14 PM   #2
ctkroeker
Senior Member
 
Registered: May 2005
Posts: 1,565
Blog Entries: 1

Rep: Reputation: 50
Copy, Paste.
Make sure hidden files are also copied.
 
Old 06-30-2005, 06:16 PM   #3
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Original Poster
Rep: Reputation: 31
Copy and Paste??? I may need more info than that. Thanks for the reply however.
 
Old 06-30-2005, 06:30 PM   #4
ctkroeker
Senior Member
 
Registered: May 2005
Posts: 1,565
Blog Entries: 1

Rep: Reputation: 50
Sorry that that was not sufficient information. What I mean is (and do not blame me if his fails):
1)- make all all hidden system files visible.
2)- select all the folders on the main drive where you OS is. (Click+shift)
3)- right click.
4)- click copy.
5)- paste them on a different partitio.

No gaurantees.
 
Old 06-30-2005, 07:16 PM   #5
Moloko
Member
 
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
1. Boot into read-only mode
2. Mount the partition to copy the data to
i.e. mount -t ext3 /dev/hdb5 /mnt
3. make sure you are in the root filesystem
4. Issue:
find . -xdev | cpio -pm /mnt

This will copy everything, including symlinks and the lot. Repeat this for other system critical partitions, if you have a seperate partition for /var for example.

You can also boot from a LiveCd, such as Knoppix and copy from one mountpoint to another.
 
Old 07-01-2005, 12:17 PM   #6
cokelid
LQ Newbie
 
Registered: Jun 2005
Distribution: Mandriva LE 2005
Posts: 4

Rep: Reputation: 0
Copy to a new (blank disc), partitions and all

If you want to copy your current disc (partitions and all) to a whole new disc (rather than add it to some existing data) you can do the following. I did this when my system disc became unstable so I bought a new (and bigger) disc and made a copy. Install both discs and follow the instructions below:

If you're copying a disc with partition(s) you can't unmount
(eg. /home or /usr) get hold of MandrakeMove Live CD and boot up with
that. Run "drakdisk" to identify the disc device names (e.g. /dev/hdb
and /dev/hdd) which you want to copy from and to. Run "su" to become
root and then run:

dd if=/dev/hdb of=/dev/hdd

This will likely take ages. To check progress send the USR1 signal to
the dd process and it will print out number of written blocks:
kill -USR1 process_id_number

This will wipe any data and partitions on the existing disc,

Justin
 
Old 07-26-2005, 01:52 PM   #7
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Original Poster
Rep: Reputation: 31
Thanks for the reply. I really want to do this but I'm unsure of the process. Why do I need "Mandrake Move"? Also the disc I'd like to move to has Xandros on it, can I installed over it?
I know the disc names, Mandriva is on hdb and the other drive with Xandros is hda. Where do I need to be to run the command ddif=/dev/hdb+/dev/hdd, in disc drake?

Thanks
 
Old 07-26-2005, 02:20 PM   #8
cokelid
LQ Newbie
 
Registered: Jun 2005
Distribution: Mandriva LE 2005
Posts: 4

Rep: Reputation: 0
The MandrakeMove Live CD is only needed if you can't unmount the drives you are copying. If you boot from one of the drives you wish to copy then it won't work, you really need to have both drives unmounted, so don't use "dd" if the drives are in use. The Live CD runs from memory and so you don't need to have the hard drives mounted. You can use any Live CD you like, I suggested MandrakeMove given the forum.

You run the dd command from a command-line.

Also be warned, that if you currently boot from hda, and copy hdb to hba then it's most likely you will no longer be able to boot from hda since the dd will overwrite the MBR (master boot record) on hda with that from hdb (where I'm guessing there isn't a valid MBR). Have a look around the boards for info on backing up and restoring your MBR.
 
Old 07-26-2005, 03:23 PM   #9
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Original Poster
Rep: Reputation: 31
Thanks. I could probably run the Mandriva installation cd in upgrade and remount grub then.
 
Old 07-31-2005, 04:41 PM   #10
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Original Poster
Rep: Reputation: 31
What if I ran Mandriva on hda(the one I want to move to) until it formated the ext3 filesystem and partitioned, then booted back into hdb and did the dd if=/dev/hdb of=/dev/hda? Would that work? OK, what I did was to install Mandriva on hda, partitioned, formatted with the correct file system. So, if I boot back into Mandriva hdb and run the "dd if=/dev/hdb of=dev/hda will that copy Mandriva hdb over to Mandriva hda?

Last edited by raysr; 07-31-2005 at 09:22 PM.
 
Old 08-01-2005, 02:16 PM   #11
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
You will need a live cd like knoppix; it's good to have anyway. I would not use dd to make the copy unless you want to transfer to a partition that is exactly the same size as the one your currently on. If you use dd, the new partition will be seen in linux as the same size as your old partition regardless of its real size.
Most people use tar instead as it preserves all links and permissions on the original filesystem better than the cp command w/o dd's partition size problem.
Here's what you do. Boot with knoppix and mount the partition where mandriva is currently installed and the partition you want to transfer to. Open a console and run:

$ su
<Enter key>
# cd /mnt/hdxx
# tar -cf - . | (cd /mnt/hdyy ; tar -xvf -)

Where "xx" is your current partition for mandriva and "yy" is the mount point for your new location.

That will transfer everything. Note, I think it's best to use knoppix or another live cd because then your mandriva system will not be active when the transfer is made. A running system will have a lot of dynamically created and changing files that can cause problems on a direct copy, especially in your /proc and /sys directories. There are ways around that but this makes things easier.

That's phase 1. Phase 2 is going into your new location and editing /etc/fstab and /etc/lilo.conf. If phase 1 goes well, post back and I'll go into how to do that. Your present install will be unaffected by my procedure and you should boot your old mandriva install just fine. You can make the necessary changes through there by mounting your the partition that you copied mandriva to.
 
Old 08-01-2005, 08:09 PM   #12
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Original Poster
Rep: Reputation: 31
I chickened out and put my "home" folder on cd and reinstalled it clean. I didn't have that much to transfer after that. Thanks for all the replies.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Move drive kevx Linux - Hardware 1 09-24-2005 03:10 PM
How to move to larger drive.... bishoptf Linux - Hardware 2 08-27-2005 04:37 PM
move home to new drive gSalsero Linux - Software 1 06-11-2004 04:13 PM
can i move my hard drive to a different computer citrus Linux - General 5 04-12-2004 03:30 AM
partitioning a new drive, which directories can I move ? xucaen Linux - General 2 02-25-2004 09:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 03:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration