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 06-23-2009, 03:00 PM   #1
Elango
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Rep: Reputation: 0
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
 
Old 06-23-2009, 03:15 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Welcome to LQ!

Quote:
Originally Posted by Elango View Post
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 View Post
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 View Post
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 View Post
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.
 
Old 06-23-2009, 03:26 PM   #3
Elango
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
Old 06-23-2009, 06:38 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Just do a 'fdisk -l' after the system is loaded.
 
Old 06-24-2009, 12:44 PM   #5
Elango
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
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)
 
Old 06-24-2009, 01:41 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,932

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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.
 
Old 06-24-2009, 01:45 PM   #7
Elango
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
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?
 
Old 06-24-2009, 02:31 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,932

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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
 
Old 06-25-2009, 03:19 PM   #9
Elango
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
  


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
Auto Mounting a Windows Drive on Bootup yah0m Linux - Networking 3 07-22-2008 07:58 PM
Auto starting, mounting at bootup 2nd2none Linux - General 5 04-05-2004 10:58 AM
Auto mounting NTFS drive on bootup JellyStones Linux - General 2 02-11-2004 08:37 AM
Mounting drives on bootup! gtxboyracer Linux - Newbie 2 11-03-2003 01:55 PM
Mounting network drives on bootup manderso Linux - Networking 3 12-17-2001 06:16 AM


All times are GMT -5. The time now is 06:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration