Solved

Making a disc bootable in an other system

Posted on 2004-08-05
4
236 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 Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

632 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