Re-partition USB key
Antonio T. Sun
antoniosun-N9AOi2cAC9ZBDgjK7y7TUQ at public.gmane.org
Wed Sep 9 22:39:37 UTC 2009
On Wed, 09 Sep 2009 22:24:19 +0000, Antonio T. Sun wrote:
> Hi,
>
> I re-partitioned my USB key using gparted, but I'm having a hard time
> trying to make my mount know the changes.
>
> This is what it was before:
>
> $ sfdisk -l -uM
>
> Disk /dev/sdb: 499 cylinders, 255 heads, 63 sectors/track Units =
> mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from
> 0
>
> Device Boot Start End MiB #blocks Id System
> /dev/sdb1 0+ 807- 808- 827316 6 FAT16 /dev/sdb2 *
> 807+ 1796- 989- 1012095 83 Linux /dev/sdb3 1796+ 2784-
> 989- 1012095 83 Linux /dev/sdb4 2784+ 3914- 1130-
> 1156680 83 Linux
>
> This is what it is now:
>
> $ sfdisk -l -uM /dev/sdb
>
> Disk /dev/sdb: 499 cylinders, 255 heads, 63 sectors/track Units =
> mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from
> 0
>
> Device Boot Start End MiB #blocks Id System
> /dev/sdb1 0+ 807- 808- 827316 6 FAT16 /dev/sdb2 *
> 807+ 3208- 2401- 2457945 83 Linux /dev/sdb3 3208+ 3914-
> 706- 722925 83 Linux /dev/sdb4 0 - 0
> 0 0 Empty
>
> Now watch:
>
> % mount /dev/sdb2 /mnt/tmp2/
>
> $ df | grep sdb
> /dev/sdb2 996148 1464 944080 1% /mnt/tmp2
>
> % umount /dev/sdb2
>
> $ sfdisk -V /dev/sdb
> /dev/sdb: OK
>
> I.e., when I mount the newly-changed 2G sdb2, 'mount' still gives me a
> 989M disk. I've unplugged and replugged the USB key several times, and
> even replugged to different USB port, but still NOK. Why?
Ah, found it.
gparted used to format the created disks. For some reasons, it stops
doing so, at least from the version that I'm using:
$ apt-cache policy gparted
gparted:
Installed: 0.4.5-2
Candidate: 0.4.5-2
*** 0.4.5-2 0
300 http://debian.mirror.rafal.ca testing/main Packages
100 /var/lib/dpkg/status
Using mkfs.ext2 to format the created disk (/dev/sdb2) solve the problem.
Antonio
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list