LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-15-2010, 04:48 AM   #1
edenyard
LQ Newbie
 
Registered: Jun 2002
Location: England
Distribution: Slackware 12.2
Posts: 6

Rep: Reputation: 0
Problem using LILO then moving hard disks around


A few years ago I built a small Slackware system and, for storage, I used using a 2Gb Compact Flash card plugged into the primary IDE interface. Initially, I made a bootable CD rom, booted the new system from that, copied the file system to the CF card and then ran LILO to install a boot sector on the CF 'disk' /dev/hda. That all worked well enough. My /etc/lilo.conf was like this:

###
### lilo.conf for flash disk on hda.
###
lba32
boot = /dev/hda
vga = normal
delay = 0
verbose = 2
image = /boot/bzImage
root = /dev/hda1
initrd = /boot/initrd.img
label = Mini
read-only

The only trouble is that the CF card, being an early one, is rather slow and so I've just bought an Innodisk 2Gb Disk-on-Module which ought to be much faster. I have plugged that into the secondary IDE interface, I've run cfdisk to make a partition, formatted it using mkreiserfs and copied all of the contents of the CF card on /dev/hda to the new device on /dev/hdc. So far, so good. But...

Now I need to run LILO from the existing CF card in /dev/hda to put a boot sector on the new /dev/hdc. Then I want to move the new device from /dev/hdc and put it in /dev/hda once it's bootable.

I'm stuck to know how to configure LILO to install a new boot sector on /dev/hdc. I don't appear to be able to make LILO understand what I'm trying to do. If I change the line 'boot = /dev/hda' in lilo.conf to 'boot = /dev/hdc', LILO aborts with an error message.

I'd be very grateful for any guidance on how to make this happen.

Cheers,
Gerald.
 
Old 06-15-2010, 10:36 AM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Put lilo.conf as is on the new card, put this card as hda, boot on cd, mount /root on /mnt then run lilo -c /mnt/etc/lilo.conf
This should do it.
 
Old 06-15-2010, 12:22 PM   #3
edenyard
LQ Newbie
 
Registered: Jun 2002
Location: England
Distribution: Slackware 12.2
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the suggestion re booting from the CD. Unfortunately the snag there is that the system has 'evolved' a little (well - a lot, really!) since it was first installed from CD. I want to preserve (and copy) it just as it exists on the present /dev/hda.

I'd hoped that there was some way to get LILO to install a suitable boot sector to a device other than /dev/hda, so that I could do this. Otherwise, I will need to copy the entire content of the existing /dev/hda over the network to my main PC, burn a CD, install a CD drive again temporarily in the target system and only then be able to do as you suggest.

Is it not then possible to make LILO write another boot sector to /dev/hdc (which will become /dev/hda) in the way I'd hoped? I rather thought one could do almost anything with Linux!!

Cheers,
Gerald.
 
Old 06-15-2010, 12:34 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
You can certainly do that and the Linux will boot if it finds itself in device hdc.

It would help if you see the same device name as Lilo so doing a
Code:
fdisk -l
ls /dev
may throw up some light
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem dual booting slack64 with slack13 on seperate disks with LILO damgar Slackware 2 02-27-2010 11:24 PM
LFS Boot Problem(LILO,Two Distributions in Two Hard Disks) 51dunk Linux From Scratch 4 06-11-2007 08:57 AM
grub/lilo problem with 2 scsi-disks finky Linux - Software 5 12-03-2004 06:39 AM
Partition problem on one of two hard disks equus Linux - Newbie 2 11-29-2003 02:48 PM
LILO Problem (swapped some disks around) mastahnke Linux - General 8 12-06-2002 09:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration