LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help moving my current Linux setup to a new drive... (https://www.linuxquestions.org/questions/linux-newbie-8/help-moving-my-current-linux-setup-to-a-new-drive-238884/)

Darkenedes 10-04-2004 11:34 PM

Help moving my current Linux setup to a new drive...
 
My setup right now: I have Linux installed on a 4GB primary slave drive, and Windows98 on a 20GB primary master drive. What I want to do is wipe my 20G drive clean, format it for Linux, and move my current Linux setup to the bigger drive. I'll be installing Win98 onto the smaller slave drive after the switch (found a thread for this already). Is it possible to do this without screwing up any symlinks/programs/etc.? Can I copy my whole root setup to the new drive?

I know I'd have to edit my LILO config to point to the new setup, and I have a disc to boot Linux from when Win98 writes over LILO in the MBR, but other than that will there be any problems? I'd really like to avoid a fresh Linux install if I can.

TIA

-Dark

jtshaw 10-04-2004 11:55 PM

You sure can, keep a close eye on your cp options. There are some important ones you don't want to miss.

-p = preserves the original files owner, group, permissions, time stamp, ect. ect. ect.

-R = recursive copy and do the right thing with special objects

-P = copy symlinks as symlinks and don't follow them

-d = another nice symlink option....

-a = short hand for the 4 above options


I decided to show you all the options I'd go with, but since -a calls them all all you really need to do is cp -a / /mnt/newdrive/. or something like this. Of course, making sure the system boots off the new drive before doing anything to the old one is a stellar idea.

John

Darkenedes 10-05-2004 01:41 AM

Quote:

Originally posted by jtshaw
You sure can, keep a close eye on your cp options. There are some important ones you don't want to miss.

-p = preserves the original files owner, group, permissions, time stamp, ect. ect. ect.

-R = recursive copy and do the right thing with special objects

-P = copy symlinks as symlinks and don't follow them

-d = another nice symlink option....

-a = short hand for the 4 above options


I decided to show you all the options I'd go with, but since -a calls them all all you really need to do is cp -a / /mnt/newdrive/. or something like this. Of course, making sure the system boots off the new drive before doing anything to the old one is a stellar idea.

John

Thanks, John. I forgot to ask last post, but how would I get fstab to recognize the freshly reformatted drive? My current drive is formatted as reiserfs, so I'll be formatting the 20GB drive the same. Right now my fstab looks like this:
Code:

/dev/hdb2        swap            swap        defaults        0  0
/dev/hdb1        /                reiserfs    defaults        1  1
/dev/hda1        /fat-c          vfat        user,umask=1000,rw,auto  1  0
/dev/dvd-rom    /mnt/dvd-rom    iso9660    noauto,owner,ro  0  0
/dev/cd-rw      /mnt/cd-rw      iso9660    noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0

I'm still fairly new to this so I don't want to mess anything up. Do I just switch hdax and hdbx respectivly?

I know Windows doesn't like to run on a slave drive, so I have to switch my jumpers and make my 4GB drive the master while I install Windows98, then jump it back to slave and add the following to lilo.conf:
Code:

map-drive=0x80
to=0x81
map-drive=0x81
to=0x80

I'll do this after I'm sure Linux boots from it's new location, effectively making my Linux drive the master, and the Windows the slave. My question is, is hda always the primary master drive, and hdb the primary slave? Or will this change after I make the switch?

Thanks,
Dark


All times are GMT -5. The time now is 07:49 AM.