LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-05-2004, 12:34 AM   #1
Darkenedes
Member
 
Registered: Jul 2004
Location: Pittsburgh, PA
Distribution: : Slackware 10
Posts: 31

Rep: Reputation: 15
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
 
Old 10-05-2004, 12:55 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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
 
Old 10-05-2004, 02:41 AM   #3
Darkenedes
Member
 
Registered: Jul 2004
Location: Pittsburgh, PA
Distribution: : Slackware 10
Posts: 31

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Educator looking to insert linux into current setup flarefox Linux - Networking 6 07-06-2004 11:19 AM
Mondorestore related, moving linux to other drive Samppa72 Linux - Hardware 0 01-26-2004 03:17 AM
copying current setup to new hard-drive noshellswill Linux - Hardware 3 10-14-2003 10:43 PM
Moving linux to second hard drive rjayaram Linux - General 10 09-11-2003 06:23 PM
Moving / Backing Up Linux to a different drive` kiteless Linux - General 1 08-18-2003 11:54 AM


All times are GMT -5. The time now is 05:21 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration