Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.