Solved

Making a disc bootable in an other system

Posted on 2004-08-05
4
235 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
[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
  • 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

729 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