Disk problems - continuing saga

Bob McClure Jr robertmcclure at earthlink.net
Thu Oct 28 04:46:35 UTC 2004


If you wouldn't mind too much, we'd really appreciate it if you would
convince your mailer to wrap lines every 72 chars or so.  I'll
reformat this.

On Thu, Oct 28, 2004 at 11:53:21AM +1000, glow2797 at bigpond.net.au wrote:
> Still having problems installing a new disk. Have posted before and
> post was changed to question about "cable select", meant to get back
> before this but have been trying different things and as PC is a
> gateway to Internet have not been able to post.
> 
> Anyway thanks for replies previously.
> 
> Have got myself into some problems, probably self-inflicted but
> suppose that's how you learn!
> 
> Bob,
> Tried installing grub like was mentioned in reply ie get into "linux
> rescue" and "chroot" then do a "grub-install". Did not work when I
> tried previously but I didn't do it exactly the way you
> mentioned. Installed both disks and new one was on /dev/hdb, done a
> "grub-install /dev/hdb" but this didn't seem to fix problem.

I intended you to do that after moving the new disk into its final
position.  See, when you copy all the stuff over, the drive still is
not in bootable condition.  That's why you boot with the distro disk
into rescue mode.  Then you can render the new disk bootable.  But you
can't do that with it in its /dev/hdb position.

> Mentioned to a friend who suggested that if problem was in copying
> records I might be able to do a "dd if=/dev/hda of=/dev/hdb" - tried
> this but assumed that I should copy "dd if=/dev/hda1 of=/dev/hdb1"
> (location of /boot directory). At this stage things took a turn for
> the worst, don't know if it was related but couldn't then boot the
> original disk. Wondered about this and think may just be a
> coincidence and maybe disk became corrupted with constant handling?

That doesn't work unless both drives are exactly the same geometry
(cylinders, heads, sectors per track), and neither has any bad blocks
that must be blocked out.  By definition, drives with different sizes
can't be done that way.  Even if you could dd the partitions, you
still need to do the grub-install the way I instructed.

> Anyway now have to try and get original disk back. 
> Can mount both disks with "linux rescue" and tried to copy files
> over but getting an error on new disk saying "Duplicate LABEL=/" and
> new disk not booting. Decided to find out if new disk was faulty and
> installed RH8.0 with disks which I have and this went ok. Mounted
> new and old and tried to copy from old disk to new disk but think I
> had problems with /etc/fstab as install on new disk was allocating
> partitions differently (getting "kernel panic cannot find init").

As much as you can, get away from the use of filesystem labels.  They
may be good in some situations, but can lead to confusion if two
drives in the same machine have partitions labeled "/".  The mount
system doesn't know which "/" to mount on /.

If you are starting over, take your original disk, and run "df".  Then
edit /etc/fstab replacing "LABEL=/foobar" with "/dev/hda7".  Then copy
things over to the new drive.  Then move the new drive into its final
position, boot to linux rescue with the distro CD, chroot,
grub-install, etc.

Trust me.  I've done this procedure a dozen times while upgrading
drives.

> Have 2 questions.
> 1. Am going to proceed with install and copy all from the old disk
> to the new disk into a new directory (original is 40G and new is
> 120G). Will then install into /var /home /usr immediately but will
> install selectively into /etc (not /etc/fstab). Is this a good
> strategy and if so any tips on what files are important for /etc (eg
> lot of network info I need to transfer). Use Apache, vsftp, Samba
> and ssh amongst other things.

Well, you can do it that way, but it's a whole lot harder.  You will
keep finding missing stuff that has to be backfilled.

> 2. Above strategy (if it works) doesn't answer the question of why I
> couldn't transfer to the new disk, would love to know for future
> reference!!

I hope I've explained it.  If not, let me know what is unclear.

> I am suspicious of something which is done by the new install every
> time but have no idea how I could have emulated this, anyone any
> answers...
>    On new install from RH8.0 disks it installs 6 partitions
> something like following
>                         /dev/hda1    /boot   ext3
>                         /dev/hda2    /usr    ext3
>                         /dev/hda3    /home   ext3
>                         /dev/hda4    Extended partition type=f "DOS 95 Extended"  <<<<
>                         /dev/hda5    /dev/shm ext3
>                         /dev/hda6    /var    ext3
>                         /dev/hda7    swap
> In /etc/fstab there are the normal entries and an entry for /dev/shm
> which is allocated as tmpfs.
> Does this have something to do with why I couldn't mount new
> disk.

I don't think so.

> Was able to allocate as a type f partition by using t command
> in fdisk but would this be enough as I never formatted extended
> partition and only done this after I had allocated as an extended??

You don't format an extended partition.  An extended partition is
nothing more than a home for logical partitions.  The standard
(physical) partition table (which lives on the Master Boot Record,
usually the first sector of the disk) can hold only four entries.  If
you need more than four, the first three are "primary" partitions and
refer to real, usable disk space.  The fourth one allocates (usually)
the rest of the drive to an extended partition table that is placed
elsewhere on the disk.  That extended partition is then subdivided
into logical partitions, which can be formatted and used.  See also
The Fine Manual

http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/ch-disk-storage.html

> Bit wordy but have tried to give enough info (have left out the more
> colorful language which I have used over the past days)!!
> 
> Thanks 
> 
> Gordon Low

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure at earthlink.net  http://www.bobcatos.com
Grace happens.




More information about the Redhat-install-list mailing list