Kodi Community Forum

Full Version: ATV disk resize media partition
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well here is the story. I've bought broken AppleTV over eBay (it was disk error).
So i have repaired now everything and have build a new disk with dd ("dd if=smallatv.dmg of=\\?\Device\HarddiskX\Partition0 bs=1M --progress") on windows and image of ATV 2.0.2 (smallatv.dmg).

Well to be short everything is working now but only one thing is still bothering me. In my ATV i have 160GB disk an on apple tv i see only 32GB.
So i did the Factory Restore as suggested, but this did not helped.

Is there any way to resize the media partition on windows system? Everywhere are people talking about how to do this on mac but i do not have mac so i'm stuck with windows.

TNX in forward
illiac4 Wrote:Well here is the story. I've bought broken AppleTV over eBay (it was disk error).
So i have repaired now everything and have build a new disk with dd ("dd if=smallatv.dmg of=\\?\Device\HarddiskX\Partition0 bs=1M --progress") on windows and image of ATV 2.0.2 (smallatv.dmg).

Well to be short everything is working now but only one thing is still bothering me. In my ATV i have 160GB disk an on apple tv i see only 32GB.
So i did the Factory Restore as suggested, but this did not helped.

Is there any way to resize the media partition on windows system? Everywhere are people talking about how to do this on mac but i do not have mac so i'm stuck with windows.

TNX in forward

use a patchstick to boot into atv-bootloader.
use parted to remove then add back a media partition with the larger size.
use "mkfs.hfsplus -J -v Media" to format the new media partition.

reboot and factory restore, the AppleTV will repopulate the Media partition.

See http://code.google.com/p/atv-bootloader/wiki/ATVBackup -> Opps I did not make a backup
TNX will do some reading. HMMM. I think i will build myself a hackintosh because it will be easier, like i did once, because there are so many tutorials out there for mac and almost none for windows.

Is there already somewhere premade image of ATV-Bootloader on USB flash disk? I know it's stupid question but well...... Smile
Hi!

One more question. I was looking for livecd with that i could do the things that davilla suggested. Of course i'd take the drive out of ATV and managed it on ps with help of one of the livecd.

I have found some on net like Parted Magic LiveCD 4.4 or. GParted Live. Will i'll be able to do this things with help of one of these live cd?

TNX
illiac4 Wrote:Hi!

One more question. I was looking for livecd with that i could do the things that davilla suggested. Of course i'd take the drive out of ATV and managed it on ps with help of one of the livecd.

I have found some on net like Parted Magic LiveCD 4.4 or. GParted Live. Will i'll be able to do this things with help of one of these live cd?

TNX

Does not exist, just make a usb patchstick like everyone else does.
Solved. TNX
illiac4 Wrote:Hi!

I've made the atv-bootloader and have removed the partition 4
#parted
#rm 4
------------
Model: ATA WDC WD1200BEVE-0 (scsi)
Disk /dev/sda: 234441648s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 40s 69671s 69632s fat32 primary boot
2 69672s 888871s 819200s hfs+ primary atvrecv
3 888872s 2732071s 1843200s hfs+ primary
4 2732072s 78140126s 75408055s hfs+ primary
---------
after that i have created new partition with
#parted -s /dev/sda mkpart primary HFS 2732072s 234179503s

And then i got error:
-----------
Warning: You requested a partition from 2732072s to 234179503s.
The closest location we can manage is 2732072s to 78140126s. Is this still
acceptable to you?
Yes/No?
-----------
So it looks that it can not sreate partition larger than around 33GB which is a partition of 40GB disk.

P.S.
The disk was created with command from image smallatv.dmg (maybe the switch bs=1M is wrong?):
dd if=smallatv.dmg of=\\?\Device\HarddiskX\Partition0 bs=1M --progress
TNX

Yep, No one listens to me when I say to never use DD to image a complete GPT formatted disk. It's only reliable when going to/from exact same sized disks. I repeat, DD is not 100 percent reliable with GPT formatted disk.

Copy the CONTENTS of recovery. That's all you need for the AppleTV to reconstruct the contents of OSBoot and Media.

Once you do this, nuke the disk, then follow the guilds at atv-bootloader to re-partition and format the disk from scratch. Then copy back the CONTENT of recovery. If OSBoot and Media partitions are present but empty, the factory restore will reconstruct them.
Here is how i did it.
1. Build the ATV- Bootloader (well did it with ATVUsb Creator for windows and then in linux deleted the PATCHSTICK content).

2. Then used DD.exe for windows and smallatv.dmg. The catch was that bs=1M switch
"dd if=smallatv.dmg of=\\?\Device\HarddiskX\Partition0 bs=1M --progress"
X is the disk found in Manage in windows.

Drive table:
bs=1M for 40GB
bs=2M for 80GB
bs=3M for 120GB
bs=4M for 160GB

3. After that i have put the disk in AppleTV and USB patch stick and login with Telnet over wired ethernet.

4. Media Partition resizing (in telnet):
# parted
(parted) parted -s /dev/sdb unit s print
-----------------
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 156301488 blocks) or continue with the current setting?
Fix/Ignore?
Write: Fix
------------------
(parted) rm 4
(parted) parted -s /dev/sda mkpart primary HFS 2732072s 234179503s
(parted) quit
# mkfs.hfsplus -J -v Media /dev/sda4

---------------------------------------------------------
How to calculate the sectors for: parted -s /dev/sda mkpart primary HFS 2732072s 312319663s
---------------------------------------------------------
Following command:

# parted -s /dev/sdb unit s print

will give you disk info:
copyright information of GNU Parted
Model: ATA WDC WD1200BEVE-0 (scsi)
Disk /dev/sda: 234441648s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 40s 69671s 69632s fat32 primary boot
2 69672s 888871s 819200s hfs+ primary atvrecv
3 888872s 2732071s 1843200s primary
4 2732072s 78140126s 75408055s hfs+
---------------------------------------------------------
---------------------------------------------------------
Sector equation:
Disk /dev/sda: 234441648s - 262145s (constant) = 234179503s
---------------------------------------------------------
5. After that power off ATV, remove the usb pen from ATV and power the ATV on and do factory restore and you will see bigger drive.

Cheers