Installing Linux on Compact Flash


I want to install Linux RH 7.2 on a Compact Flash 64Mb in size . Can anyone suggest me how to install it . The min size of Linux is near 300Mb+ .So after getting some info on net ,i installed linux on a hard drive ,but the linux crashes with a kernel panic message , i think it's because of the flah disk on which i created a EX3FS .To go into linux i use the e-disk which i created at installation . (But i am able to access the flash drive which is mounted as /flash).
I recomplied the kernel and copied the result files i.e BzImage, to the /boot which i created on the flash drive .But i don't still get it how to make my flash drive bootable (I tried to create entries in lilo.conf and later run the lilo command ,i get a warning message that disk at 0x80 may not be recognised by Bios . And on next reboot
i get a message L which is some LILO error).
So can anyone please help me in simplify the process of installing linux on a Compact flash (IDE) 64 Mb ?? .
12 answers Last reply
More about installing linux compact flash
  1. I've never done this before, but I found this:

    <A HREF="" target="_new"></A>

    Which contains a mini-howto for installing onto a compactflash card, although the author is using RedHat 9 and references Grub instead of Lilo. I think it could help though.

    As for the "L", this error basically means Lilo can't load the second stage boot loader, which should reside on the boot device you assigned in lilo.conf. The second stage boot loader is typically /boot/boot.b.

    The error message regarding the bios when you reran lilo probably has something to do with this. Could you post the contents of your lilo.conf here? as well as the output of the 'mount' command run with no parameters? that will probably help.

    SCO is to Linux what a flea is to a dog.
  2. Thank you for your reply ,
    Actually the system on which i am working is being used by some other guys and will be available to me later.
    I had also copied the boot.b file to the /boot of the flash disk.
    when i ran lilo it gave me a warning message that
    the drive at 0x82 may be inacessible (Not a exact message)
    I had done everything with reference to a pdf i found specially the LILO part .
    url is
    Will get back asa i get the system .
  3. The link u gave me was preety useful , i managed to pass much of the hurdle .But ...
    I get a message after the system boots from the compact flash
    "Kernel Panic: No Init found Try Passing init=option to kernel" and it halts !.
    my lilo.conf is :-

    Before crashing the output screen is :-
    loading ext3 module
    mounting /proc filesystem
    Creating root device
    mounting root filesystem
    ext3:no journel on filesystem on IDE 0(3,1)
    Mount error 22 mounting ext3
    pivotroot:pivot_root(/sysroot,/sysroot,/initrd) failed:2
    Freeing Unused Kernet memory
    Kernel Panic:No Init found Try Passing init=option to kernel

    The Result of mount command
    /dev/hdd3 on / type ext3(rw)
    none on /proc type proc (rw)
    usbdevfs on /proc/bus/usb type usbdevfs(rw)
    /dev/hdd2 on /boot type ext3(rw)
    none on /dev/pts type devpts(rw,gid=5,mode=620)
    none on /dev/shm type tmpfs(rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    /dev/hda1 on /mnt/hda1 type ext2 (rw)

    So can it be because my CF is ext2fs ? .

    My system config
    Primary Master : Flash Disk CHS PIO1 64Mb
    Sec Master : Asus CdROM
    Sec Slave : hard disk

    I had installed initally tinybox ,but added /sbin and /etc from the hdd installation .(except lilo.conf)

    These are the details .
    Can u please help me on this ..
  4. Do you have a /initrd directory? and is there an initrd image in /boot/initrd-2.4.7-10.img as shown in lilo.conf?

    <i>Knock Knock, Neo</i>
  5. When you ran lilo last, did you still get the same error as before?

    <i>SCO is to Linux what a flea is to a dog.</i>
  6. Okay, I'm waiting for some replies from some guru types(I'm merely a somewhat competent admin, and a hobbiest coder), but I keep thinking about it, and I'd put money down that there's some kind of wierdness going on because of the ext2/ext3 thing. You mentioned in your first post that you had formatted it ext3, but that it only shows up as ext2 indicates something went wrong with that.

    I don't know how long it will take for my friends to reply, but if you have the time, I'd start the process again from the point of formatting the CF. How did you format it the first time, just out of curiosity?

    <i>SCO is to Linux what a flea is to a dog.</i>
  7. I'm no guru, but i agree it might be work a try with ext2. Make sure /etc/fstab reflects the change.

    <i>Knock Knock, Neo</i>
  8. Hi!
    Well u r right raretech , actually i got another similar machine as the guys working on it would take more time ,
    I formated the CF using ex2fs but my hdd is having ex3fs on it.
    my contents of /boot are

    I am passsing the LILO process , kernel is getting loaded
    but the INIT is a hurdle.
    looks like i got to redo the whole process again .
    I am not getting that LILO warning message again , as i now followed the process as given by "Julian Coccia " OR was it because the previous CF was ex3fs .
    By the way how can i make ex3fs using command line option ,in RH7.2 ? .
    In response to member poorboy , i created /initrd but i got the same problem and the other file do exist !.
    I have installed tinylogin but also copied imp files from my hdd installation . Am i missing something ? .
    Even if i give the startup option to kernel like "init= ", i am not getting through
    Please help me on this.Is there any script file or config file still remained to be changed ?
    Thanks in Advance!!
  9. One of my friends replied, and said "the only time I got that, was when I was f***ing around with partitions and the root partitions id was changed as a result." however, it is clear by the message:
    "ext3:no journel on filesystem on IDE 0(3,1)"
    that you have the right partition defined.

    He suggested recreating the file system as well.

    poorboy brought up something I should have asked earlier, can you post the contents of your /etc/fstab? If that device is listed as ext2, try changing it to ext3 to see what happens...

    Also, I just had an idea... How did you get the initrd file to the CF?

    If you want to recreate the filesystem, I suggest you recreate the filesystem as ext2 first. Get that working. Once you have that working, back it all up(assuming you have space), then you can convert it to ext3, as the process is not destructive.

    If you want to try again with ext3 off the bat, you can do it this way:

    verify /etc/fstab says ext3 for the CF
    mkfs -t ext3 /dev/hda1
    where /dev/hda1 is the correct device name for the CF partition.

    To do a ext2:
    change /etc/fstab to reflect ext2 for the CF
    mkfs -t ext2 /dev/hda1

    I recall something about ext2 defaulting to ext3 in RH 7.2. I'm not sure though, try it and see what happens...

    If you go the ext2 route, you can convert it to ext3 later, by doing the following:
    change /etc/fstab to reflect ext3
    tune2fs -j /dev/hda1
    which creates the journal on the filesystem.

    I hope I'm not leaving something out here. It's been a while since I did this type of stuff with any regularity.

    <i>SCO is to Linux what a flea is to a dog.</i>
  10. Hiii!!!
    I played around with the system and found that INIT was not working because of a missing file in /lib . (I am doing this for first time) , now it goes right upto asking me the username,but it's not accepting any username even "root"!!!.
    Thanks for the tip on /etc/fstab , it helped me a lot :) .
    Now the problem is about authentication .
    What is the method of redhat 7.2 for that , which files are referred ?(since there is a space constriant i had not copied all the file ,only the one i found important) .
    Boy this problem is sure helping me to clear my basic concepts on Linux !!!
    Thanking again in advance !!!.
  11. Nice!

    Just out of curiosity, what specifically did you have to do with regards to /etc/fstab, was it just defining the filesystem type? If so, did this happen to fix the harddrive install of RedHat to the point it can boot without rescue?

    Anyways, for the login, you probably copied /etc/passwd over right? You'll also need /etc/shadow and /etc/group.

    /etc/passwd is the "main" user configuration file. /etc/group stores group info and /etc/shadow is where the encrypted password used to verify your password is actually stored.

    <i>SCO is to Linux what a flea is to a dog.</i>
  12. Hi!!
    The modification in /etc/fstab was right what you thought (ex2fs vs ex3fs conflict) , i just modified it to ex2fs !!.
    The autheticaion problem was there because of the tinybox package i installed (it had replaced the su command), i just replaced the file with the original RH file and the problem was solved .So now machine is up . (Only n/w is remained to be configured ,but not at this very moment perhaps 1-2 days later.)

    Thanks for your help !!!!!

    So if anyone want to make a CF bootable m/c
    All they have to do is
    1. Create a Ex2fs in CF ,make it bootable
    2.Make a right root file system in CF
    3.Copy the contents of /etc,/bin,/boot/inet.d to that of CF's
    3. Copy the important required items of /sbin,/var,/proc,/lib
    (The /lib takes most of the space !!)
    4.The most tricky is /dev copy it using commands cp-av .
    5. Modify the config.lilo file in /etc and run LILO
    6. Also modify /etc/fstab it it's incorrect !!.
    Reboot the PC and you are and running ....

    Yestarday i found a nice website
    It was preety nice .Hope you like it too!!!

Ask a new question

Read More

Compact Flash Flash Drive Linux