Re: Newbee Question


Subject: Re: Newbee Question
From: Roy Koch (rkoch@interaccess.com)
Date: Sat Jan 15 2000 - 20:18:36 MST


Wow thanks this is exactly what I was looking for. Thank you very much! Now
Ill try to get it all together.

Patrick Callahan wrote:

> Since both drives presumably still have ext2 file systems on them, you can
> simply mount them as part of your operating filesystem
>
> Linux operates with a single hierarchy for all files, and uses the mount
> command and the contents of /etc/fstab to determine which devices and
> partitions on those devices to attach where. The root partition / should
> be the installed linux you are running, the others are attached to mount
> points under /. you create a mount point by simply creating an empty
> directory. Any linux directory can be used as a mount point, but if the
> directory has files in it you wont be able to see them while the directory
> is being used to mount a partition.
>
> Here's what I do.
>
> I have a disk with a bunch of partitions on it. It doesn't matter that
> its one disk and not four. for our purposes, its disk partitions that get
> mounted, not the whole disks themselves.
>
> My partitions are all on sda
>
> sda5 is hfs and is used to exchange files between macos and linux.
> sda 6 is ext2
> sda 7 I'm using for swap
> sda 8 is ext2
> sda 9 is ext2
>
> Each of the ext2 partitions has a different version of linux and/or linux
> software versions installed in it. I can boot into
> any of the three from bootx by switching the root device entry between
> sda6, sda8 or sda9.
>
> Once booted into linux, depending on which root device entry I chose I'll
> end up with one of the three partitions mounted as /
>
> ls / will show the usual top level directories for that particular
> installation of Linux.
>
> Now in order to mount the other partitions, for each one you need to
> provide two things:
>
> 1. A directory to mount the partition under
> 2. Either a command to mount the partition in the chosen directory or an
> entry in /etc/fstab to mount the partition as part of the boot processing.
>
> The linux I'm using is in sda6, so /etc/fstab is really
> /dev/sda6/etc/fstab since I want to mount the other partitions, I need a
> directory for each partition. I chose to name mine simply /8 and /9, and
> I used the commands:
> mkdir /exchange
> mkdir /8
> mkdir /9
> to create the directories for mounting the partitions.
>
> Then, I added lines to /etc/fstab for each of the partitions, assigning
> them to mount as /8 and /9
>
> /dev/sda5 /exchange defaults 0 0
> /dev/sda8 /8 ext2 defaults 0 0
> /dev/sda9 /8 ext2 defaults 0 0
>
> You can add these lines using cat >>/etc/fstab, followed by the two lines,
> followed by a ctrl/d
> or you can use an editor to add them.
>
> If you're like me and have linux in more than one partition, do something
> similar with the remaining partitions. For example if you booted and had
> sda9 as the / partition, you would want /6 and /8 directories and
> /etc/fstab entries.
>
> If you don't have linux in the additional partitions, you can still mount
> them anywhere you want.
>
> Sometimes, I want to be able to look at materials in a partition other
> than the one I just booted and mounted as /
>
> When I'm using sda6 as /, I have created directories /8 and /9 and I've
> added lines to /etc/fstab in the sda6 ext2 filesystem which automatically
> mount /8 and /9 as sda8 and sda9
>
> I've done a similar thing to each of the other file systems.
>
> Roy Koch wrote:
>
> > I have another newbee question! I have changed the drive I boot Linux
> > on, I now want to use the other drive I was using. The drive I am
> > booting on now is sda5 my older drive I want to use as a extra drive is
> > sdb5?



This archive was generated by hypermail 2a24 : Tue Feb 01 2000 - 17:50:57 MST