Solved

Making a disc bootable in an other system

Posted on 2004-08-05
4
232 Views
Last Modified: 2010-04-20
Hello,
I have a system running on /dev/hda and want to create a system on /dev/hdc. Everything (creating partitions, copyieng image..) is ok. But I can not make this disk bootable with lilo. I do the following :

mount /dev/hdc4 /mnt
mount /dev/hdc1 /mnt/boot
lilo -b /dev/hdc -r /mnt

in /dev/hdc4/etc/lilo.conf
is root=/dev/hdc4

After that I take the harddisc and put it in another PC. There "LI 01 01 01 01 01 01 ..." comes on the screen. I tried it wih setting root=/dev/hda4 but no success either.

Can you please help

Thanks in advance

Dennis
0
Comment
Question by:DennisWood
  • 3
4 Comments
 
LVL 20

Expert Comment

by:Gns
ID: 11724671
Boot from a floppy (thereby bypassing the ondisk bootloader, or failing that (and it will likely fail since your fstab will be wrong too)... Boot a rescue mode for your distribution (usually by booting the install media) with the HDD in the target machine. If the rescue mode don't mount the ondisk system somewhere (like /mnt/sysimage) you'll have to do it yourself, somewhat like
mkdir /mnt/hd
mount /dev/hda4 /mnt/hd
.... etc for any other partitions
Then when done do
chroot /mnt/hd
then edit /etc/fstab and /etc/lilo.conf to reflect that you've moved it to the IDE primary master position. When done do "/sbin/lilo" to reinstall the corrected first stage loader onto MBR.

One simple thing you can do to make it boot is to place it as IDE secondary master, and see to it that there's no HDDs on the primary interface... Then it'd be the "first drive" according to the BIOS and thus the MBR on it would be used... and likely correct. When you'd booted like that you could then perform the edits of /etc/fstab and /etc/lilo.conf, install the new map, then move the drive... Or just live with it on the secondary:-).

-- Glenn
0
 

Author Comment

by:DennisWood
ID: 11724838
Thanks for this tip. I was looking for a "one-go" solution. I was thinking about putting the option
disk=/dev/hdc bios=0x80
in the lilo.conf. With this it should treat the disk like it would be hda. Or does it overwrite mit dha disk ?
0
 
LVL 20

Expert Comment

by:Gns
ID: 11725089
Um, you will have to handle not only the MBR/LILO booting issue, but also the need to change /etc/fstab.
The only "one go" solution is to have it as secondary master (as mentioned above) so that it retains the /dev/hdc enumeration.

-- Glenn
0
 
LVL 20

Accepted Solution

by:
Gns earned 250 total points
ID: 11725094
So what I'm saying is that you won't get far by fiddling with the BIOS mapping of the drive.

-- Glenn
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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.:
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.

810 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