LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-03-2005, 09:55 AM   #1
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Rep: Reputation: 15
Going to replace hard drive - should I switch distro too?


My home server (which I finally have setup the way I like it after about 2 years) has a 20GB hda, running FC3. It is now about 70%full and I want to replace it (maybe?) with another 80GB I have. I have a few options (I think) and I wanted some of you all to assist me with picking one of them. Here they are:

1. Replace my 20GB drive with the 80GB drive and simply(?) copy all data over.

2. Replace my 20GB drive with the 80GB and start fresh with new distro

3. Leave my 20GB drive inplace and add the 80GB drive and move /home


I have many different opinions myself:
Option 1 is good except it seems a little difficult.

Option 2, I'm a little scared to do because I'm afraid it'll take me another 2 years to get the new one the way I like it. But it's an opportunity to upgrade to a better distro (oops - not trying to make a "whats the best distro" thread out of this)

Option 3 seems the easiest, but it involves buying a new hard drive and I really feel like I *need* to put the 80GB drive in my server instead of my son's PC

I appreciate all your opinions!
 
Old 05-03-2005, 10:05 AM   #2
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
#1 is easy, so long as you have a Knoppix CD or similar - it's best to copy files from an inactive drive.

#2 could potentially be a lot of work. On the other hand, I know MY /home dir is full of clutter after moving it around 3 distros, so it could be a good chance to clear out some of the crud.

#3 I must have misunderstood. If you have an 80GB drive, why would you need to buy a new one? Or do you mean you're going to swap the 20 and 80 drives between two machines?

I'd probably go with #1 unless I really wanted a new distro. Apart from anything else, with that much extra space, you can add a partition later and install another distro to play around with first
 
Old 05-03-2005, 10:11 AM   #3
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Original Poster
Rep: Reputation: 15
Ah yes, the 80GB drive is coming out of my son's PC (which I haven't setup yet) I would need to get him a new drive for option #3. So it sounds like you perfer option #1 - You don't see any problems with FC3 as a distro for home server. It's currently IP masq. a dialup. But by this weekend I will have broadband and I plan on doing more with it (like redirecting subdomains from my webhost to it, etc.)
 
Old 05-03-2005, 10:49 AM   #4
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
I'd be a bit paranoid about using my home PC as a webhost as well. But that's a personal thing - means I can have a firewall that just says "No" to everything incoming, rather than letting traffic in.

#1 is dead easy, so long as you have a distro independant of hard-drive, and you remember to use the switch to tell "cp" to preserve file permissions etc. I forget what it is
 
Old 05-03-2005, 11:09 AM   #5
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Original Poster
Rep: Reputation: 15
true, webhost might be the wrong thing. I basically need to be able to access it from work though and get files if I need them.

I think you've convinced me that #1 is the right thing to do. And like you said - I can leave a partition for another distro. Is parted very reliable when it comes time to resize partitions later on down the road?
 
Old 05-03-2005, 11:26 AM   #6
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
No idea, I just leave excess space unformatted so I can add a partition later. I've still got 20GB or so untouched on my HD. . .
 
Old 05-03-2005, 12:27 PM   #7
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
I'd say there's something more to add to #1: if you copy the files with something like 'cp', you also need to write the MBR in order for the new HD to boot. You can do this by running something like 'grub-install' or the equivalent for LILO.
If, instead, you use 'dd', you must then adjust the HD size with something like tune2fs if I'm right.
 
Old 05-03-2005, 01:19 PM   #8
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
You can always install grub to the new MBR. . . but yes, it is something that needs to be taken into account
 
Old 05-03-2005, 01:32 PM   #9
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by harken
I'd say there's something more to add to #1: if you copy the files with something like 'cp', you also need to write the MBR in order for the new HD to boot. You can do this by running something like 'grub-install' or the equivalent for LILO.
If, instead, you use 'dd', you must then adjust the HD size with something like tune2fs if I'm right.
So, after I copy all files (I believe the correct tags would be -aix ?) Would I then remove the first drive, change the 80GB drive to master and then boot (from knoppix?) to grub-install?
 
