Author Topic: New versions of fdisk and e2fsprogs  (Read 21122 times)

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
New versions of fdisk and e2fsprogs
« Reply #15 on: September 05, 2004, 03:30:29 pm »
OK, nearly a couple of weeks testing and no real problems then,

My cards are certainly holding up well using ext3 with Cacko, I have been using the cards fairly heavily having been away from home for a week and trying to get Ruby 1.8.1 build from source using dev_img-1.5, therefore I have been creating lots of files (make) and deleting them again (make clean) when things didn't work   , ah well I'm back now and I can try cross compilation... anyway that't not the point the cards do seem stable and I haven't had any reports of any problems to speak of yet (apart from one person with a generally suspect card).

Please, continue to provide feedback as this will help me gain some confidence that the tools are ready to turn into an .IPK for general use.

Regards,

Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
New versions of fdisk and e2fsprogs
« Reply #16 on: September 08, 2004, 07:44:58 am »
*BUMP*

Now available in handy (fairly) IPK version !!

(see first posting in this thread)
« Last Edit: September 08, 2004, 08:42:43 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

eswan

  • Newbie
  • *
  • Posts: 7
    • View Profile
New versions of fdisk and e2fsprogs
« Reply #17 on: September 11, 2004, 04:08:43 pm »
Just picked up a Lexar 512 to replace a dead Sandisk 256. Using Cacko 1.21b, fdisk
reported that the original filesystem was larger than the available space (995 vs 994). Deleted and created a new partition, appeared to work but after a format the partition was gone. Downloaded these new versions and everything worked perfectly. Good Timing! Downloaded and uudecoded on a desktop, 'ipkg-install filename' didn't work, 'ipkg install filename' did.

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
New versions of fdisk and e2fsprogs
« Reply #18 on: September 19, 2004, 06:05:42 pm »
*BUMP*

Now fairly confident that there aren't any real problems with these versions.

If you have the ability to modify the path statement in your .profiles then I would encourage a wider testing audience.

The new version of fdisk particularly seems to have helped a few people out.

- Andy
« Last Edit: September 19, 2004, 06:06:04 pm by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

maslovsky

  • Hero Member
  • *****
  • Posts: 1426
    • View Profile
    • http://my-zaurus.narod.ru
New versions of fdisk and e2fsprogs
« Reply #19 on: September 20, 2004, 03:11:48 am »
Quote
*BUMP*

Now fairly confident that there aren't any real problems with these versions.

If you have the ability to modify the path statement in your .profiles then I would encourage a wider testing audience.

The new version of fdisk particularly seems to have helped a few people out.

- Andy
Great news! This WILL go for sure into the next Cacko ROM...

katufzed

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • http://www.projectgalileo.org.uk
New versions of fdisk and e2fsprogs
« Reply #20 on: September 22, 2004, 07:50:42 am »
Just formatted a PQI 45X 1Gb SD card with no probs.  

(using OZ 3.51 & opie)

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
New versions of fdisk and e2fsprogs
« Reply #21 on: September 23, 2004, 10:12:55 pm »
Ok, I downloaded and installed the package.

Code: [Select]
# which mkfs
/usr/sbin/mkfs
# which fdisk
/usr/sbin/fdisk

I didn't have to change qpe.sh... it looks like it found the files automatically.

I'm kinda' new to this, so forgive me if I missed something obvious.  I'm trying to get my new 1 GB MMC card working on the Zaurus...

In su mode, I type (the card is already unmounted...):

(written by hand.  Forgive the typos)
Code: [Select]
# fdisk /dev/mmcda1

Command (m for help): n
Command action
 Â e  extended
 Â p  primary partition (1-4)
e
Partition number (1-4): 1
First cylinder (1-1005, default 1): 1
Last cylinderor +size or +sizeM or +sizeK (1-1005, default 1005): 1005

Command (m for help): w
The partition table has been altered!

Calling ioct1() to re-read partition table.
Syncing disks.
# mkfs /dev/mmcda1
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
129676 inodes, 253504 blocks
12657 blocks (5.00%) reserved for the super user
First data block=0
8 block groups
32768 blocks per group, 32768 fragments per group
15872 inodes per group
Superblock backups stored on blocks:
 Â       21768, 98304, 163840, 229376

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
# mount /dev/mmcda1
mount: Mounting /dev/mmcda1 on /mnt/card failed: invalid argument

If I eject the card and then reinsert it, the MMC/SD card icon never shows up.

I was hoping to get this working with Fat16/32 (so that my digital camera can also see it, but at this point I don't care and I'll go with E2FS if it means I can finally use my card.

My card is:
Quote
MyFlash
Multi Media Card
1 GB
A DATA
0408AD6

I've been able to format it and write large files to it from my windows laptop using my USB digital camera to host the MMC card.  The Zaurus is able to read from this card and run the movies from it... but it can't seem to write to it, even though Windows appears to via the USB Digital Camera.  I was told to try this fdisk and see if that fixes it, which I did above...

Please help me! (Thanks!)
« Last Edit: September 23, 2004, 10:18:50 pm by TonyOlsen »
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
New versions of fdisk and e2fsprogs
« Reply #22 on: September 24, 2004, 06:11:12 am »
Might be worth deleting all of the existing partitions before you start creating new ones.

Also you could try setting the partition type (type m to see what the command should be).

Other than that, not sure.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
New versions of fdisk and e2fsprogs
« Reply #23 on: September 24, 2004, 08:02:23 am »
Tony,

I would have suggested that you made a primary partition but it shouldn't stop you from doing what you are doing.

Most of the steps look OK, however, I have found that the Z doesn't recognise ext2 or ext3 from the command line mounts without using the -t parameter.

try..

mount -t ext2 /dev/mmcda1 /mnt/card

You should find that suspending the Z with the card in (or inserting the card) causes a mount that works fine.

BTW: If you are using the Cacko 1.21b ROM then I would suggest ext3 is a better choice.

Use..

mke2fs -j /dev/mmcda1

for ext3 - you do need a ROM/Kernel with an ext3 module though.

Also BTW: The default for a new partition type is 82 (Linux) so if you created a completely new partition table it should be correct for ext2/ext3.

I would suggest a new partitioning scheme starting with the 'o' command in fdisk to clear the existing table, create a new primary partition (number 1) that uses the whole card, use the w command to write the table and you are ready to mke2fs.

Final BTW: The version of mke2fs that mkfs is chaining to is not the version from the IPK, it's not showing 1.35, it is showing 1.19. Try using mke2fs instead of mkfs, I think that your mkfs may be linking against a previous version of mke2fs (not sure but there may be one present in the busybox util).

Hope this helps,

- Andy
« Last Edit: September 24, 2004, 10:29:37 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
New versions of fdisk and e2fsprogs
« Reply #24 on: September 24, 2004, 01:29:04 pm »
Quote
Might be worth deleting all of the existing partitions before you start creating new ones.

I did that previously... I just forgot to show it.

Quote
Also you could try setting the partition type (type m to see what the command should be).

"l" if the command to "list known partition types".  It lists 24*4=96 different parition types.  I was looking for FAT16 (so that Windows and my digital camera would be able to read it too), but there appear to half a dozen variations of FAT16 in the list, and I don't know which one it is.

When I load up FDISK, it says:
Code: [Select]
# fdisk /dev/mmcda1
Warning: invalid flad 0x0000 of partition table 5 will be corrected by w(rite)

Command (m for help):

Does that mean that the partition was created incorrectly?

Quote
I would have suggested that you made a primary partition but it shouldn't stop you from doing what you are doing.

I agree.  I should've gone with primary.  I wasn't thinking.  If the partition were on the internal flash then it would have to be extended, but this is a separate card, so it wouldn't have needed to be extended.  I've gone through this whole process maybe a dozen times anyways and I'll probably do it again, so next time I'll make it primary.  

Quote
try..

mount -t ext2 /dev/mmcda1 /mnt/card

Code: [Select]
# mount -t ext2 /dev/mmcda1 /mnt/card
mount: Mounting /dev/mmcda1 on /mnt/card failed: invalid argument

Quote
You should find that suspending the Z with the card in (or inserting the card) causes a mount that works fine.

Suspended and restored the unit and the card still wasn't mounted.  Also tried reinserting it.

I was in SU when I suspended the unit.  Whne it came back on, it said:

Code: [Select]
#
[1]+  Stopped        su
bash-2.05$

I assume that linux doesn't let SU exist through a suspend/restore.  ...but when I type "exit", I have to type it like 3-4 times and it keeps telling me that there are stopped jobs.

Quote
BTW: If you are using the Cacko 1.21b ROM then I would suggest ext3 is a better choice.

I'm still hoping for FAT16... since that's what the digital cameras use and Windows would recognize it.

Quote
Use..

mke2fs -j /dev/mmcda1

for ext3 - you do need a ROM/Kernel with an ext3 module though.

Is there a FAT16 solution?  Which MKFS command is used for FAT16?  (I couldn't find a good format command for it)

Quote
I would suggest a new partitioning scheme starting with the 'o' command in fdisk to clear the existing table, create a new primary partition (number 1) that uses the whole card, use the w command to write the table and you are ready to mke2fs.

Final BTW: The version of mke2fs that mkfs is chaining to is not the version from the IPK, it's not showing 1.35, it is showing 1.19. Try using mke2fs instead of mkfs, I think that your mkfs may be linking against a previous version of mke2fs (not sure but there may be one present in the busybox util).

Code: [Select]
# fdisk /dev/mmcda1
Warning: invalid flad 0x0000 of partition table 5 will be corrected by w(rite)

Command (m for help): o
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 flad 0x0000 of partition table 5 will be corrected by w(rite)

Command (m for help): n
Command action
  e  extended
  p  primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1005, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1005, default 1005): 1005

Command (m for help): p

Disk /dev/mmcda1: 1038 MB, 1038352896 bytes
32 heads, 63 sectors/track, 1005 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes

       Device Boot      Start         End     Blocks      Id     System
/dev/mmcda1p1       1             1005    1013008+ 83    Linux

Command (m for help):

Ah.... I just I've figured out something... I need to now change the System ID of the partition from "Linux" to somehting else...  I'll try FAT16 (ID: 6).

Code: [Select]
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 6
Changed system type of partition 1 to 6 (FAT16)

Command (m for help): w
The partition table has been altered!

Calling ioct1() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
#

Ok... now how do I format it to 1 GB FAT16 in the terminal?

Code: [Select]
# mkfs.vfat /dev/mmcda1
mkfs.vfat 2.8 (28 Feb 2001)
# mount /dev/mmcda1
#

The card shows up!      

Code: [Select]
bash-2.05$ cd /mnt/card
bash-2.05$ mkdir test
mkdir: Cannot create directory 'test': Read-only file system
bash-2.05$

We've now come in full circle.  This is what I got previously when I put the card in the Zaurus directly from the having formated it in my Digital Camera (via Windows).

Why does Linux think this is a read-only file system?  I think THAT might be the real problem here...  Did I choose the wrong Partition type?  (If so, which FAT16 in the long list should I have chosen?).  ...Does the Zaurus work with Fat16 MMC/SD cards?... or is everyone going to EXT2/3?

Also, what's the advantage of EXT2/3 over FAT16?  Does it have a journaling filesystem?  What else?

Thanks for your help!!    
« Last Edit: September 24, 2004, 01:50:41 pm by TonyOlsen »
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
New versions of fdisk and e2fsprogs
« Reply #25 on: September 24, 2004, 01:47:04 pm »
Quote
Is there a FAT16 solution?  Which MKFS command is used for FAT16?  (I couldn't find a good format command for it)
Code: [Select]
mkfs.msdos
Greg

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
New versions of fdisk and e2fsprogs
« Reply #26 on: September 24, 2004, 02:10:39 pm »
Quote
Did I choose the wrong Partition type? (If so, which FAT16 in the long list should I have chosen?). ..
Just in case you need it...
6
(will select Fat-16 in fdisk)

Greg

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
New versions of fdisk and e2fsprogs
« Reply #27 on: September 24, 2004, 02:12:31 pm »
Quote
mkfs.msdos

Code: [Select]
# umount /dev/mmcda1
# mkfs.msdos /dev/mmcda1
mkfs.msdos 2.8 (28 Feb 2001)
mkfs.msdos: Attempting to create a too large file system
#

   I think that mkfs.msdos is FAT12 and mkfs.vfat is FAT16.

...but why is my VFAT partition set up as read-only?  Why?  Do I need to do something with CHMOD or something?    

Thanks.
« Last Edit: September 24, 2004, 02:13:13 pm by TonyOlsen »
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
New versions of fdisk and e2fsprogs
« Reply #28 on: September 24, 2004, 02:31:16 pm »
Here Tony, I had some trouble finding this:
http://www.zaurususergroup.com/modules.php...20for%20newbies

Hope it helps

Greg

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
New versions of fdisk and e2fsprogs
« Reply #29 on: September 24, 2004, 04:12:27 pm »
Quote
# fdisk /dev/mmcda1

I note you keep writing this, hopefully it's just a typo, as it should be this:

fdisk /dev/mmcda

as mmcda1 is a partition and fdisk works on the device.

umount and mkfs.* work on partitions, so in these cases mmcda1 is correct.


Si

P.S.

Quote
I'll try FAT16 (ID: 6).

BTW this is the right one to use.
« Last Edit: September 24, 2004, 04:13:46 pm by lardman »
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva