[techtalk] second hard disk

Conor Daly conor.daly at oceanfree.net
Fri Sep 1 21:48:25 EST 2000


On Fri, Sep 01, 2000 at 12:14:17PM +0200 or so it is rumoured hereabouts, 
Helena Verrill thought:
> On Thu, 31 Aug 2000, Conor Daly wrote:
> 
> ...
> > We'll take /home as an example.
> 
> Thanks, an example is really helpful.
> I followed this, repartitioned a bit, moved home and usr,
> and upgraded to 6.2.14-5.0 last night; all seemed to go
> pretty well.
> I guess it's all pretty straight forwards, but it's
> reassuring to have some advice.
> I'd been a bit nervous about copying and deleting everything
> in the home and usr.
> 
> A couple of remarks:
> --my second hard drive is hdc - most examples assume it's

That's even better, having your HDDs on seperate IDE controllers makes for
better performance unless there's a CDROM slowing things down (I don't
know if such slowing down occurs _only_ when a CD is mounted / in use or
if it's a permanent thing).

> --Also, I found that if I'd prefer to edit /etc/fstab with
> emacs rather than vi, I should have edited it before deleting
> all the old usr (because emacs needed something in usr that
> wasn't there anymore, and I couldn't mount the new usr the old
> one said it was still in use)  But, this was OK, just I should
> have thought of it before.

Hmmm...  Presume you had /dev/hdcx mounted as /mnt at the time.  Should
have done

umount /dev/hdcx
mount /dev/hdcx /usr

emacs /etc/fstab

That would have done it.  

NOTE:	BIG NOTE:   

Never move /etc onto a seperate partition since that contains your fstab
which tells the system what to mount where.  The kernel cannot mount /etc
until it has mounted /etc to look at /etc/fstab  A bit difficult that! 
 
> Also, I'm still a bit nervous about having huge partitions.
> I made a 6GB one for home, and a 4GB one for usr.  

I don't favour big partitions on big disks myself.  Makes things easier if
there are multiple partitions about in case of needing to modify partition
sizes / parameters.  In the case where you wnat to be able to modify
partitions regularly, it's well worthwhile looking at "volume"
filesystems.  I don't know anything about them myself except you can
resize on the fly.

> There are
> a few other paritions that are just unused and unmounted.
> Now on the old disk, hda6 and hda7 are unused and unmounted,
> since they were the old usr and home - should I/can I just
> lump them together with the root parition on that disk,
> e.g. moving all root to hdc, then reparitioning hda, then moving
> root back to hda - will this work?

Oh yes, that'll work.  Easiest option is probably to make a temporary
partition on hdc, do a cp -dpRx (-x is there to make sure you stay on a 
single filesystem).  Then boot from a boot / root floppy, remake your root
partition on hda (Make sure this ends up with the same partition number as
before or you'll have to rerun lilo to update the MBR.  Then mount the new
hda root partition, do the cp -dpRx from the temporary partition on hdc
and reboot.

If the partition number changes (eg from /dev/hda5 to /dev/hda8) you'll
need to run lilo to update the MBR.  Assuming you have your new hda root
partition mounted on /mnt you need to edit /mnt/etc/fstab and
/mnt/etc/lilo.conf  Now change the reference to your old root partition
(ie. /dev/hda5) to the new reference (ie. /dev/hda8).  In the lilo.conf,
make the same changes and *in addition* add "/mnt" to the beginning of
every path listed in lilo.conf.  This is necessary since you must run lilo
using the files and kernel(s) from the new root partition which is
currently mounted as /mnt.  You really need to read the
Hard-Disk-Upgrade-HOWTO / mini-HOWTO to get the full rundown on this.  

Then run lilo like so:

/mnt/sbin/lilo -m /mnt/boot/system.map -C /mnt/etc/lilo.conf 

That will use the lilo.conf on your hda root partition.  Then unmount and
reboot and all should be fine.  

> Also, it is reasonable to have a partition just mounted as some
> subdirectory of /home/helena/  eg, I could have a parition just
> for all the images I download from my digital camera, or for an
> image of all my web stuff copied from the server that lives on.

That's cool...  There may be a limit to how many nested mounts you can
have, though I don't know what it is.  For example, I have something like
this:

/			/dev/hda1
/home			/dev/hda2
/home/me/NT-Server	//NT-SERVER/MY-NT-ACCOUNT	M$ NT server
filesystem mounted using the samba suite.  (Our office runs on M$ NT
server and M$ Exchange for (imap) email.  Using samba and mutt, I can use
all the in-house services without booting M$ at all (cool eh?!)).

You could even mount your old /dev/hda7 on /home/helena/pics/digicam if
you haven't already used it up as part of / in the section above.

> Also, when I upgraded, I seem to not be able to use kde, it
> only lets me run gnome, and says some file is missing for using
> kde... I guess I will work this out later.  Gnome is not so bad.

I mostly use gnome myself.  I like most of it and haven't got around to
using KDE much yet.  They (who're "They"?) say Gnome is for the anarchists
while KDE presents a more controlled desktop.  
 
> I've not yet sorted out the windows thing; I'll get to that later.

I've sent you my Dual-Boot Partitioning Layout doc (It's still M$ Word at
present but I'll move it to PDF or something soon) off-list.  That details
some of my philosophy on M$ partitions.

Just converted that to pdf (xpdf will view it for you).  Winging it's
way...

> Thanks for the help,

Anytime :-)

> Helena

-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)





More information about the Techtalk mailing list