LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with mounting CF card during bootup (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-mounting-cf-card-during-bootup-735054/)

Elango 06-23-2009 02:00 PM

Problem with mounting CF card during bootup
 
Hi everyone.I am new to Linux and am currently working in an Arcom VIPER processor. This processor has a Linux OS in its flash memory and to increase memory, there is a slot for CF card. The Linux kernel version is 2.6.11.11 if that is of any help.

Now i referred a lot in this forums and implemented these things

1. I was able to mount the CF card by using the mount command
2. I changed the /etc/fstab file to automount the CF card during bootup
But during bootup, the following message is printed when the mounting of the CF card occurs,
mount /dev/hda1 is not a valid block device
mount /dev/hda2 is not a valid block device
mount /dev/hda3 is not a valid block device

3. Once the bootup is finished, i am able to mount the device though. Then i tried finding the /etc/rc.local or rc.d (in some other version) to include the mount during bootup but in this version it has rc0.d to rc6.d and a rcS.d

And finally fdisk /dev/hda3 gives me the following message
The number of cylinders for this disk is set to 15331.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problem with:
1) software that runs at boot time (eg old versions of LILO)
2) booting and partitioning software from other OSs
(eg DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

I am wondering if this could be the problem. If so what is the solution to mount the card during bootup?

Thanks in advance,
Elango

onebuck 06-23-2009 02:15 PM

Hi,

Welcome to LQ!

Quote:

Originally Posted by Elango (Post 3583662)
Hi everyone.I am new to Linux and am currently working in an Arcom VIPER processor. This processor has a Linux OS in its flash memory and to increase memory, there is a slot for CF card. The Linux kernel version is 2.6.11.11 if that is of any help.

Boy it has to be tight working in the processor. :)

Quote:

Originally Posted by Elango (Post 3583662)
Now i referred a lot in this forums and implemented these things

1. I was able to mount the CF card by using the mount command
2. I changed the /etc/fstab file to automount the CF card during bootup
But during bootup, the following message is printed when the mounting of the CF card occurs,
mount /dev/hda1 is not a valid block device
mount /dev/hda2 is not a valid block device
mount /dev/hda3 is not a valid block device

Post your '/etc/fstab'.

Quote:

Originally Posted by Elango (Post 3583662)
3. Once the bootup is finished, i am able to mount the device though. Then i tried finding the /etc/rc.local or rc.d (in some other version) to include the mount during bootup but in this version it has rc0.d to rc6.d and a rcS.d

Your 'rc.local' would not be in '/etc'.

Quote:

Originally Posted by Elango (Post 3583662)
And finally fdisk /dev/hda3 gives me the following message
The number of cylinders for this disk is set to 15331.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problem with:
1) software that runs at boot time (eg old versions of LILO)
2) booting and partitioning software from other OSs
(eg DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

I am wondering if this could be the problem. If so what is the solution to mount the card during bootup?

Thanks in advance,
Elango

Basically you should be able to include the information within your '/etc/fstab' to allow the mount. That is why you should post your '/etc/fstab' so you can be assisted.

Elango 06-23-2009 02:26 PM

My /etc/fstab is as follows

#device mount point type flags dump pass
/dev/mtdblock2 / jffs2 defaults 0 0
tmpfs /var/tmp tmpfs defaults,size =4M 0 0
/dev/hda1 /usr/cflashcard ext3 defaults 0 0
/dev/hda2 /var/cflashcard ext2 defaults 0 0
/dev/hda3 /home/cflashcard ext2 defaults 0 0


Just so you know i gave the mount command after hda1,2 and 3 were mounted to find out their types to specify in fstab.

Elango

onebuck 06-23-2009 05:38 PM

Hi,

Just do a 'fdisk -l' after the system is loaded.

Elango 06-24-2009 11:44 AM

An initial fdisk -l gives nothing.

After the device (hda1,hda2 and hda3) are mounted or after i give a fdisk /dev/hda1 or /dev/hda2 or /dev/hda3, it returns

Disk /dev/hda: 8195 MB, 8195604480 bytes
255 heads, 63 sectors/track, 996 cylinders
units = cylinders of 16065*512 = 8225280 bytes

Device Boot start End Blocks ID System
/dev/hda1 1 17 136521 83 Linux
/dev/hda2 18 34 136552+ 83 Linux
/dev/hda3 35 996 7727265 83 Linux.

and BTW fdisk /dev/hda1 and fdisk /dev/hda2 both return
Device contains neither a valid DOS partition table, not Sun, SGI or OSF disklabel. Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

michaelk 06-24-2009 12:41 PM

You can not specify a partition (no hda1 etc) with the fdisk utility i.e. only /dev/hda, /dev/sda etc. Without knowing anything about the embedded OS it is difficult to say where the problem lies. Typically in the start up sequence the OS tries to mount filesystems in the /etc/fstab prior to any modules loading. So this is probably why your seeing the invalid block device message. You can create start up script in the appropriate rc directory that runs last that would work just like a rc.local.

Elango 06-24-2009 12:45 PM

Any specific file? I am entirely new to Linux so i do not know what file would be the correct. so any clue to identify? and will a mount command in that file be enough?

michaelk 06-24-2009 01:31 PM

Here is some quick info. Do you have an init.d directory? There are lots of linux distributions and the startup scripts differ between them. We have no idea on details for this embedded system so it is hard to provide specific information. If you look in rc2.d (for example), scripts start in numeric order starting with S00 which is where you would want this script to run. Typically init.d directory contains the actual script and the rcx.d directory contains a link (SXX) to the init.d file. The mount command would be enough.

http://www.linux.com/news/enterprise...nd-rcd-scripts

Elango 06-25-2009 02:19 PM

Sorry for the delayed reply. I was caught up with another bigger problem and so i have stopped working on this and wont resume until after two weeks or so. So will try then. Thanks for the tutorial


All times are GMT -5. The time now is 06:35 PM.