LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2004, 07:52 AM   #1
FLLinux
Member
 
Registered: Jul 2004
Location: USA
Distribution: Fedora 9, LFS 6.3, Unbuntu 8.04, Slax 6.0.7
Posts: 145

Rep: Reputation: 15
Question Booting from a Compact Flash card


Hey everyone, i am trying to get Red Hat 9.0 to boot from a 1GB compact flash card. I can't seem to copy the /boot sector to the compact flash correctly. I want to use the GRUB boot loader, and after i do the

grub-install /dev/sda (compact flash is connected to my main computer through a USB card reader)

all i get from the compact flash card when i boot is "GRUB". I was hoping someone might know what i might be doing wrong, and maybe a better way to install redhat onto a compact flash card.

Thanks for the help.

FLLinux (newbie)
 
Old 07-09-2004, 06:11 PM   #2
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Rep: Reputation: 30
I think it is the same as with usb sticks.

I read an article about that :
http://rz-obrian.rz.uni-karlsruhe.de/knoppix-usb/

There are some other things:
Can your system boot from the card....................................?
You have to modify the kernel and or modules, because usb drivers should load first (see article)

Have a lot of fun....

CloudBuilder
 
Old 10-06-2004, 08:05 AM   #3
FLLinux
Member
 
Registered: Jul 2004
Location: USA
Distribution: Fedora 9, LFS 6.3, Unbuntu 8.04, Slax 6.0.7
Posts: 145

Original Poster
Rep: Reputation: 15
Can your system boot from the card....................................?
Yes the BIOS on the machine i am using will boot off of a compact flash card. Now the compact flash card i am using is connected to the motherboard on a IDE channel not a USB connection. So the compact flash card looks like a hard drive to the bios.
 
Old 01-07-2005, 05:42 PM   #4
mabrodis
LQ Newbie
 
Registered: Jan 2005
Posts: 6