Old 05-03-2005, 01:37 PM   #10
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
Something like that. You boot with Knoppix, open up a console and run
Code:
mkdir /mnt/newdrive
mount /dev/hda1 /mnt/newdrive
chroot /mnt/newdrive /bin/bash
grub-install /dev/hda1
exit
umount /dev/hda1
if the new HD will be the only one present and the Linux kernel is on the first partition. Otherwise, change hda1 to whatever appropriate.
 
Old 05-04-2005, 09:42 AM   #11
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Original Poster
Rep: Reputation: 15
I need a little clarification on something. I partitioned my hard drive like this:

/dev/hda1 /boot
dev/hda2 /
/dev/hda3 /home
/dev/hda4 swap

(the only difference is that I created a different partition for /home - it was originally in /dev/hda2 / )

so should I type:
Code:
grub-install --root-directory=/dev/hda1
or
Code:
grub-install --root-directory=/dev/hda2
I tried the former and when I boot - it comes up with:

Grub error 15
press any key to continue

if I press any key I get the splash screen - but it is all black and white and VERY garbly. If I select my kernel and hit enter it comes back with :

file not found
 
Old 05-04-2005, 09:46 AM   #12
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
It should be
Code:
grub-install /dev/hda1
. The --root-directory has a somewhat other purpose: http://www.gnu.org/software/grub/man...20grub-install
 
Old 05-04-2005, 09:54 AM   #13
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Original Poster
Rep: Reputation: 15
Ah - I should have simply done what you said to begin with, instead of thinking I knew what I was doing.
I'll have to wait to get home tonight to try it.
Thanks
 
Old 05-05-2005, 09:18 AM   #14
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Original Poster
Rep: Reputation: 15
okay - I boot to knoppix and mounted hda1 to /mnt/hda1
if I try to:
chroot /mnt/hda1 /bin/bash
I get:
'no such file" bash . If I whereis bash, it's in /bin/bash

If I try to:
grub-install /dev/hda1
I get:
cannot write, read-only filesystem (yes I am root) I can however run:
grub-install --root-directory=/mnt/hda1 /dev/hda1


After many hours messing around with grub.conf I finally got somewhere though. At this point, after the latter 'grub-install' command, my /dev/hda1 structure looks like this:
/boot
kernel and initrd files
/boot/grub
grub.conf and other related grub files

It still does NOT boot up without the nice blue splashscreen and is very garbly and comes up with "FILE NOT FOUND" when it looks for the kernel. So I have to manually type the exact same lines that are in my conf file below (from the root (hd0,0) line down of course)
I manually had to edit grub.conf and add "/boot" before the kernel and initrd lines to get it to boot.
my grub.conf:
Code:
#grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/hda2
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Fedora Core (2.6.9-1.667)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-1.667 ro root=/dev/hda2
        initrd /boot/initrd-2.6.9-1.667.img
Now, with it booted up and running everything runs like a champ. Although, from a terminal if I "cd /" there is not a /boot directory. I had to manually create /boot and then mount /dev/hda1. Now I have /boot/boot/grub/ etc.


Last edited by FiveFlat; 05-05-2005 at 09:20 AM.
 
Old 05-05-2005, 09:25 AM   #15
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
Quote:
chroot /mnt/hda1 /bin/bash
I thought hda1 was your /boot partition? Shouldn't you try to chroot to hda2?

Quote:
my /dev/hda1 structure looks like this:
/boot
Eh? If hda1 is /boot, you don't want a /boot in it! That'll create /boot/boot!

Have you changed your partitioning scheme since the one you listed above? If not, then your problem is that you seem to be treating the /boot device as the / device. . .
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
replace hard drive = L 99 99 99... Diagmato Linux - Hardware 2 07-09-2005 02:46 PM
Replace Hard drive IchBin Linux - Newbie 2 03-11-2005 07:24 PM
Hard drive switch -- What to do? shirtboy Linux - Hardware 2 01-31-2004 09:40 PM
Replace CD-drive with a hard drive (HDD) pdap Linux - Hardware 3 06-10-2003 11:11 PM
Extra hard drive. New distro? Misteree Linux - General 21 02-20-2003 04:42 PM


All times are GMT -5. The time now is 04:58 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