?
Solved

Linux won't boot if I move the hard disk from sec to primary.

Posted on 2001-08-06
6
Medium Priority
?
182 Views
Last Modified: 2013-12-15
I set up a single-drive dual-boot 98/Red hat 7.1 installation while the hard disk was on secondary master position (in a caddy).  Primary master & slave positions were disconnected.  Dual boot works fine.

Now I want to move the disk inside as primary master.
Lilo works.  98 works.  Linux has boot 1620(?) error and just sit there for ever.
If I re-connect the disk as sec master just to get Linux running, what can I edit so I can then move it back to pri master?  I remember seeing 'hda2' NOT 'hdc2' so I thought linux knew it was on the first physical drive even though it was on the 3rd IDE position.

I can re-install if it's too messy.....:-(

Also what directory should general applications be installed into? (I don't want them under my user directory)
0
Comment
Question by:andyross
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 2

Expert Comment

by:olidel
ID: 6355900
Hi,

   If you put your hard-drive in primary position, you will have to edit /etc/fstab to reflect the new name of your hard-drive because it will become /dev/hda instead of being /dev/hdb. For lilo, it is the same thing. You can maybe create a boot disk with the new parameter to help you boot when you are in the primary partition.

Hope this help.

Bye
0
 
LVL 14

Expert Comment

by:xberry
ID: 6361554
Yes, I understand you right, the indicators here rather point to a conflicting setting in your BIOS. Why ?  your LILO boots fine you say, ok
so if the physical recognition of your harddisk had changed, then LILO wouldn't boot at all.
The idea i have is: When you had your disk set as secondary master
there was only one harddisk registred in your BIOS.
Then, so I assume you just unplugged your disk from IDE slot #3 & connected it with slot #1 without telling the change to your BIOS. The BIOS still kept the drive information from
the time when it was secondary master. In order to read sector information from the harddisk LILO is fully dependent on the BIOS. For the boot of LINUX LILO has to load the kernel from the /boot sector of the harddisk.
So if there is 'old, secondary master' BIOS information added to your 'new, primary master' BIOS information then LILO suddenly finds the boot
sector on cylinder 1620(?), a position which isn't bootable per BIOS limitations.
In your case I'd leave your disk where it is & just run the IDE autodetection in your BIOS. Then save the updated information in your BIOS & reboot your Computer. It should work normally then & boot into LINUX as before.
I
0
 
LVL 14

Expert Comment

by:xberry
ID: 6361596
Just to avoid misunderstandings:

> In your case I'd leave your disk where it is
= at it's new primary master position !
> & just run the IDE autodetection in your BIOS.
  That way the BIOS scans your system for 'real' existing IDE disks
  on your system & loads that information into it's memory chip.
 
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 14

Accepted Solution

by:
xberry earned 200 total points
ID: 6362764
Almost forgot, your second question:

The typical directory for application of any kind is of course /usr.
It may be specified though such as
/usr/bin           program binaries
/usr/X11R6/bin      X program binaries
/usr/games     games
/usr/local          any additional programs outside
          your standard LiNUX distribution
/usr/sbin          programmes which can only be run by root.

a place to install optional software or major application such as
office packages or any commercial programmes is /opt.

It is not advised to install your application programmes anywhere else on your Linux filesystem, otherwise you may confuse your system & things
won't work properly.
0
 
LVL 14

Expert Comment

by:xberry
ID: 6363035
Sorry, forgot that you do have a modern type BIOS that can handle any cylinder size in combination with a fdisk partitioned disk. Anyway, the change of disk position is notified in the BIOS & should match with informations stored in the files /boot/boot.b & /boot/map.
So do this (with your disk at primary master position):
Boot your Linux system from a floppy. Then first check your /etc/lilo.conf
file if the basic informations for your disk are still correct:
   boot=/dev/hda
#Linux bootable partition
   root = /dev/hda(?)  #  Important is that the disk device (hda) is still                          correct

Then run the command /sbin/lilo. Important step ! That way LILO & her relevant files in /boot are updated for any new configuration.
Then shutdown your computer & reboot.

0
 

Author Comment

by:andyross
ID: 6363242
Olidel
I changed /etc/fstab but that didn't help.
Then modified Lilo from hdc1 to hda1. It complained that it wasn't a valid config but I saved it anyway.  Dual-boot worked as before! (Lilo ignored my changes?)

Anyway, last night I decided to reinstall as the disk setup is so new.  It was the quick option.

xberry
sorry your comments were too late for me (UK time) but I have filed them.  Thanks for directory info.  Note that IDE auto-detect was already enabled for #1 & #3 so I could move drive between them easily.

I have to give points to someone, so 50 to xberry for directory info.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question