distros reducing USB memory size

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
jaydee999
Posts: 47
Joined: Thu Oct 04, 2012 1:40 pm

distros reducing USB memory size

Post by jaydee999 »

Hi

I've been playing around with various distros on the new joggler, loading them as instructed onto USB sticks. As a result I now have two sticks that are reading 61MB and 190MB in size when they should be 1GB and 4GB respectively. I also noticed that the stick that came with it when I bought it is reading 64MB when it should be 4GB. This stick was already like this when I received it. Is there any way to return them to their full state, or are they forever reduced in size? And is there a way to prevent this happening in future, or is it a feature of linux? I don't fancy this happening to every stick I use!

Thanks
jaydee999
Posts: 47
Joined: Thu Oct 04, 2012 1:40 pm

Re: distros reducing USB memory size

Post by jaydee999 »

OK gone into disk management and found the rest of the stick as a separate partition or as unallocated but can't seem to delete or extend any volumes. Will search on other forums.
belias
Posts: 1
Joined: Sat Oct 06, 2012 1:18 pm

Re: distros reducing USB memory size

Post by belias »

You will need to format the usb stick with the HP USB disk format tool. That will remove all partitions and return the usb back to its former state.

Hope that helps
ilovemyjoggler
Posts: 711
Joined: Sun May 13, 2012 4:42 pm

Re: distros reducing USB memory size

Post by ilovemyjoggler »

jaydee999
Posts: 47
Joined: Thu Oct 04, 2012 1:40 pm

Re: distros reducing USB memory size

Post by jaydee999 »

found another one called boot it ng, but will download the HP one as well.
Cheers!
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: distros reducing USB memory size

Post by Juggler »

The joggler distros typically have 3 or more partitions and windows can (normally) only see the first active partition on a removable drive, i.e USB Pen Drive.

A tool I've come across recently that lets you do an awful lot of good stuff in this area is BootICE :

BOOTICE: a boot sector manipulation utility [v0.78 released!] - Page 7 - USB FORMATTING utilities: RMprepUSB, fbinst, etc. - reboot.pro - Page 7
http://reboot.pro/8986/page__st__150

【BOOTICE: 引导扇区维护工具】-(v2012.09.20) - BOOTICE 讨论区 - 启动技术论坛 - iPauly.Com
http://www.ipauly.com/bbs/dispbbs.asp?boardid=2&Id=1

You may have to search around a bit to find a place to download it from. If you want to format a flash drive after it has been partitioned it will let you do that, plus if you want to have a multi-partitioned removable flash drive it will let you select the partition that windows will see. There is a good tutorial around on this and I'll try to fin it and post it here, but it is another topic to what you have raised.

If you put a USB flash drive into a linux machine you will see all the partitions and can do what you wish with them using a partition management tool such as GParted. You could of course boot a live linux distro such as parted magic and do this is you only have windows installed on your PC.

However, the method I've been using for some time on windows and has never failed me is to use a hex editor and just write over the partiton table with zeroes, save that. Eject the drive and reinsert, then windows asks me if I'd like to format and I get the full capacity of the drive in one partition.

HxD is a good hex editor and is free ware :

HxD - Freeware Hex Editor and Disk Editor | mh-nexus
http://mh-nexus.de/en/hxd/

In HxD I open the removable drive, uncheck read only (be careful you get the right drive here). Then write zeroes to the first sector. Save that. No more partition table. Then eject and reinsert and format to the max.

