Bug#511679: installation-guide-i386: Provide information on how to restore USB stick to its previous state
Otavio Salvador a écrit :
> Hello,
>
> On Sun, Nov 15, 2009 at 7:01 AM, M.-A. DARCHE <ma.darche@cynode.org> wrote:
>>> parted mklabel <your usbstick> msdos
>>>
>> $ LC_ALL=C sudo parted mklabel /dev/sdb msdos
>> Error: Could not stat device mklabel - No such file or directory.
>> Retry/Cancel?
>
> Sorry, my fault.
>
> parted /dev/sdb mklabel msdos
>
> You can use:
>
> parted /dev/sdb mkpart
>
> To create a partition on it. After that you'll need to format it later.
>
Here are the operations below:
$ sudo parted /dev/sdb mklabel msdos
Warning: The existing disk label on /dev/sdb will be destroyed and all
data on this disk will be
lost. Do you want to continue?
parted: invalid token: msdos
Yes/No? yes
New disk label type? [msdos]?
Information: You may need to update /etc/fstab.
$ sudo parted /dev/sdb mkpart primary fat32 0 1041
Information: You may need to update /etc/fstab.
[I have tried different values for end, and 1041 is the highest
that is accepted. Otherwise I get error message such as:
Error: The location 1042 is outside of the device /dev/sdb.]
$ /sbin/fdisk -l /dev/sdb
Disk /dev/sdb: 1040 MB, 1040187392 bytes
118 heads, 55 sectors/track, 313 cylinders
Units = cylinders of 6490 * 512 = 3322880 bytes
Disk identifier: 0x000810f9
Device Boot Start End Blocks Id System
/dev/sdb1 1 314 1015807+ c W95 FAT32 (LBA)
Partition 1 has different physical/logical endings:
phys=(126, 117, 55) logical=(313, 4, 26)
$ mount /media/usb
$ df
/dev/sdb1 991M 4,0K 991M 1% /media/usb
The capacity is still < of the original 2Gb :-(
Thanks again for your help and giving me this hint on parted.
Cheers,
--
Marc-Aurèle DARCHE
AFUL http://www.aful.org/
Association Francophone des Utilisateurs de Logiciels Libres
French speaking Libre Software Users' Association
Reply to: