[lug] [lilo.solution]

Carl Wagner carl.wagner at level3.com
Wed Mar 29 03:28:13 MST 2000


Unless your ribbon cable has a section of wires that are twisted, it does not
matter where you
connect a device on the cable.  It only matters WHICH cable and how the device
is jumpered.

I assume that you now have
   /dev/hda  - your hard drive
   /dev/hdb  - vacant
   /dev/hdc  - CD-ROM
   /dev/hdd  - vacant

If so just make your tape drive a slave and plug it into either cable. 
Some types of drives have two jumpers:
  "one drive"  or  "two drives"  - you would want "2 drives"
  Master  or  Slave             - you would want "Slave"
Just look at the manual that came with the drive, or go to Seagate's web site.
    http://www.seagate.com/support/tape/specs/format_dat.html
You will also need to check the other drive on the same cable for its jumpers.
(CD-ROM or HD)


You also could have left it as /dev/hdc if you added your new drive as
/dev/hda. Then LILO
could have written its boot record to /dev/hda and you could then boot from
/dev/hdc or whatever
drive you wanted.

I think there is a striped down version of vim (called vi) in /bin that you
could have 
used. So you would have just typed /junk/bin/vi {filename}.  There may have
been another editor
around, but your path may not have been set up?

As for read only, I don't know.  I know when Linux boots, the hard drive is
initially set
to read only, and then after a while it is set to read write.  If you watch
the boot messages
you will see where this is done.

I have a question for you.  Did you receive the mail message that I sent
directly to you?  If so
what date and time?  Our mail server here runs very slow at times and was just
wondering.
(I am sending this at 10:10, and I bet it does not show up on the list for a
few hours)

Carl.