Here's a sample first sector :

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000000E0 04 88 16 2D 06 BE 87 07 E8 8D 00 BE BE 07 31 C0 .ˆ.-.¾‡.è..¾¾.1À
000000F0 B9 04 00 F6 04 80 74 03 40 89 F5 81 C6 10 00 E2 ¹..ö.€t.@‰õ.Æ..â
00000100 F2 48 74 02 CD 18 BF 05 00 BE 1D 06 C7 44 02 01 òHt.Í.¿..¾..ÇD..
00000110 00 66 8B 46 08 66 89 44 08 B8 00 42 8A 16 2D 06 .f‹F.f‰D.¸.BŠ.-.
00000120 CD 13 73 0D 4F 74 49 30 E4 8A 16 2D 06 CD 13 EB Í.s.OtI0äŠ.-.Í.ë
00000130 D8 A1 FE 7D 3D 55 AA 75 37 FA 66 A1 4C 00 66 A3 Ø¡þ}=Uªu7úf¡L.f£
00000140 3F 06 BE 13 04 8B 04 48 89 04 C1 E0 06 8E C0 31 ?.¾..‹.H‰.Áà.ŽÀ1
00000150 FF BE 1D 06 B9 60 00 FC F3 A5 C7 06 4C 00 17 00 ÿ¾..¹`.üó¥Ç.L...
00000160 A3 4E 00 FB 8A 16 2D 06 89 EE FA EA 00 7C 00 00 £N.ûŠ.-.‰îúê.|..
00000170 BE AA 07 E8 02 00 EB FE AC 20 C0 74 09 B4 0E BB ¾ª.è..ëþ¬ Àt.´.»
00000180 07 00 CD 10 EB F2 C3 53 74 61 72 74 20 62 6F 6F ..Í.ëòÃStart boo
00000190 74 69 6E 67 20 66 72 6F 6D 20 55 53 42 20 64 65 ting from USB de
000001A0 76 69 63 65 2E 2E 2E 0D 0A 00 42 6F 6F 74 20 66 vice......Boot f
000001B0 61 69 6C 65 64 00 00 00 00 00 00 00 00 00 80 00 ailed.........€.
000001C0 01 7D 06 FD 3F F7 3D A4 1E 00 7C 26 1E 00 00 01 .}.ý?÷=¤..|&....
000001D0 01 00 06 FE 3F 7C 3F 00 00 00 FE A3 1E 00 00 00 ...þ?|?...þ£....
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............Uª

If you check out details on a classic master boot record :

Master boot record - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Master_boot_record

You can see where the partition table is i.e. :

000001B0 61 69 6C 65 64 00 00 00 00 00 00 00 00 00 80 00 ailed.........€.
000001C0 01 7D 06 FD 3F F7 3D A4 1E 00 7C 26 1E 00 00 01 .}.ý?÷=¤..|&....
000001D0 01 00 06 FE 3F 7C 3F 00 00 00 FE A3 1E 00 00 00 ...þ?|?...þ£....
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............Uª

The first partition starts at 1BE hex and is 16 bytes long.
jaydee999
Posts: 47
Joined: Thu Oct 04, 2012 1:40 pm

Re: distros reducing USB memory size

Post by jaydee999 »

Thanks for the info, juggler. Ran out of time this weekend, but maybe next.
james
Posts: 39
Joined: Mon Oct 10, 2011 7:42 pm

Re: distros reducing USB memory size

Post by james »

+1 for bootice. gets rid of all the partitions to give me my old 8gb stick back

http://www.pendriveapps.com/bootice-par ... ot-sector/
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: distros reducing USB memory size

Post by Juggler »

Below is the first sector of an xubuntu image for the joggler :

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000000000 FA B8 00 10 8E D0 BC 00 B0 B8 00 00 8E D8 8E C0 ú¸..ŽÐ¼.°¸..ŽØŽÀ
000000010 FB BE 00 7C BF 00 06 B9 00 02 F3 A4 EA 21 06 00 û¾.|¿..¹..ó¤ê!..
000000020 00 BE BE 07 38 04 75 0B 83 C6 10 81 FE FE 07 75 .¾¾.8.u.ƒÆ..þþ.u
000000030 F3 EB 16 B4 02 B0 01 BB 00 7C B2 80 8A 74 01 8B óë.´.°.».|²€Št.‹
000000040 4C 02 CD 13 EA 00 7C 00 00 EB FE 00 00 00 00 00 L.Í.ê.|..ëþ.....
000000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000001B0 00 00 00 00 00 00 00 00 8D F5 0C 00 00 00 80 00 .........õ....€.
0000001C0 01 10 0E 03 E0 DF 00 08 00 00 00 E8 01 00 00 00 ....àß.....è....
0000001D0 C1 E0 82 03 E0 FF 00 F0 01 00 00 A0 07 00 00 03 Áà‚.àÿ.ð... ....
0000001E0 E0 FF 83 03 E0 FF 00 90 09 00 00 78 6D 00 00 3F àÿƒ.àÿ.....xm..?
0000001F0 E0 FF 05 3F E0 FF 00 08 77 00 00 40 1F 00 55 AA àÿ.?àÿ..w..@..Uª

This partition table actually has 4 partitions on it, where as the image you will write has only three. I have not changed the first three, just added a fourth extended partition.

The partition table and first partition starts at hex 1BE and is 16 bytes long :
80 00 01 10 0E 03 E0 DF 00 08 00 00 00 E8 01 00

Partition 2, starts at hex 1CE :
00 00 C1 E0 82 03 E0 FF 00 F0 01 00 00 A0 07 00

Partition 3, starts at hex 1DE :
00 03 E0 FF 83 03 E0 FF 00 90 09 00 00 78 6D 00

If you check out :

http://en.wikipedia.org/wiki/Master_boo ... le_entries

it explains exactly what these 16 bytes represent.

I mentioned in an earlier post that I write over the partition table with zeroes and then said the first sector later. The most effective way is to write over the whole of the first sector. When I wrote zeroes over just the partition table, windows got a bit confused and thought the partition table had become corrupted and didn't want to format the USB drive, as there was still other data windows was picking up from the first sector. However, writing zeroes over the whole of the first sector has never caused me any issues in getting windows to think that the drive was unformatted and to allow me to format the whole of the USB flash drive to the full capacity of the drive.
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: distros reducing USB memory size

Post by Juggler »

Just tried BootICE to format a USB stick back with multiple partitions, back to the full size, for the first time and it worked fine. Great piece of software. The boot record options offered are great. I didn't know about some of these prior to playing with BootICE.
frankl
Posts: 4
Joined: Sat Apr 13, 2013 12:52 am

Re: distros reducing USB memory size

Post by frankl »

I found a very quick and easy way to get an SD card (in a USB carrier) back to its full size after using for various loading operations. Just put it into your video camera and 'format'. The camera doesn't know or care about different filing systems it just does it!
Post Reply