Solved

Making a disc bootable in an other system

Posted on 2004-08-05
4
234 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

730 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