LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-19-2005, 04:48 PM   #1
Alotau
Member
 
Registered: Jan 2005
Location: Fremont, CA
Distribution: Red Hat 9
Posts: 58

Rep: Reputation: 15
Unhappy Mounting at boot time... troubles


My first post here, be gentle!

I am trying to mount a partition at boot time. The distro that I am using is MontaVista which is booting off of a FlashDrive on a rather bare-ish board with a PPC 405. The HD is connected via IDE. I think I did all the fdisk and mkfs stuff correctly. During boot I get a message like this (by the way, if it matters, I am interfacing with the board via HyperTerminal on a Win2k machine):

Mounting local filesystems...
mount: you didn't specify a filesystem type for /dev/hdc3
I will try all types mentioned in /etc/filesystems or /proc/filesystems
Trying msdos
mount: special device /dev/hdc3 does not exist



The entry in fstab is this:

/dev/hdc3 /mnt/hd auto auto,sync,rw,exec 0 2



And the part that confuses me the most is that I can mount it after booting with no complaints:

root@ml310:~# mount (see what's mounted)
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
tmpfs on /dev/shm type tmpfs (rw)
root@ml310:~# mount -a (mount everything in fstab)
root@ml310:~# mount (now see that it actually mounted hd3)
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hdc3 on /mnt/hd type ext2 (rw,sync)



Any advice? I can tell you other stuff if it helps diagnose the problem. I am very new to this... thanks in advance.
 
Old 01-19-2005, 06:04 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
The entry in fstab is this:
/dev/hdc3 /mnt/hd auto auto,sync,rw,exec 0 2

You don't specify the file system type in your fstab.

You may also want to add owner, user or users to allow who is allowed to mount it. Manually that would be something like.

mount -t ext3 /dev/hdc3 /mnt/hd auto users rw exec 0 2

You can get info on commands in the man pages
At a konsole or shell type (for the mount command)
man mount
also
mount --help
 
Old 01-19-2005, 06:08 PM   #3
Alotau
Member
 
Registered: Jan 2005
Location: Fremont, CA
Distribution: Red Hat 9
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by teckk
The entry in fstab is this:
/dev/hdc3 /mnt/hd auto auto,sync,rw,exec 0 2

You don't specify the file system type in your fstab.

Thanks for the reply. For the filesystem type I have 'auto'... not good enough? Also, mount works fine after booting with that given fstab entry. Anything else to look for/try?
 
Old 01-19-2005, 06:33 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
/dev/hdc3 on /mnt/hd type ext2 (rw,sync)
According to your mount command output, /dev/hdc3 uses the ext2 file system.

Change the 'auto' in the 3rd column of your fstab entry to 'ext2'.

I would prefer using ext3 over ext2 myself. If you haven't stored anything on it yet, you may want to change it.
 
Old 01-19-2005, 06:43 PM   #5
Alotau
Member
 
Registered: Jan 2005
Location: Fremont, CA
Distribution: Red Hat 9
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jschiwal
According to your mount command output, /dev/hdc3 uses the ext2 file system.

Change the 'auto' in the 3rd column of your fstab entry to 'ext2'.

I would prefer using ext3 over ext2 myself. If you haven't stored anything on it yet, you may want to change it.
Ok, I had tried changing it to ext2 before, but tried again to get the following output during boot:


Checking all file systems...
fsck 1.27 (8-Mar-2002)
fsck.ext2: No such file or directory while trying to open /dev/hda1
/dev/hda1:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>


fsck failed. Please repair manually.

CONTROL-D will exit from this shell and continue system startup.

Give root password for maintenance
(or type Control-D for normal startup):




After continuing normal startup and logging on, the first thing I did (for illustration of my frustration) was mount (to display), mount -a (to mount everything), then mount again to display what's there. Here is what I got:

root@ml310:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
tmpfs on /dev/shm type tmpfs (rw)
root@ml310:~# mount -a
root@ml310:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /mnt/hd type ext2 (rw,sync)



It is fine mounting it after booting. Help!
In response to using ext3 instead of ext2, I don't see how to set that in fdisk. The only options are things like "Linux" or "Linux swap", no actual ext2 or ext2 options. Am I missing something? Is it just this distro (MontaVista)? Any further advice appreciated!
 
Old 01-19-2005, 07:42 PM   #6
Alotau
Member
 
Registered: Jan 2005
Location: Fremont, CA
Distribution: Red Hat 9
Posts: 58

Original Poster
Rep: Reputation: 15
Nobody?
 
Old 01-20-2005, 06:52 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The fdisk program only sets up the partition. The /sbin/mkfs.ext3 program actually creates the file system.

Here is a webpage with a step-by-step guide on exactly what you want to do.

http://www.idevelopment.info/data/Un...ive_ext3.shtml
I'm not sure if the 4096 block size is what you want. Try to find out what it is for your other ext3 partition and use the same thing.

