Solved

Making a disc bootable in an other system

Posted on 2004-08-05
4
230 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
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…
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.:

728 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