Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2001-08-06
6
Medium Priority
?
187 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

636 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