Rep: Reputation: 0
I'm having a similar problem, however my hardware is quite a bit different I'm guessing (didn't see specific hardware listed in the first post).

However, I am using a small PC/104 board, industrial type thingy. It has a CF card right on the computer, an IDE connector, etc. For development things and to get it all working I plugged in a hard-drive and CDrom into the board and it ofcourse has the CF card. I got Gentoo 2.6 kernel all setup fine on the hard-drive and started migrating things over to the CF card. Linux saw the CF card as /dev/hdc during bootup, I fdisked it and all that. I moved most of the directory structure over (card is only 512meg, so I didn't grab it all, I left out some of /usr and /var). I setup the boot stuff on the CF card. However, when I boot off the CF card, the kernel is found just fine, starts the bootup but then bails out and says it can not run without a /proc directory. It asks for the root password (doesn't ask for username), then dumps me at a command prompt showing files on the CF card. However, that fs is mounted read-only, if I try to change anything, or run the 'mkdir /proc', etc command the kernel suggests it just fails saying you can't do that in a read-only file system.

It's a bit interesting how grub is setup, in the grub.conf file when the "hd(0,0)" stuff is setup I have that as "hd(0,0)", and since it finds the kernel that must be correct right? I'm asking because it is the first drive found on the system when the others are not plugged in, so when it's by itself (which is how it will be in production) it will be the first drive. Yet as the first drive it is still /dev/hdc, which is a bit confusing.

While the HD and CDROM were connected I ran the grub program and you can hit tab to have it help you with fields. For that "hd(" thing I hit tab and it would let me select either 0 or 1. Which makes some sense, since there were only two hard-drive-ish drivers in there, the cdrom was the 3rd, but intersting that number there doesn't corespond to the /dev/hda at all (for me it was 0 and 1, yet the drives it was talking about were /dev/hda and /dev/hdc).

So I setup the grub.conf as:

hd(0,0)
kernel /kernel.2.6.9 root=/dev/hdc2 (might not be letter for letter, just going by memory here)

Note: /dev/hdc1 is the boot partition, I tried "hd(2, 0)" but that didn't work, so apparently that "hd" number is not the actual number of drives, but maybe just selecting between bootable drives.

Since it found the kernel it seemed that was ok, but it never liked the /dev/hdc2, even though that is what it discovers the CF card at about 10 lines above the final kernel error.

Any ideas/help would be greatly appreciated.

I think it might have something to do with it being a CF card and therefore even though the kernel sees it and can obviously boot off it, maybe it's booting read-only for some reason??? Or maybe this is all from me not having the right stuff from /var and /usr over onto the CF card?

Thanks in advance!!
Mark Brodis
 
Old 01-08-2005, 02:49 AM   #5
randoman
LQ Newbie
 
Registered: Jan 2005
Posts: 6

Rep: Reputation: 0
hi guys i found out if you read some howtos that helps
www.bad_dog_down.net

Last edited by Tinkster; 06-05-2006 at 07:16 PM.
 
Old 01-10-2005, 11:01 AM   #6
mabrodis
LQ Newbie
 
Registered: Jan 2005
Posts: 6

Rep: Reputation: 0
Quote:
Originally posted by randoman
hi guys i found out if you read some howtos that helps
www.bad_dog_down.net
Really? What specific howto deals with booting off a CF card and having the card being mounted in read-only and the kernel not being able to create the proc directory? None that you linked to...

Last edited by Tinkster; 06-05-2006 at 07:16 PM.
 
Old 05-31-2006, 10:54 PM   #7
Dan Ferguson
LQ Newbie
 
Registered: Jul 2003
Distribution: Mandrake 9.1
Posts: 5

Rep: Reputation: 0
GRUB hangs when booting from IDE compact flash

It's two years later and I have the same problem with GRUB in installing Ubuntu. I haven't found a thread with a solution yet 8( . It just stops after installation after the word GRUB.

I have a IDE/Compact flash adapter with a 128MB flash card setup with /boot and two hard drives setup in a soft raid mirror with three partitions (/,/var,swap). Linux and GRUB see the compact flash and the drives. It just is failing with GRUB.

Still searching...


- Dan
 
Old 06-02-2006, 02:41 PM   #8
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Rep: Reputation: 30
Quote:
Originally Posted by Dan Ferguson
It's two years later and I have the same problem with GRUB in installing Ubuntu. I haven't found a thread with a solution yet 8( . It just stops after installation after the word GRUB.

I have a IDE/Compact flash adapter with a 128MB flash card setup with /boot and two hard drives setup in a soft raid mirror with three partitions (/,/var,swap). Linux and GRUB see the compact flash and the drives. It just is failing with GRUB.

Still searching...


- Dan
There is a free dos version. Try to install that and see if that works.
Most problems with usb and cards are : The format is not right - the card is not formatted in a way that it can start up.
Some OS'tems do not have the neccesary drivers installed. For instance windows cannot boot from usb.
I understand you have a card adapter to ide and a flash card in it and want to boot from this card over the ide interface.

So i would try to install the free dos version for a try. First format the drive, then put dos on it. If this works, your sure your interface is working correct a capable of starting, if not I would suspect the interface.............

CloudBuilder
 
Old 06-03-2006, 07:53 PM   #9
Dan Ferguson
LQ Newbie
 
Registered: Jul 2003
Distribution: Mandrake 9.1
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by CloudBuilder
There is a free dos version. Try to install that and see if that works.
Most problems with usb and cards are : The format is not right - the card is not formatted in a way that it can start up.
Some OS'tems do not have the neccesary drivers installed. For instance windows cannot boot from usb.
I understand you have a card adapter to ide and a flash card in it and want to boot from this card over the ide interface.

So i would try to install the free dos version for a try. First format the drive, then put dos on it. If this works, your sure your interface is working correct a capable of starting, if not I would suspect the interface.............

CloudBuilder
Thanks for your help!

It is definitely bootable. I use this same adapter and card in a number of servers and routers. The problem has only manifested itself on this server (TYAN 1U). I think I may have further tracked the problem down to being a GRUB issue. I have read people talking about after installing GRUB and then rebooting that GRUB will re-arrange the order of the drives in the system which will screw it up.

I am getting the LiveCD to re-install GRUB and manually edit the file to see if it will resolve the problem. Other people had success with doing this. The drives are on different controllers which may make the issue more prevalent.

- Dan
 
Old 06-04-2006, 07:50 PM   #10
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Rep: Reputation: 30
Quote:
Originally Posted by Dan Ferguson
Thanks for your help!

It is definitely bootable. I use this same adapter and card in a number of servers and routers. The problem has only manifested itself on this server (TYAN 1U). I think I may have further tracked the problem down to being a GRUB issue. I have read people talking about after installing GRUB and then rebooting that GRUB will re-arrange the order of the drives in the system which will screw it up.

I am getting the LiveCD to re-install GRUB and manually edit the file to see if it will resolve the problem. Other people had success with doing this. The drives are on different controllers which may make the issue more prevalent.

- Dan
If you used it on a number of servers, than it is very strange that grub did not re-arange the drives on those servers and that they all were starting without problems. I would suspect the bios or the hardware of the server that is n't booting. Grub will even boot from sticks, IF the bios will......

CloudBuilder
 
Old 06-05-2006, 04:46 PM   #11
Dan Ferguson
LQ Newbie
 
Registered: Jul 2003
Distribution: Mandrake 9.1
Posts: 5

Rep: Reputation: 0
Here is the message I just made and posted in another forum with all the detail...

Thanks for looking but I'm almost at the end of my rope and will have to dump Dapper it looks like.

Re: GRUB fails w/3 HDs (w/Softraid) and USB CDROM (ERROR 21)
I am posting here in the hope that someone can help me. I have been fighting this for a long time and haven't been able to find the proper assistance to get it working.

I am ready to drop Dapper since I have invested so much time (too much) trying to get around this problem.

My System:
hda (128MB) Compact FLash IDE drive (Looks just like a 128MB HD)
hde 80GB HD
hdg 80GB HD
USB CDROM --- This ends up in HD0 in GRUB???!!!

I can get it to boot my system if I use a GRUB boot CD (RIPLinux) and use:
root (hd1,0)
kernel /vmlinuz-xxxxxx root=/dev/md0
initrd /initrd.img-xxxxx


Although no matter what I do I cannot get it to boot correctly from the HD.

I have tried changing the config on the HD to match above.
I have re-installed GRUB from the ubunutu CD (and tested different settings)
I have re-installed GRUB from RIPLinux CD (and tested different settings)

All of this with the USB CD-ROM off and ON..
I cannot turn OFF USB as suggested in other thread due to this server not having PS/2 ports.

I need help and this is my last attemp at getting it before leaving Ubuntu and coming back later after they have it working..

Thanks,

- Dan
 
Old 06-05-2006, 07:11 PM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
As far as I am aware Grub or standard distros are not designed to boot off from a USB device. I believe the problem is to do with the low transmission rate of the USB port. When several files are needed and loaded into the memory the absence of any one of them or availability out of sequence, due to a transmission time lap, can cause Grub to hang or the kernel to panic.

Distros that boot successfully with USB devices use a slower boot loader like isolinux or using a installation CD in every boot up or a tweak to the ram disk file.

I have described this situation similar to a general (that is you) decides to attack a bridge head ( to boot). You have the army, tanks, infantry units and every equipment in readiness for the attack. On giving the order to advance you are told the ammunition/fuel convoy is 50 miles behind due to a delay crossing a narrow bridge wide enough just for one vehicle to pass through at any one time. Would you not panic if you know there is no way you can continue to supply your troops in the attack?

I think it is unreasonable to expect Linux to work in situations it has not been designed for. If one must do it then consider distros that are specially written for such an application, like Puppy.
 
Old 06-05-2006, 08:35 PM   #13
Dan Ferguson
LQ Newbie
 
Registered: Jul 2003
Distribution: Mandrake 9.1
Posts: 5

Rep: Reputation: 0
8).. I like your analogy 8)... Although in my case this is not the problem I'm having..

I am booting from a Compact Flash IDE adapter, it looks just like an IDE HD to the OS. Not from USB.. I have a USB CDROM which Ubuntu/GRUB puts as (hd0) (which is wrong). I have tried to work around it many ways but it will not cooperate.. The only difference between this and the other server (that works) is the USB device (CDROM & KYBD/MOUSE). Actually the motherboard and such are different, but the way I'm setting them up is the same.

It seems like using the USB is a problem with the current setup and Ubuntu.

- Dan
 
Old 06-06-2006, 06:55 AM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Must admit I have no experience with boot a CF card via a IDE controller but I would expect the IDE controller will deliver the data in accordance with the ATA speeds of 33, 66, 100 and 133Mbps, in the same rate a hard disk responds. The IDE hand shake protocol itself should have permitted partial availability of the data, since when a hard disk encounters a bad sector and repeats the read/write operation the OS will tolerate it.

Loading files into memory in a booting process however is another matter.

Your hde and hdg disks tell me that they are not the standard IDE channels, which are hda, hdb, hdc and hdd, but can be Sata or external USB devices.

The CD has its own boot loader and is device specific, although recently some distros are starting to use Grub, which is bootable via a CD.

USB devices for keyboard and mouse are acceptable to Linux but loading a kernel from the same port is a different matter as mentioned above.

I have seen the kernel putting up messages waiting certain segment of the kernel data (the root filing system) to arrive and then going a panic mode after a set time has been exceeded. The root filing system is there but could not be delivered to the memory at the moment of need.

I have also installed Grub into USB pendrives and external hard disks. Grub simply hangs each time when invoked. Normally on any floppy, CD and Hard disk I would reliably get a Grub prompt.

I therefore believe the Linux users are wasting time to expect a standard distro to boot normally (as in a hard disk) after porting it into a USB device.
 
Old 06-08-2006, 04:23 PM   #15
Dan Ferguson
LQ Newbie
 
Registered: Jul 2003
Distribution: Mandrake 9.1
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by saikee
Must admit I have no experience with boot a CF card via a IDE controller but I would expect the IDE controller will deliver the data in accordance with the ATA speeds of 33, 66, 100 and 133Mbps, in the same rate a hard disk responds. The IDE hand shake protocol itself should have permitted partial availability of the data, since when a hard disk encounters a bad sector and repeats the read/write operation the OS will tolerate it.

Loading files into memory in a booting process however is another matter.

Your hde and hdg disks tell me that they are not the standard IDE channels, which are hda, hdb, hdc and hdd, but can be Sata or external USB devices.

The CD has its own boot loader and is device specific, although recently some distros are starting to use Grub, which is bootable via a CD.

USB devices for keyboard and mouse are acceptable to Linux but loading a kernel from the same port is a different matter as mentioned above.

I have seen the kernel putting up messages waiting certain segment of the kernel data (the root filing system) to arrive and then going a panic mode after a set time has been exceeded. The root filing system is there but could not be delivered to the memory at the moment of need.

I have also installed Grub into USB pendrives and external hard disks. Grub simply hangs each time when invoked. Normally on any floppy, CD and Hard disk I would reliably get a Grub prompt.

I therefore believe the Linux users are wasting time to expect a standard distro to boot normally (as in a hard disk) after porting it into a USB device.

Drives hde and hdg are on a promise IDE softraid controller. I am not using the raid functionality since it is software based and Linux doesn't seem to recognize it. The compact flash IDE adapter does show as (hd0) /dev/hda.

I have got the system to successfully boot to the GRUB prompt but it's not picking up any of the config files. When I'm at the prompt GRUB see the two harddrives (hde,hdg) just fine and can boot from them to the OS. What is doesn't see is the /dev/hda. If I boot the OS it will see /dev/hda (hd0) fine but not after booting to the prompt with grub. The filesystems on hda (hd0) is ext2 and the others are ext3.

It looks like that it can boot to the prompt from the compact flash but then fails to recognize it as an IDE device when GRUB starts. I'm not sure if it's initializing too quickly or it's a compatibility issue with the hardware I'm using and the CF card.

I was a newbie to GRUB and bootloaders when I started this but now I understand much more. I'm thinking about trying lilo instead to see if it has the same problem recognizing the IDE device on boot.

Any tips are very appreciated 8).

- Dan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting Installed Fedora off Compact Flash kushalkoolwal Fedora 5 07-11-2005 02:11 PM
Problems booting to a Compact Flash card xedgex Linux - Laptop and Netbook 1 07-17-2004 11:02 AM
Mounting a Compact Flash Card Kyl3 Slackware 3 05-26-2004 06:48 PM
compact flash card reader mindcry Linux - Hardware 45 02-03-2004 08:14 PM
PC Card, compact flash figadiablo Linux - Hardware 0 02-21-2003 08:56 PM


All times are GMT -5. The time now is 01:25 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration