Problem to save file on the hard disk! What I have to set to do it ?
Thomas Doerfler (nt)
Thomas.Doerfler at imd-systems.de
Wed Mar 15 06:43:20 UTC 2006
Yan, Matteo,
Yan Luo schrieb:
> Hello Matteo and Thomas,
>
> I am also trying to use the fileio.
>
> For Matteo's problem, I suggest checking whether /mnt/hda1 is present
> before mounting. If I understand correctly, the IMFS does not contain
> /mnt or /mnt/hda1 by default.
The function rtems_fsmount will create these directories according to
the data structure with the mounting information.
>
> I am facing another problem. The "rtems_ide_part_table_initialize
> (devname)" hangs without returning. Any idea ?
Hm, this sounds, as if reading of the partition table hangs. What kind
of interface do you have to connect your harddisk? RTEMS currently only
supports a standard IDE interface (no SCSI, no SATA...). And it asumes,
that the harddisk is connected as Master to the primary IDE interface. I
should have mentioned this before :-(
wkr,
Thomas.
>
> Here is my 'fdisk -l /dev/hda'
>
> Disk /dev/hda: 3253 MB, 3253469184 bytes
> 128 heads, 63 sectors/track, 788 cylinders
> Units = cylinders of 8064 * 512 = 4128768 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hda1 1 400 1612768+ b W95 FAT32
> /dev/hda2 401 580 725760 83 Linux
> /dev/hda3 581 787 834624 82 Linux swap/Solaris
>
> I also tried FAT16 on /dev/hda1. I can create files on hda1 under
> linux. I am using rtems-4.6.5.
>
> Thanks,
> Yan
>
> On Mar 14, 2006, at 2:23 PM, Thomas Doerfler (nt) wrote:
>
> Matteo,
>
> one other question:
>
> After reading the partition table, the "fileio" sample will print a
> result code. Can you tell me what is printed there as a result?
>
> wkr,
> Thomas.
>
> Matteo schrieb:
>
>>>> I have two FAT partition;
>>>> - one is hda2, is for " windows xp " and is FAT32(is about 20GB),
>>>> - another one is hda1, is a free memory FAT16(is about 2.8 GB).
>>>> I can mount hda2 and hda1 and write a file on them without problem.
>>>>
>>>> What's the problem about your opinion?
>>>> May be I have to set some special options in my Grub(my linux
>>>> bootloader) when I
>>>> have to launch the example?
>>>>
>>>> Really thanks in advance.
>>>>
>>>> Matteo
>>>>
>>>>
>>>>
>>>> Scrive "Thomas Doerfler (nt)" <Thomas.Doerfler at imd-systems.de>:
>>>>
>>>>
>>>>> Matteo,
>>>>>
>>>>> it really looks like a difficult case to me :-((
>>>>>
>>>>> What is confusing me: Your FAT partition has a size of about 20GB.
>>>>> This
>>>>> is MUCH to big for a FAT16 partition, so I would guess, that a program
>>>>> that is asked to format the disk should complain about this.
>>>>>
>>>>> In your last posts, you have sent me information about what is written
>>>>> in the partition table for partition hda1. For clarity, I have to ask
>>>>> again: did you also:
>>>>>
>>>>> - format the partition
>>>>> - mount it under linux to some mount point
>>>>> - write files to it
>>>>>
>>>>> and everything without problems?
>>>>>
>>>>> wkr,
>>>>> Thomas.
>>>>>
>>>>>
>>>>> Matteo schrieb:
>>>>>
>>>>>> Thomas,
>>>>>>
>>>>>> Yes I can access to windows from linux.
>>>>>> I created hda1 using gparted formatting hda1 as FAT16.
>>>>>> Infact if I use gparted, like you can see, it says that is FAT16,
>>>>>> but if I
>>>>>
>>>>>
>>>>> use
>>>>>
>>>>>> only "cfdisk" says that is only linux.
>>>>>> I try to see my memory using also qtparted and It says me that
>>>>>> hda1 is
>>>>>
>>>>>
>>>>> FAT16
>>>>>
>>>>>> partition.
>>>>>> I don't know why "cfdisk -l /dev/hda" don't shows that hda1 is FAT16.
>>>>>> But both gparted both qtparted program shows that hda1 is a FAT16 !
>>>>>>
>>>>>> Have you some idea about my problem ?
>>>>>>
>>>>>> Really Thanks in advance
>>>>>>
>>>>>> Matteo
>>>>>>
>>>>>>
>>>>>> Scrive "Thomas Doerfler (nt)" <Thomas.Doerfler at imd-systems.de>:
>>>>>>
>>>>>>
>>>>>> Matteo,
>>>>>>
>>>>>> I am a bit confused, your listing shows, that /dev/hda1 is a Linux
>>>>>> ext3
>>>>>> partition, but you write that gparted shows it as FAT16. But /
>>>>>> dev/hda2
>>>>>> looks fine in the partition table. can you access the filesystem on
>>>>>> /dev/hda2 from linux?
>>>>>>
>>>>>> Thomas.
>>>>>>
>>>>>> Matteo schrieb:
>>>>>>
>>>>>>
>>>>>>> Ok this is the result of the command "fdisk -l /dev/hda"
>>>>>>
>>>>>>
>>>>>>> Disk /dev/hda: 40.0 GB, 40007761920 bytes
>>>>>>> 255 heads, 63 sectors/track, 4864 cylinders
>>>>>>> Units = cilindri of 16065 * 512 = 8225280 bytes
>>>>>>
>>>>>>
>>>>>>> Dispositivo Boot Start End Blocks Id System
>>>>>>> /dev/hda1 2678 3014 2706952+ 83 Linux
>>>>>>> /dev/hda2 1 2677 21502971 c W95 FAT32
>>>>>>> (LBA)
>>>>>>> /dev/hda3 3015 4784 14217525 83 Linux
>>>>>>> /dev/hda4 4785 4864 642600 5 Esteso
>>>>>>> /dev/hda5 4785 4864 642568+ 82 Linux swap /
>>>>>>
>>>>>>
>>>>>> Solaris
>>>>>>
>>>>>>
>>>>>>
>>>>>>> looking with gparted I have the result that, hda1 is "FAT16",
>>>>>>> hda2 is
>>>>>>
>>>>>>
>>>>>> "FAT32",
>>>>>>
>>>>>>
>>>>>>> hda3 is "ext3", hda4 is "exetended", hda5 is "linux swap".
>>>>>>
>>>>>>
>>>>>>> I created hda1 with FAT16 thinking to resolve the problem, but
>>>>>>> from the
>>>>>>
>>>>>>
>>>>>> fileio
>>>>>>
>>>>>>
>>>>>>> example I have always the same error,
>>>>>>> " fsmount: mounting of "/dev/hda1" to "/mnt/hda1" failed: No such
>>>>>>> file or
>>>>>>> directory " but now hda1 is FAT16 so it could be right for RTEMS,
>>>>>>> but it
>>>>>>
>>>>>>
>>>>>> isn't.
>>>>>>
>>>>>>
>>>>>>> Why ?
>>>>>>
>>>>>>
>>>>>>> Can you help me ?
>>>>>>
>>>>>>
>>>>>>> Thanks advanced
>>>>>>
>>>>>>
>>>>>>> MAtteo
>>>>>>
>>>>>>
>>>>> --
>>>>> --------------------------------------------
>>>>> IMD Ingenieurbuero fuer Microcomputertechnik
>>>>> Thomas Doerfler Herbststrasse 8
>>>>> D-82178 Puchheim Germany
>>>>> email: Thomas.Doerfler at imd-systems.de
>>>>> PGP public key available at:
>>>>> http://www.imd-systems.de/pgpkey_en.html
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>
>
> --
> --------------------------------------------
> IMD Ingenieurbuero fuer Microcomputertechnik
> Thomas Doerfler Herbststrasse 8
> D-82178 Puchheim Germany
> email: Thomas.Doerfler at imd-systems.de
> PGP public key available at:
> http://www.imd-systems.de/pgpkey_en.html
--
--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: Thomas.Doerfler at imd-systems.de
PGP public key available at:
http://www.imd-systems.de/pgpkey_en.html
More information about the users
mailing list