On Wed, 24 Oct 2001, Donald Brandon wrote:

> "Mikkel L. Ellertson" wrote:
>
[snip]
>
> > The output of /etc/fstab, or the mount command, and the output of "df
> > -h" would be helpfull here.  Also the output of fdisk -l.  Untill we
> > know what is mounted where, it is hard to say what is needed.
>
> You are right.  A couple of good outputs.  Unfortunately, df shows that only
> the second hard drive is mounted :
>
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/sdb7             3.0G   98M  2.7G   4% /
> /dev/sdb2              23M  7.8M   13M  36% /boot
> /dev/sdb1             4.9G  346M  4.3G   8% /home
> /dev/sdb5             5.9G  1.1G  4.5G  20% /usr
> /dev/sdb6              16G   23M   14G   1% /usr/local
> /dev/sdb8             2.0G   21M  1.8G   2% /var
>
> and here is fstab :
>
> LABEL=/1                /                       ext2    defaults        1 1
> LABEL=/boot1            /boot                   ext2    defaults        1 2
> LABEL=/home             /home                   ext2    defaults        1 2
> /dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
> LABEL=/usr1             /usr                    ext2    defaults        1 2
> LABEL=/usr/local        /usr/local              ext2    defaults        1 2
> LABEL=/var              /var                    ext2    defaults        1 2
> none                    /proc                   proc    defaults        0 0
> none                    /dev/pts                devpts  gid=5,mode=620  0 0
> /dev/sda7               swap                    swap    defaults        0 0
> /dev/sdb9               swap                    swap    defaults        0 0
> /dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,kudzu,ro
> 0
> 0
> /dev/hdd4               /mnt/zip250.0           auto    noauto,owner,kudzu 0
> 0
> fstab (END)
>
> >
> >
> > The way the system is set up, you will not be able to remove one drive
> > without editing /etc/fstab.  If the system can be set to boot with just
> > the information on the second drive, you will probably find it simpler
> > to boot from a floppy, and then edit /etc/lilo.conf, and install lilo to
> > the MBR of the second drive.  If you try and install lilo to the second
> > drive with both drives installed, it will not work because lilo will
> > have the wrong BIOS number for the drive after you remove the first
> > drive.
>
> Question:  If we determine what partition of sda is being used to boot,
> could we leave that partition as is and use disk druid to edit the remaining
> or is this bad????
>
This is not a problem.  The only thing being used on the first drive is
parition 7, and that is being used as swap.  Now, when it comes to using
disk druid, you have a problem.  It is part of the installer, so you can
not run it after the system is installed.  (Unless you do another
install, or possible an upgrade...)
> >
> >
> > Now, as far as repartitioning the drives, you can do that wihtout
> > removing a drive.  Exactly what you will have to do depends on how the
> > drives are partitioned now.  You may have a small /boot partition on
> > /dev/sda2, it is hard to tell.  Once we know what is mounted where, and
> > how full each partition is, there are a lot of options.
> >
> > Mikkel
> > --
> >
Now, from the way this system is set up, you have a couple of choices.
If you want the OS to be on the first drive, and your data to be on the
second drive, it will not be too hard to do.  Basicly, what you will
need to do is to make a boot disk.  Then mount it, and edit the
syslinux.cfg file.  Change the part where it says "root=/dev/sdb7" to
"root=/dev/sda7".  You will also need to edit /etc/fstab, and make two
changes.  First, remove:
/dev/sda7               swap                    swap    defaults     0 0
then change:
/dev/sdb9               swap                    swap    defaults     0 0
to
/dev/sda9               swap                    swap    defaults     0 0

The reasion for this is because you are going to remove the first drive,
so /dev/sda7 will disappear.  The second drive will become /dev/hda, so
the swap partition that was /dev/sdb9 will now be /dev/sda9.

You can then shut down the system, and remove the first hard drive, or
change the SCSI IDs so that the drive that is now the second SCSI drive
becomes the first drive.  You will need to change the IDs in any case
before you put the data drive back in.

Now boot the system with the boot floppy.  Log in as root, and edit
/etc/lilo.conf, changing the lines "root=/dev/sdb7" to "root=/dev/sda7"
and run lilo to install it on the MBR of the first drive.  The system
should now boot just fine from the first drive.

If you have both drives installed, you are now ready to edit that
partition table of what will be the data drive.  If you removed the data
drive, then you should reboot, and make sure the system boots ok from
the hard drive.  Then shutdown, re-install the data drive, and boot the
system.

Now you can use fdisk or cfdisk to re-partition the data drive.  You
will probably find cfdisk more "user friendly".  What I would do is
delete all the partitions on the data drive, and then create 2 or 3
primary partitions.  You may want to create a swap partition, and the 2
data partitions you want.  If you make a swap partition, make it about
as big as the memory installed in the system.  Split what is left
between the two data partitions.

You will need to format the partitions.  If your swap is partition 1,
run "mkswap /dev/sdb1".  If your data partitions are 2 and 3, then you
should run "mke2fs /dev/sdb2" and "mk2efs /dev/sdb3".

You will now want to create mount points for your data partitions.  What
you use is up to you.  Something as simple as /mnt/data1 and /mnt/data2
will work.  (You create a mount point the same way you create a
directory - "mkdir /mnt/data1" and "mkdir /mnt/data2".)  You can then
label them using "e2label /dev/sdb2 data1" and
"e2label /dev/sdb3 data2".

You will need to create entries in /etc/fstab for them.  You will want:
/dev/sdb1               swap                    swap    defaults     0 0
LABEL=data1             /mnt/data1              ext2    defaults     1 2
LABEL=data2             /mnt/data2              ext2    defaults     1 2

They will mount automaticly the next time you reboot.  To use them
without rebooting, use "mount /mnt/date1" and "mount /mnt/data2" to
mount the data partitions, and "swapon -a" to enable the swap partition.

If you do not want the swap partition, then skip that part, and use
/dev/sdb1 for data1 and /dev/sdb2 for data2 in the mke2fs and e2label
commands.

Now, if you do not mind that the OS is on the second drive, you can do
just repartition the first drive, and use sba instead of /dev/sdb in the
commands I have listed.  You will need to edit the swap entry for
/dev/sda7, and add the entries for data1 and data2, but /etc/lilo.conf
can stay the same.

Mikkel
 --

    Do not meddle in the affairs of dragons,
 for you are crunchy and taste good with ketchup.





_______________________________________________
Seawolf-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/seawolf-list

Reply via email to