Solved

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

Posted on 2001-08-06
6
166 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

895 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

14 Experts available now in Live!

Get 1:1 Help Now