[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Formatting second partition on USB flash disk



On Sat, Mar 12, 2005 at 06:31:33PM +0300, Alphonse Ogulla wrote:
> On Fri, 11 Mar 2005 13:51:04 +0100, Andreas Rippl <a.rippl@gmx.net> wrote:
> > On Fri, Mar 11, 2005 at 01:18:13PM +0300, Alphonse Ogulla wrote:
> > > Hi list,
> > > I created 2 partitions of 256mb each in a 512mb USB flash disk using
> > > cfdisk and formartted them as Win95 FAT32 (LBA) and Linux ext2 as
> > > shown below. Whereas I'm able to mount the first partition without any
> > > problem, mount command fails when trying to mount the second partition
> > > with the "wrong fs type..." error.
> > >
> > > atlas:~# cfdisk /dev/sda
> > >
> > > atlas:~# mkfs.vfat -v /dev/sda1
> > > mkfs.vfat 2.8 (28 Feb 2001)
> > > /dev/sda1 has 255 heads and 63 sectors per track,
> > > logical sector size is 512,
> > > using 0xf8 media descriptor, with 530082 sectors;
> > > file system has 2 16-bit FATs and 16 sectors per cluster.
> > > FAT size is 130 sectors, and provides 33111 clusters.
> > > Root directory contains 512 slots.
> > > Volume ID is 42316a7f, no volume label.
> > >
> > > atlas:~# mkfs.ext2 -v /dev/sda2
> > > mke2fs 1.34 (25-Jul-2003)
> > > Filesystem label=
> > > OS type: Linux
> > > Block size=1024 (log=0)
> > > 64512 inodes, 257040 blocks
> > > 12852 blocks (5.00%) reserved for the super user
> > > First data block=1
> > > 32 block groups
> > > 8192 blocks per group, 8192 fragments per group
> > > 2016 inodes per group
> > > Superblock backups stored on blocks:
> > >              8193, 24577, 40961, 57345, 73729, 204801, 221185
> > Not directly related to your question, just a hint:
> > If this is not going to be a system partition, just data, I tend to use
> > the '-m 0' option to mkfs.ext2. As you can see, '12852 blocks (5.00%)
> > reserved for the super user'. That makes a gain of ~12.5Mb of extra
> > space. This reserved space is there in case the filesystem is full,
> > for root to be able to fix things. In fact, I do the same for my /home
> > partition, as 5% of 40Gb....2Gb!!
> > >
> > > Writing inode tables: done
> > > Writing superblocks and filesystems accounting information: done
> > >
> > > This filesystem will be automatically checked every 28 mounts or
> > > 180 days, whichever comes first. Use tune2fs -c or -i to override.
> > >
> > >
> > > atlas:~# mount -t vfat -o rw /dev/sda1 /mnt/usb1
> > >
> > > atlas:~# mount -t ext2 -o rw /dev/sda2 /mnt/usb2
> > > VFS: Can't find ext2 filesystem on dev sd(8,2).
> > > mount: wrong fs type, bad option, bad superblock on /dev/sda2,
> > >            or too many mounted file systems
> > >
> > > Now the question;
> > > What do I need to do in order to use the second partition in my USB
> > > flash disk? Then you may ask - why do I need to do this? So that
> > > whenever I lend out my flash disk to colleagues using windoze, they
> > > wont get to see my stuff on the Linux ext2 partition.
> > >
> > > Thanks & regards.
> > >
> > > --
> > >
> > > Alphonse Ogulla
> > > Nairobi, Kenya
> > > Kenya Linux User Group http://groups.yahoo.com/group/kenyalinux
> > >
> > I remember having similar problems, though not how I exactly solved
> > them. First try ejecting the device and reconnecting. In this way, the
> > partition table gets re-read. If that doesn't help, a good guess is to
> > try and partition (and maybe even format) the device with parted (IIRC
> > it's not in woody though). Also what happens if you make _two_ FAT
> > partitions?
> > 
> I tried formatting both partitions as FAT and experienced exactly the
> same behaviour only that the error this time around was:
> 
> FAT: bogus logical sector size 0
> VFS: Can't find a valid FAT filesystem on dev 08:02
> mount: wrong fs type, bad option, bad superblock on /dev/sda2,
>            or too many mounted file systems.
> 
> Tried even mounting the second partition before the first but no
> change. Neither did ejecting and reconnecting the device help. Funny,
> but I noticed that plugging in the device on a Win2k machine, creates
> a removal drive E: of 256mb capacity :-(
> 
> Has anyone ever used more than one partition on a USB flash disk or is
> this simply impossible?
> 
> -- 
> Rgds, Alphonse Ogulla [ Nairobi, Kenya ] Kenya Linux User Group
> 
Hi Alphonse,

if you have a Windows machine available, one sure path to follow would
be to partition under Windows and then format one partition as ext under
Linux. This approach shouldn't present any problems. Also you _should_
try parted, I seem to remember to remember this being the solution when
I had the same problem...

Hth,
-- 
Andreas Rippl -- GPG messages preferred
                 Key-ID: 0x81073379

Attachment: signature.asc
Description: Digital signature


Reply to: