View previous topic :: View next topic |
Author |
Message |
Xptos n00b
Joined: 29 May 2002 Posts: 53 Location: Japan
|
Posted: Fri Jun 13, 2003 3:42 am Post subject: Moving Data for Install |
|
|
Hi all,
I have a laptop with a 20gb drive and a 40gb drive. I have Win2k on the 40gb drive. I want to move Win2k to the 20gb drive then install Gentoo on the 40gb drive.
Is there a way to move the data (about 10gb of stuff) from the 40gb drive to the 20gb drive without doing a reinstall? I thought of dd, but that won't work because of the sizes. I also thought of "mv /dev/hda1/* /dev/hdb1/*", but that won't move the win2k bootsector.
What would you guys/gals reccomend for moving the data over? |
|
Back to top |
|
|
keratos68 Guru
Joined: 27 Dec 2002 Posts: 561 Location: Blackpool, Lancashire, UK.
|
Posted: Fri Jun 13, 2003 11:26 am Post subject: Re: Moving Data for Install |
|
|
Xptos wrote: | Hi all,
I have a laptop with a 20gb drive and a 40gb drive. I have Win2k on the 40gb drive. I want to move Win2k to the 20gb drive then install Gentoo on the 40gb drive.
Is there a way to move the data (about 10gb of stuff) from the 40gb drive to the 20gb drive without doing a reinstall? I thought of dd, but that won't work because of the sizes. I also thought of "mv /dev/hda1/* /dev/hdb1/*", but that won't move the win2k bootsector.
What would you guys/gals reccomend for moving the data over? |
Not sure about "mv /dev/hda1/*" that doesnt seem right , wouldnt recommend you try it!!
Why not just mv the filesystem(s) on hda1, for example,
Code: | mkdir /mnt/1 /mnt/2
mount /dev/hda1 /mnt/1
mount /dev/hda2 /mnt/2
mv /mnt/1/. /mnt/2/ |
There are MANY ways to move filesystems, back them up, restore them, so please can anyone wishing to increase their rank , refrain from posting the obvious here
So , to continue .. then to grab the Win2k boot loader...
Code: | dd if=/dev/hda bs=512 count=1 of=/dev/hdb |
Then you will have to update GRUB/LILO to chainload the Win2k bootstrap now in /dev/hdb.
Any luck? _________________ Someone told me that "..they only ever made one mistake...."
...and that's when they said they were wrong!! |
|
Back to top |
|
|
samokk Tux's lil' helper
Joined: 13 Jun 2003 Posts: 116 Location: Paris, France
|
Posted: Fri Jun 13, 2003 11:39 am Post subject: |
|
|
ok, it begins to be really off topic, but just in case someone has the answer....
the partition specific bootloader seems to be stored in the first 512 bytes of the partition, according to your command.
but is there a way to copy windows MBR instead of using grub ?
it could be useful as a way to backup, before installing linux, for ex...
sam |
|
Back to top |
|
|
keratos68 Guru
Joined: 27 Dec 2002 Posts: 561 Location: Blackpool, Lancashire, UK.
|
Posted: Fri Jun 13, 2003 12:03 pm Post subject: |
|
|
samokk wrote: | ok, it begins to be really off topic, but just in case someone has the answer....
the partition specific bootloader seems to be stored in the first 512 bytes of the partition, according to your command.
but is there a way to copy windows MBR instead of using grub ?
it could be useful as a way to backup, before installing linux, for ex...
sam |
Mmmm, we're drifting now....
Very briefly , the "dd" command will read raw data from a block device and does so in a very flexible manner - according to command arguments.
Above , I used "bs=512 count=1" to specify 512byte block size and a read (count) of 1 block. Because I gave no starting block, dd will read from block 0 of /dev/hda (the physical disk) - i.e. THE MBR! I could have given /dev/hda1 for first partition on the physical disk and this would have read the boot record for that partition.
Its all quite flexible and depends how your disk(s) are structured as to what arguments one needs to pass dd.
TTFN _________________ Someone told me that "..they only ever made one mistake...."
...and that's when they said they were wrong!! |
|
Back to top |
|
|
keratos68 Guru
Joined: 27 Dec 2002 Posts: 561 Location: Blackpool, Lancashire, UK.
|
Posted: Fri Jun 13, 2003 12:13 pm Post subject: |
|
|
Gosh - I don't think I answered the question:
Above I'm only giving examples, but I suppose the following might help as a guide to anyone:
Code: | dd if=/dev/hda bs=512 count=1 of=MBR | creates a file called MBR containing the MBR of /dev/hda (the physical disk).
Code: | dd if=/dev/hda1 bs=512 count=1 of=BOOTP | creates a file called BOOTP containing the Boot record in the first logical partition on /dev/hda. [/code]
OOOPS! Just realised a booby. Above , my "dd" command to copy Win2k boot loader may only copy the MBR bootstrap and not the Win2k loader if Win2k loader resides in the windows partition (/dev/hda1).
I dont have Win2k installed so maybe someone out there can advise, but normally the MBR is a simple program thats the BIOS loads at startup (stage 1); this merely allows selection of a second loader which resides in one of your partitions. The MBR then "chainloads" this second loader (stage 2); the second loader then boots the O/S in the given partition.
There are many posts about this on the forum, so please search for more info as I dont wish to digress of the track here too much _________________ Someone told me that "..they only ever made one mistake...."
...and that's when they said they were wrong!! |
|
Back to top |
|
|
samokk Tux's lil' helper
Joined: 13 Jun 2003 Posts: 116 Location: Paris, France
|
Posted: Fri Jun 13, 2003 12:44 pm Post subject: |
|
|
keratos68 wrote: | Gosh - I don't think I answered the question:
There are many posts about this on the forum, so please search for more info as I dont wish to digress of the track here too much |
ok, thanks, I will surely do
sam |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|