Solved

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

Posted on 2001-08-06
6
163 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 14

Accepted Solution

by:
xberry earned 100 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now