Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2001-08-06
6
Medium Priority
?
191 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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Fine Tune your automatic Updates for Ubuntu / Debian
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

578 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