LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 02-10-2005, 11:56 PM   #1
joel b
Member
 
Registered: May 2004
Posts: 64

Rep: Reputation: 15
big project for a newbie


Hello - I have only Suse 9.1 personal on my computer - 4 users and 70 gigs of music in my home directory. I have another 90 gig HD that was used by a Windows machine - I want to:
1. Add the second drive and put the /home directory on that drive
2. change the parameters of my current disk to add a windows partition that I can start at boot if I want.
my thinking here is I can make changes to my distro or kernal or whatever and not lose my /home data. Is there a particular order I should do this? I know very little about the command line, and would like to do this from KDE if possible, or else you will have to explain things REAL SLOW. My current disk drive is 90% full!

Thanking everyone in advance -

Joel
Phoenix AZ
USA
:-)
 
Old 02-11-2005, 01:24 AM   #2
Mr. Hill
Member
 
Registered: Feb 2005
Location: Pepperland
Distribution: Arch Wombat, FreeBSD Current, OpenBSD 3.7
Posts: 238

Rep: Reputation: 30
Wow 70 gigs. I dunno what to tell you except back up everything you want to keep! If that music is worth something to you (it obviously is) then back it up. If you completely screw things up you can always get it back.

I also think that cloning the drive and fusing it in their would be a good idea.
 
Old 02-11-2005, 02:10 PM   #3
dping
Member
 
Registered: Dec 2004
Location: Oregon, USA
Distribution: Kubuntu 9.04
Posts: 181

Rep: Reputation: 30
Do you have a cd burner?
Is there anything you want to save on the second (90GB) hard drive?
Do you know how to set a hard drive to master or slave and how to attach cables? (ie: do you know how to install it in the case?)
 
Old 02-11-2005, 05:48 PM   #4
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Here's the general order that I would do it:

Create a knoppix disk. You can do it without one, but it will make it easier.

Copy EVERYTHING to the 90 GB drive. You might not want to here it, but do this as root user from the console.

Resize or repartition your 70 GB drive.

Install Windows.

Copy everything but /home back to your system (or reinstall SuSE).

Run the recovery function on SuSE's install CD (to get your boot loader back)

Modify your /etc/fstab to refer to your /home on the other drive.



Disclaimer: I sometimes don't know as much as I think I do. Use your own judgment. You may want to follow the advice of others here and get your data backed up first.

Knoppix is invaluable for this project. In fact, I would do most (or all) of the work from Knoppix. Knoppix is a live CD. It contains an entire distribution of debian linux that runs from the CD. It makes an excellent tool for working with your linux system (without your linux system in the way). You can get Knoppix from either www.knoppix.net or www.knoppix.com.

Once you have booted off of knoppix, look for qtparted. This is a graphical program for partitioning drives, much like partition magic. Make sure your new hard disk (I'm assuming primary slave: /dev/hdb) is formated With a linux style file system (ext3 and reiserfs are safe bets). Now open a root console (from the penguin menu) or switch to tty2-4.

cd /mnt
ls

Make sure you see hda1 and hdb1. If one of them does not exist, then create it with "mkdir hdb1". Now mount them for reading and writing.

mount /dev/hda1 /mnt/hda1
mount /dev/hdb1 /mnt /hdb1 -o rw

The -o rw is probably not needed. You will need to make sure it is in read/write mode though. If you had mounted the partitions from the KDE desktop, you will need to change it to read/write mode (right click on it and look for the option).

cp /mnt/hda1/* /mnt/hdb1 -R --preserve=all

This command should copy everything from your first drive onto your second. Undoubtedly this will take a while. The "-R" is for recursive; in other words, all the directories and everything in them. The "--preserve=all" should make sure that ownership of copies stays the same, that links remain links, etc. You would have problems otherwise. If you were to try this copy from Your running SuSE system, you would copy from /, and add a "-x" to the end. That would prevent coping stuff from proc and sysfs that you wouldn't need. Make sure that everything you need has been copied

Once that is done (and you have verified that your important files have been copied), then fire up qtparted again. If you clear up some space on the partition first, qtparted may be able to shrink your partition for you. If not, then delete the partition and create at least 2 new ones (an additional small fat32 partition is preferable for moving stuff from linux to windows 2000/XP. Linux can, but shouldn't, write to an NTFS partition) (a small partition for /boot is also handy).

Now copy back everything (unless you intend to reinstall SuSE). Well, not everything. Obviously don't copy over the huge load of files that you wanted moved (remember to use --preserve=all).

Now you may want to rearrange your second drive a bit. Remember, if you want to treat it as your /home, then you will need it to be arranged that way. use the mv command to shift things around. I'd do something like:

cd /mnt/hdb1
mkdir OldInstallation
mv * OldInstallation
cd OldInstallation/home
mv * ../../

You should have the folders holding your users home directories at the top of /mnt/hdb1.

Now install Windows. Normally it is best to install Windows before Linux. The Windows installer will overwrite the MBR of the drive, making it impossible to boot anything Windows. Because of this, you will need to install your linux boot loader after Windows is installed. I don't recall exactly how to do this from the SuSE Installation CD, but it can be done. It can also be done from knoppix 3.7, but I think the SuSE CD will be easier.

If Windows isn't automatically added to the boot menu, then you will need to edit your /boot/grub/menu.lst . Post back if you need to (it isn't hard, but I don't feel like taking the time at the moment).

Last, but not least, modify your /etc/fstab. This file keeps track of which partitions get mounted where. Add something like this:

Code:
/dev/hdb1      /home      reiserfs     acl,user_xattr        1 2
(here reiserfs is assumed. If the partition is ext3, then use that instead.) (This line was copied from my SuSE fstab and modified slightly. I think this is what should be used.)

Boot your system and see what happens. The "df -h" command can be useful to see drive usage, and to tell which partitions are mounted where.

Post back here if I've left something unclear (or if you have trouble (inevitable ).)
 
  


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
Help for the Big Newbie brenttucker Linux - Newbie 7 08-19-2005 08:08 PM
Big project for small N00b HKJGN Linux - Newbie 0 02-14-2005 08:55 PM
Linux newbie interested in a new project Hunter69 Linux - Security 3 02-12-2005 02:22 PM
Ambitious Newbie Project KaiserSoze860 Linux - Newbie 2 05-16-2004 03:20 PM
Beginning a big project - Need an Good Project Manager gamehack Programming 3 01-15-2004 12:49 PM


All times are GMT -5. The time now is 10:17 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration