![]() |
|
[LINUX] Sam's beta image for Apple TV? - Printable Version +- XBMC Community Forum (http://forum.xbmc.org) +-- Forum: Help and Support (/forumdisplay.php?fid=33) +--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111) +---- Forum: Linux and Live support (/forumdisplay.php?fid=52) +---- Thread: [LINUX] Sam's beta image for Apple TV? (/showthread.php?tid=88518) |
- defiler - 2010-12-29 00:35 pmcd Wrote:I have been trying to expand the last partition, Linux, to fill out a flash drive. [...] I tried gparted live, but it complained of unused space. This has to be a simple operation involving the resize command but for the life of me I can't do it. Is there a simple way to do this? I assume it requires a ubuntu live or gparted live distribution which I have. [...] I assume you're still trying to extend the partition, and not the filesystem contained in it (hence gparted). I ran up against this issue with Pin's image. The parted installed couldn't handle the fact that the partition table didn't match up with the drive size. There are two ways to do this. The go-and-look-for-the-tool way and the messy-and-might-need-to-reimage way. The first one involves getting your hands on the "fixed" parted. I vaguely recall Davilla mentioning it on the huge thread about Sam's 1st image. Apparently with this copy of parted it just works. The other method is the one that I used (and it involves knowing why parted is getting pissy). You need to boot from an alternative source (say the internal hard drive), use fdisk to list the size (in sectors or bytes) of all the partitions of your flash drive, use dd to overwrite the first 3 sectors (should do it nicely), then use parted to recreate the partition table by re-entering the partition sizes you recorded from fdisk. The problem is that the GPT keeps a copy of the partition table at the start of the drive and a backup at the end of the drive. When the first table doesn't match up with the size of the drive, and the second table is simply missing, parted goes a bit nuts (unless it's the "fixed" version). By overwriting the first few sectors with zeros you can wipe the slate clean, allowing you to regenerate the partition table with no more tools than a pencil to write down the partition sizes. Ta-da! - Sam.Nazarko - 2010-12-29 01:43 Not necessary to erase them sectors. Parted's hissy fit can be easily ignored, just run your commands for dd'ing partitions, then e2fsck; resize2fs. You can then gptsync after and fix the MBR for quicker boot. - pmcd - 2010-12-29 11:28 defiler Wrote:I assume you're still trying to extend the partition, and not the filesystem contained in it (hence gparted). I ran up against this issue with Pin's image. The parted installed couldn't handle the fact that the partition table didn't match up with the drive size. Yes, I am trying to extend the last partition so that the full 16gigs are used, as opposed to just 4. The mismatch in the reported drive size is exactly what I ran up against. Does anyone know where this elusive ""fixed" parted" might be found? I don't know why this is turning out to be such a tricky problem. Unfortunately my Linux abilities are negative, but I am trying to get them into the positive part of the line. The gparted I used never gave me the option of disregarding the problem. I'll try the parted way without the gui as Sam suggests. I think a lot of users would like a simple way of doing this or if possible a simple 4 line description! I recall reading your process, I believe, and it wasn't trivial. philip - defiler - 2010-12-29 13:17 pmcd Wrote:The gparted I used never gave me the option of disregarding the problem. I'll try the parted way without the gui as Sam suggests. It may be that Sam's included the fixed parted in his image - I don't know, because I've not tried it. If so, it's a trivial matter. There's a "resize" command in parted that should do the trick, or you can take down the partition sizes in bytes or sectors, and erase, then recreate the partition (make sure you don't recreate the filesystem if you do it this way). Make a note of the partition number, and resize2fs is your friend. It'll even resize it whilst online. On a fairly unrelated note, for my money's-worth your media is best stored on an xfs partition, because resizing it is unfeasibly quick. That's not the only reason, but the one that brought this into my head. It's also very quick at dealing with large files (and let's be honest, even my old XVID DVD rips are 1GB+, and I'm reripping all my discs without recoding them, so they'll all be 5+GB). And where ext3 will choke for several seconds deleting a large file, xfs is immediate. (I run a spool drive for my backup server at work on ext3, and when deleting a 250GB spool file it just stops for about 15 mins...) - reddeath - 2010-12-29 23:16 Where can I find the post where Sam's image is available with download links and detail descriptions? - dnguy22 - 2010-12-30 01:51 reddeath Wrote:Where can I find the post where Sam's image is available with download links and detail descriptions? Go back to the first page and you will find the link of Beta image from Sam's post. Or this: http://forum.xbmc.org/showthread.php?tid=74992 if you refer the older image Hope this could help ![]() Danh - pmcd - 2010-12-30 08:29 defiler Wrote:Make a note of the partition number, and resize2fs is your friend. It'll even resize it whilst online. Hmm ... I must be missing something. My flash drive is sdb and the Linux partition is sdb3. I have it as a GPT drive if that matters. When I run resize2fs -f /dev/sdb3 and even some variations I get that there is nothing to do as the files size is already at its max. If I try parted it tells me not to use it on gpt disks and to try gpt! Am I not supposed to format the flash drive with a guid partition (as opposed to mbr)? In any case, would it be possible to state the exact command to use with resize2fs assuming it is sdb3 you want to resize and that it is the last partition? Or do I first have to run gpt and/or parted to expand the partition? In that case what would the command be? I think the problem here is that I am doing this on a Mac and when I move to a Ubuntu Live CD the tools fails because of the guid thing. By the way, using Ubuntu Live CD is not quite as harmless as the Ubuntu people claim. I have OSX and windows 7 on 2 partitions of a hard drive ( OSX is the first). I use Windows 7's boot manager to control which one starts ( I can also use OSX's darwin's boot manager). When I tried to use parted on the flash drive from a Linux Live CD it messed up the hard drive boot sectors and I lost the ability to boot windows 7. Fortunately I was able to reenable OSX, but I still can't get windows 7 to start ( even booting from the win7 dvd won't fix things). No big deal but these Live CD's are not bullet proof! philip - MasterOe - 2010-12-30 21:30 dnguy22 Wrote:Go back to the first page and you will find the link of Beta image from Sam's post. this does not really help. The link from the first page does not work .. - dnguy22 - 2010-12-30 22:56 MasterOe Wrote:this does not really help. Sorry, my bad. I think Sam took it down . If you want to try it out, I still have the zip file but you should wait till Sam releases the fully working version. - defiler - 2010-12-31 16:03 pmcd Wrote:Hmm ... I must be missing something. My flash drive is sdb and the Linux partition is sdb3. I have it as a GPT drive if that matters. When I run That's because the partition is still at its original size, so there's nowhere for the filesystem to expand into. I was under the impression that parted was the tool for gpt partition tables, but I could be wrong. If it's just the flash drive image that's been copied to the internal drive, try setting it with parted - if it breaks, you don't have a whole lot of work to put it back to the original USB image again. |