You might want to punt and start over.

Last edited by jschiwal; 01-20-2005 at 06:54 PM.
 
Old 01-20-2005, 07:12 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
Can you post any links on the board and the MontaVista home page?

Just a SWAG but it sounds similar to some distros and trying to mount USB drives at boot. When the OS attempts to mount the drive via the fstab the modules are not loaded yet and therefore the device does not exist yet. Of course once the system is fully booted you can manually mount the drive.

If this distro uses an intrd (initial ram disk) you can add the IDE module or you can recompile the kernel with IDE support. I haven't played around with the boot process to be able to tell you how to load the modules prior to mounting partitons via fstab.
 
Old 01-20-2005, 07:35 PM   #9
Alotau
Member
 
Registered: Jan 2005
Location: Fremont, CA
Distribution: Red Hat 9
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jschiwal
The fdisk program only sets up the partition. The /sbin/mkfs.ext3 program actually creates the file system.
Here is a webpage with a step-by-step guide on exactly what you want to do.
Thanks for the link. It goes through all the steps I have already taken though. Except I used mkfs instead of mkfs.ext3 . Sounds like michaelk might be a little closer to what the prob might be. I suspect for some reason the OS doesn't know about my HD yet and can't mount it (because it does mount after boot just fine). IS there a way for me to check if that is the case? Can I look at some sort of boot log somewhere that would shed some light? Any more advice? I am very grateful for any tips...
Quote:

You might want to punt and start over.
I wouldn't want to mess with the CompactFlash that came with the OS loaded (with other things as well). Maybe in a couple months I might be so bold!

Michael, I am not sure what you were asking about MontaVista/board website? It is a Xilinx board: ML310 . But there isn't much direct help about Linux issues there. The MontaVista website wasn't too useful to me either.

Thanks again for any further advice...
 
Old 01-20-2005, 08:01 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
Just curious on what type of embedded board you were using.

See if you have a /var/log/messages file. This might show some messages as well as the output of the dmesg command.

I wouldn't know how much an embedded distro varies from an Intel PC distro.

In most "regular" distros there is a /etc/rc.local boot script which is the last to execute. A simple fix if this exists would be to add the mount command to this file.
 
Old 01-20-2005, 08:15 PM   #11
Alotau
Member
 
Registered: Jan 2005
Location: Fremont, CA
Distribution: Red Hat 9
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by michaelk
See if you have a /var/log/messages file. This might show some messages as well as the output of the dmesg command.
There is a messages file... it is pretty big and seems to have all kinds of junk in it, not sure what I am looking for there.

Quote:
Originally posted by michaelk
In most "regular" distros there is a /etc/rc.local boot script which is the last to execute. A simple fix if this exists would be to add the mount command to this file.
The closest thing resembling what you mention is a directory called rc.d in etc. Its contents look like this:

root@ml310:/etc# cd rc.d
root@ml310:/etc/rc.d# ls
init.d rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rcS.d

Any ideas where I might poke to find where to add a mount command? Or any other ideas? Thanks again...
 
Old 01-20-2005, 08:43 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
rc.local is a file in the /etc directory. rcx.d should be directories.
 
Old 01-20-2005, 09:00 PM   #13
Alotau
Member
 
Registered: Jan 2005
Location: Fremont, CA
Distribution: Red Hat 9
Posts: 58

Original Poster
Rep: Reputation: 15
Nothing named rc.local in etc (or anywhere else as far as I can tell). What tells Linux (on a reg. distro) to run the commands in this file? Can I make a mod there that runs mount as the last thing before login?
 
Old 01-22-2005, 05:47 AM   #14
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
My suggestion to start over refered to the hard drive partitioning and formatting and not the entire installation. What version of MontaVista are you using. Before version 1.2, the ext3 filesystem wasn't supported, but the reiserfs was. Perhaps you could try using reiserfs instead.

Another Idea is to look in the manpage for 'ld.so.conf' and 'ld.conf'.
If the ext3 filesystem support is a module rather than being built into the kernel, then an entry in /etc/ld.so.preload may cause the ext3 kernel module to be loaded before the drives are mounted.

If this doesn't work, you may need to produce an initrd file containing the kernel module.
 
  


Reply



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
Mounting a nfs partition on boot time wjleon Linux - Newbie 1 05-02-2005 11:12 AM
Mounting Removable Disk That's Not Plugged In At Boot Time Superman53 Linux - Laptop and Netbook 3 10-21-2004 06:57 AM
mounting troubles ahimsel08 Linux - Hardware 16 06-27-2004 08:28 AM
Swap File mounting at boot time sneakerski Arch 2 08-20-2003 09:28 PM
Error Mounting a boot time aarroyob Linux - Newbie 3 06-06-2003 02:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:41 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
Open Source Consulting | Domain Registration