LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Bigger Hard Drive - Clone? (https://www.linuxquestions.org/questions/mandriva-30/bigger-hard-drive-clone-503165/)

Snump 11-19-2006 11:56 PM

Bigger Hard Drive - Clone?
 
I have an 120 GB hard drive. I started to do some screwed video editing and junk on here so... I need a bigger drive. I ordered a 250GB Seagate.
Rather than reinstall my whole Mandriva install, I was hoping there was an easy to clone the drive and have all the extra space distributed among each system partition.

http://img135.imageshack.us/my.php?i...pshot17ld6.jpg

Emmanuel_uk 11-20-2006 01:36 AM

see the LQ thread "learn the dd command"
maybe google for ghost 4 linux or something like that

Snump 11-20-2006 06:27 AM

But the dd command won't allocate the leftover space.
Sounds like this is my excuse to upgrace to 2007.

Emmanuel_uk 11-20-2006 06:55 AM

The operating system should not take more than 10 Gb
on the existing HD
You can have two HD plugged into your PC at any one time
You have no reason to migrate the OS from one HD to the other
Just create more partitions
just move the big non-OS files from one HD to the other
with the cp command
see man cp and the R switch

AM i missing something here?

Snump 11-20-2006 07:04 AM

the new hard drive will be faster, so yes that's a reason to migrate.

Emmanuel_uk 11-20-2006 07:27 AM

no it is not

you can have the swap on the new HD, yes this will be faster
but you are better of seeing the OS on a "slowish" HD
because you will not notice the improvement by moving it to the new HD

and you will feel the pain of migrating ;)

Snump 11-20-2006 08:15 AM

Quote:

Originally Posted by Emmanuel_uk
no it is not

you can have the swap on the new HD, yes this will be faster
but you are better of seeing the OS on a "slowish" HD
because you will not notice the improvement by moving it to the new HD

and you will feel the pain of migrating ;)


Decisions, decisions....
I would like to go to 2007... But its a pain. I don't like pain.

Emmanuel_uk 11-20-2006 08:23 AM

you can have 2007 on the new HD, fresh install
still dual boot 2006 and 2007
then move accross some data on the bigger HD

your question is not about cloning really.
Unless you have a 50 Gb partition called /video
and you want to migrate that to a new partition on big HD
called /video2 being 200 Gb
you can use dd if=/dev/video of=/dev/video2 then resize2fs or whatever
but really you could just use cp -R

I do not understand your problem
post fdisk -l
and du or df

GNUlancer 11-20-2006 09:23 AM

The solution
 
The easiest solution if you don't want to use some ghost4linux, etc. is to make new partitions and copy your files on them. Then reinstall GRUB or LILO.

Let's assume that your new partitions will be, say, hdb1 and hdb2

You can partition your new HD with cfdisk (it's text-based, run in terminal), or diskdrake, or whatever else;

You can create filesystems on those partitions (in winblows -- 'format') with diskdrake, or, better
Code:

mkfs.ext3 /dev/hdb1; mkfs.ext3 /dev/hdb2
Diskdrake itself surely uses mkfs for creating filesystems

Then mount these partitions. I guess you're using standard distro's automounting, so just reboot.

To copy all the files to new partitions, type
Code:

cp -ax / mnt/hdb1; cp -a /home mnt/hdb2
..and stay patient

Then reconfigure and reinstall GRUB or LILO

Voila!

If something's gone wrong or you don't know how to accomplish some step, you may post here

Emmanuel_uk 11-21-2006 01:22 AM

+1 for cp (I keep hinting)
Quote:

Voila!
Et non...

This is not enough, you still have to edit /etc/fstab
in which / is pointing to the wrong HD
and probably all the other partitions, including /home
(depending on the new organisation)
(and this will be best edited with vi in rescue mode
Snump does that make sense "vi in rescue mode")

Swap will be on hda which is good

Still do not see the point in copying the OS
on hdb when two HDs are available

GNUlancer 11-21-2006 07:22 AM

Quote:

Originally Posted by Emmanuel_uk
+1 for cp (I keep hinting)

Et non...

This is not enough, you still have to edit /etc/fstab
in which / is pointing to the wrong HD
and probably all the other partitions, including /home
(depending on the new organisation)
(and this will be best edited with vi in rescue mode
Snump does that make sense "vi in rescue mode")

Swap will be on hda which is good

Still do not see the point in copying the OS
on hdb when two HDs are available

Could you tell me, what the hell he need to run vi in 'rescue mode'?
And what by the way is that 'rescue mode'?
Hello! It's not windows! To edit /etc/lilo.conf you just need an editor (any) and a running distro (absolutely any if has lilo, and most distros has it)

Still if any problems - post here

RVDowning 11-21-2006 07:54 AM

The way I did the same thing was to backup the system to dvd using mondoarchive. I then created new partitions on the new drive using mcc. After that was done, I used the restore function of mondoarchive to restore into the newly created partitions and made that the default boot.

So, I actually created a dual boot into two different 2007 systems this way.

Emmanuel_uk 11-21-2006 08:14 AM

Quote:

Could you tell me, what the hell he need to run vi in 'rescue mode'?
He/she does not, but
well because you said
Quote:

cfdisk
mkfs.ext3 /dev/hdb1; mkfs.ext3 /dev/hdb2
not a windows command, is it?

I was being "sarcastic", and I was asking if I made sense ;)
Surelly he/she can find kedit, kwrite etc.
So no flame war please
Inasmuch you said cfdisk and disdrake, I can say vi!

But there was a bit of logic in booting from a live distro
(here the rescue mode of mandriva cd) just to go and edit /etc/fstab,
even if complicated, there is something to learn for example

I am hinting I cannot see any point in transfering the OS
from one HD to another, so I make it a bit complicated

Quote:

To edit /etc/lilo.conf
I do not know if you have noticed you gave uncomplete explanation
in the first place forgeting about /etc/fstab.
I am not talking about lilo.
And if something goes wrong with grub, it is
always handy to quickly edit it with vi rather than having
to dig for knoppix or whatever live distro

Quote:

Hello! It's not windows!
Hoops just noticed, zinblows key is not working. I wondered why.
Beg pardon
Sorry for the bad joke. You just prompted me.

Cool ok. I am over-reacting, cannot stop me. Peace

GNUlancer 11-21-2006 08:31 AM

Quote:

Originally Posted by Emmanuel_uk
So no flame war please

Ok, ok.. Sorry
I just don't think vi is good for non-programmer, cause it's commands aren't intuitive (like ^S to save or ^O to open), and it takes time to learn them good.

GNUlancer 11-21-2006 08:37 AM

Quote:

Originally Posted by Emmanuel_uk
zinblows key is not working

About winblows key: if you're in KDE, you should set 3 or 4 modifier keys in kcontrol -- Shotcuts to make it work. Have a good day:)


All times are GMT -5. The time now is 06:39 AM.