JEFF PFOHL wrote:
> 
> I've emailed/posted about this problem and it is finally solved (well
> almost). But I finally, with everyone's help, figured out the problem
> AND learned some neat things along the way. Here's a rather long
> write-up as to how the problem was solved for everyone's
> benefit. Special thanks to everyone who offered advice and special
> thanks to Murphy Leo O'Dea who really broke this problem open for me
> and provided invaluable advice. And to Norm Modine for advice on using
> cat and answering questions throughout this process. This story
> necessarily leaves out all the dead ends I ran into which led no where
> but to frustration.
> 
> The original problem (briefly), I was trying to install Red Hat 6.1 on
> my IDE HP Vectra. This machine currently runs RH5.2 with no
> problems. The 6.1 install, on a new disk, went smoothly but the reboot
> stuck on "LI".
> 
> Lots of things were examined/tried over the last several days. Finally
> Murphy asked me about my ribbon cable set-up and what was
> master/slave.
> 
> I'll quote Murph "I believe it's trying to write a new boot record to
> your Tape Device!" Indeed he was correct. The wiring WAS (and no I
> don't know how it ever worked with 5.2):
> 
> CD-Rom was:
>  /dev/hdc   IDE2   Secondary Master        End of second ribbon cable
> 
> Harddrive was:
> /dev/hdd   IDE3   Secondary Slave          Middle of second ribbon
> cable
> 
> Tape drive was:
> /dev/hda   IDE0   Primary Master             End of first ribbon cable
> 
> So I rewired like Murphy suggested:
> 
> CD-Rom is now:
>  /dev/hdc   IDE2   Secondary Master        End of second ribbon cable
> 
> Harddrive is now:
> /dev/hda   IDE0   Primary Master             End of first ribbon cable
> 
> Tape drive is not plugged in (see below).
> 
> Despite Murphy's good advice on how to manually mount things I decided
> to do a clean install for RH6.1. Easy and less painful IMHO.
> 
> The RH 6.1 install went SMOOTHLY. Booted just fine.
> 
> OK now it is time for me to learn some very neat things. And I get to
> use Murphy's/Norm's advice on manually mounting plus some other
> "tricks". With my tape device disabled and my RH5.2 still having all
> my files on it I need to access this drive. For the short term to keep
> my computer up so I can get email and in the longer term to get the
> files from my RH5.2 to my RH6.1 disk.
> 
> OK with the new cabling put in the old RH5.2 disk and boot. OOPS
> doesn't work:
> 
> "loading advansys module
> scsi : 0 hosts
> /lib/advansys.o : init_module: Device or resource busy
> hdc: tray open or drive not ready
>      attempt to access beyond end of device
> hdc: tray open or drive not ready
>      attempt to access beyond end of device
> hdc: tray open or drive not ready
>      attempt to access beyond end of device
> 16:0d rw=0, want=2, limit=0
> 
> EXT2-FS: unable to read superblock
> hdc: tray open or drive not ready
> attempt to access beyond end of device
> 16:0d rw=0, want=2, limit=0
> FAT bread failed
> kernel panic: VFS: Unable to mount root fs on 16:0d"
> 
> OK this isn't suprising. It wants to boot /dev/hdC and the device is
> now wired as /dev/hdA. This is also perhaps more detail than you
> wanted but I saw this a lot today so thought I'd put it out there. It
> also relates to a problem at the end which is important and in need of
> further advice.
> 
> OK try a "trick" of sorts:
> 
> Reboot the machine with a custom boot floppy. Get to the "boot:"
> prompt and try
> 
> boot: linux single root=/dev/hda13 initrd=
> 
> What this SHOULD do is start the boot in single-user mode with the
> root partition set to my new root partition (hda13 rather than hdc13
> as before). The empty initrd specification bypasses the
> installation-related image on the boot diskette which causes you to
> enter single user mode immediately.
> 
> I logged in as root. I was going to simply edit /etc/lilo.conf to
> reflect /dev/hdaXX instead of /dev/hdcXX. BUT the file system is
> READ-ONLY. FRUSTRATING. WHY is it "read only"???
> 
> OK make a rescue floppy from the RH5.2 CD and try rescue mode. Boot
> off custom boot diskette and at the "boot:" prompt type
> 
> boot: rescue
> 
> Now insert the floppy with rescue.img.
> 
> Great I'm now logged in as root. Following Norm's/Murphy's advice
> (although he expected me to use it for my 6.1 install I actually was
> saving my 5.2 this time around):
> 
> Boot with a rescue diskette; manually mount /dev/hda13 by creating a
> directory /junk, then "mount -t ext2 /dev/hda13 /junk ".  Edit
> /junk/etc/lilo.conf.  Then run lilo from /junk/etc using the -r
> switch.
> 
> HOWEVER there isn't an editor present. No vi, no emacs, no ed,
> nothing.
> 
> OK first things first let's explicitly cover what I did right as I
> logged in:
> 
> root> mkdir /junk
> root> mount -t ext2 /dev/hda13  /junk
> root> mount -t ext2 /dev/hda1   /junk/boot
> 
> root> cd /junk/etc
> root> cat lilo.conf
> 
> OK I now know exactly what lilo.conf looks like. I need to change all
> hdc to hda but with no editor. Try the "cat" command. Thanks Norm for
> this hint. Write it out to a separate file in case this doesn't work.
> 
> root> cat >jeff.lilo.conf
> 
> Type it in line by line, use [ctrl] d to exit and save.
> 
> WORKS!!
> 
> root> cp /junk/etc/jeff.conf /junk/etc/lilo.conf
> root> /junk/sbin/lilo -r /junk
> 
> Added linux *
> 
> WORKS!!
> 
> Do the same for fstab to correct all hdc to hda
> 
> root> cat /junk/etc/fstab
> root> cat >jeff.fstab
> root> cp /junk/etc/jeff.fstab /junk/etc/fstab
> root> cd /
> root> umount /junk/boot
> root> umount /junk
> 
> Shut it down. Reboot. WORKS!!!
> 
> But there is an error on boot up and my tape drive is still not hooked
> up.
> 
> Reboot:
> 
> {snip}
> 
> Mounting local file systems
> EXT2-FS: Unrecognized mount option defaults
> 
> mount: wrong fs type, bad option, bad superblock on /dev/hda1 or too
> many mounted file systems.
> 
> WHAT?? Here is my /etc/fstab in case it is relevant:
> 
> /dev/hda13              /                       ext2    defaults        1 1
> /dev/hda1               /boot                   ext2    detaults        1 2
> /dev/hda5               /home                   ext2    defaults        1 2
> /dev/hda9               /opt                    ext2    defaults        1 2
> /dev/hda11              /tmp                    ext2    defaults        1 2
> /dev/hda6               /usr                    ext2    defaults        1 2
> /dev/hda7               /usr/local              ext2    defaults        1 2
> /dev/hda10              /usr/src                ext2    defaults        1 2
> /dev/hda8               /var                    ext2    defaults        1 2
> /dev/hda12              swap                    swap    defaults        0 0
> /dev/fd0                /mnt/floppy             auto    noauto          0 0
> /dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
> none                    /proc                   proc    defaults        0 0
> 
> And my /etc/lilo.conf:
> 
> boot=/dev/hda
> map=/boot/map
> install=/boot/boot.b
> prompt
> timeout=50
> image=/boot/vmlinuz-2.0.36-0.7
>         label=linux
>         root=/dev/hda13
>         initrd=/boot/initrd-2.0.36-0.7.img
>         read-only
> 
> Lessons learned:
> 
> 1. check the ribbon cables. Helps if you understand what they mean,
>    thanks Murphy.
> 
> 2. the rescue.img is your friend, make this floppy when you
>    install. EVEN If the install was easy, you never know when it may
>    be useful.
> 
> 3. cat is very versatile and takes the place of an editor in a
>    pinch. It can be tedious but alas saved me.
> 
> 4. the Linux community is always willing to help
> 
> Questions still unanswered:
> 
> 1. how can I get my Seagate Travan tape device hooked back up?? The
>    only cable available is /dev/hdb, IDE1, Primary Slave, Middle of first
>    ribbon since the 2nd ribbon slave won't reach. I can fix this. I
>    need to hook it up on my RH5.2 and RH6.1 drives.
> 
> 2. why was the disk "read only" when I did a
> 
> boot: linux single root=/dev/hda13 initrd=
> 
> 3. where were the editors from the rescue.img reboot?
> 
> It seems fairly straight forward reading this message but in the midst
> of this I was truly lost. Editors not working, operating systems not
> being found, read-only file systems, editing /etc/lilo.conf various
> times with the "linear" option and without it, altering the ribbon
> cable hookups, rerunning lilo, checking for a geometry mismatch of
> some sort, learning to use cat in place of an editor, etc.
> 
> Thanks to everyone who offered suggestions and support. And if you
> have any clues on the above 3 remaining questions please let me know.
> 
> --
>                                 JEFF PFOHL
>                                 E-MAIL: pfohl at sandia.gov
>                                 PHONE : (505) 844-7033  work
>                                         (505) 299-9516  home
>                                         (505) 844-6729  fax
>                                 http://nucalf.physics.fsu.edu/pfohl
> 
> "My grandfather once told me that there are two kinds of people:
>  Those who do the work and those who take the credit. He told me to
>  try to be in the first group; there was much less competition."
> 
>  - Indira Ghandi, the late Prime Minister of India
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug





More information about the LUG mailing list