Upgrade & Partition TC internal hard disk - info howto

The Time Capsule comes with the disk formatted to a single data partition.. there is no way to change this via tools in the computer or airport utility. Whatever tool is internal on the TC is not accessible.. if you use erase it will reformat the drive and recreate the original partition. 2 of which are hidden.
There are three partitions in the actual drive.. only one of which you can see.
APconfig
APswap
data (or whatever name is used.. which can be changed via the airport utility).
You can create a disk image on the internal drive as a method of partitioning it.. not really the same thing.. but for most it works.
See http://pondini.org/TM/TCQ3.html for the method.
If you want to alter a TC actual hard disk, you need to remove it from the TC.. this will of course void the warranty. So before jumping, think about it.
I was asked to install a 3TB drive on a Gen 2 A1302 TC which I undertook with some trepidation as most of my reading of forums suggested hard disk above 2TB were impossible. It may not have worked with older firmware but on 7.6.1 it works just fine.. with this proviso.. the spin down may not work. The TC worked fine with a new 3TB WD green drive. I discovered the one used in the Gen 4 latest model is older WD drive.
WD30EZRS These are Sata1
The ones you buy now are WD30EZRX which are sata2 drives.. Swapping them around caused no problems on the Gen 4.. did not try on the Gen2.
You don't want to know how I found this out.
Since you are upgrading a drive and have it out.. how nice to actually partition it. This was tricky and I actually found very little info about it.. if any of you know where there is a howto I am glad to reference it.
I have previously installed new disks with no trouble.. but without the hidden partitions created I think it uses RAM for those files.. and it will toss up disk errors.
So you need to actually create all the partitions. This isn't hard. Although again ran into trouble with the USB to sata box I was using not being able to read 3TB drives.. so I was forced to directly connect to sata.. this may be difficult for most of you... Make sure you have the equipment to do the work before ordering 3TB drive.. My USB box can do 2TB.. but it recognises the 3TB as 800MB or GB.
Using disk utility change to 4 partitions.. (or whatever number you want.. 5 or 6 I guess are ok) There are two paritions for internal use.. I created APconfig and APswap .. set the size to .01GB or whatever.. you must type this in directly.. and it will change it to the min possible size partition.. 1.07GB on the 3TB.
This is a waste as the actual files used are tiny.. but.. you have lots of space.. you need to lose some to gain a lot more.. so be it.
Name your data partitions something suitable.. TCpart1 TCpart2 TCpart3 or data1 data2 data3
Make sure you format them using HFS+ and GUID type.
The TC still kicks up an error about the disk.. this is probably a nasty side effect of Disk Utility creating an EFI partition which is invisible..
So I am going to need to try again via the Command Line disk utility.. So I can create the partitions without using an EFI.
So expect further installment.. Anyone with Command Line instructions I would be glad of the help.

solved by posting elsewhere....
http://discussions.apple.com/thread.jspa?messageID=7316301#7316301

Similar Messages

  • Problem installating Snow Leopard on old Macbook Pro with Intel Core 2 Duo. After creating partition on internal hard disk (Extended Journaled), installation starts but stops at half of the progress bar. Screen asking Restart appears.

    Hello:
    I have tried installing Snow Leopard via the installation disc on a Macbook Pro (2007) with an Intel Core 2 Duo, but I the installation has failed more than 5 times.
    I have first formatted and partitioned the internal hard disk with Mac Os Extended Journal format.
    Once the installation starts, it starts without a problem unti lthe progress bar gest until half completed then a screen asking for a Computer Restart shows up.
    It asks to press the power button for some time until it the computer shuts down and then, press again to turn it on.
    Once turned on, the installation disc gets readed, the installation screen appears again and asks again to start the whole installation process form the beginning.

    Then you have a Hardware Problem.
    Your system is Crashing part way through the install and Re-Booting because of the crash.
    Could be the drive itself or it could be some other hardware part in your system. Like the RAM.
    To check if it is the internal drive connect an External drive to the system by USB and do the install on that external. If the install completes then it more then likely the drive is bad. If it crashes again then it is more then likely some other piece of hardware in your system.

  • Upgrade internal hard disk on ibook G4

    Hello,
    I am interested in upgrading the internal hard disk of my ibook G4 from 40GB to something better. Is there an Apple service centre in bangalore, India which will do the upgrade? what manufacturer/model# of HDD will be suitable for my 2005 ibook G4?
    Can I run Aperture/Adobe photoshop on the same as in will the system be suitable for that application? I have 1.5 GB ram and an external display attached to the laptop.
    thanks
    -kamal

    The words you quoted are supposed to usually mean they
    have "service" or access to someone who would be able
    to repair or upgrade a computer within Apple specs; those
    are usually authorized to do the work, but not Apple.
    Some companies doing that kind of work, who don't have
    a staff repair service, may collect those for repair and an
    other company may pick them up for off-site service.
    In some areas, with more than one company listed in the
    page resource I cited, some of them are product specialists
    and know the line of portable computer very well, so they
    would be able to do most things and check it thoroughly.
    But those who do not really work on the computer in their
    store or attached service (having none) should be checked
    into more carefully to discover what they do/where it's done.
    The post linked to in your earlier inquiry, where someone
    replied to you there with three links to web pages of info,
    is worth considering; in that these kinds of jobs can be
    tedious and take a great attention to detail with care to not
    damage the fine wires and parts inside these portables.
    And a skilled tech, with that kind of information, may be
    able to replace an iBook's hard disk drive; but some who
    only work on Windows OS & PC hardware may be lacking.
    Especially when it comes to moving the contents of the
    existing drive (or just migrating existing user accounts, etc)
    from the old hard drive into a new system installed on the
    new replacement hard disk drive.
    Some areas of the world are harder to find the resource to
    get a job done correctly; when an old iBook portable I had
    for a time needed a reed-switch and cable replaced to fix
    a display defect when the lid was opened/closed, I ended
    up sending the iBook from AK to SC. (Across the continent.)
    No body did the work in my area, or if they really did, charged
    more than twice what I paid including shipping it both ways.
    More than 5,000 miles. Since then, sold, the iBook still works.
    Unfortunately sometimes good qualified service is where
    you find it after some effort of looking; where I live by some
    comparison, has almost no people; just great natural beauty.
    Hopefully someone or another you contact can refer you to
    a reasonably fine shop of careful people who are qualified.
    You may have to ask around, and perhaps expect the iBook
    to be transported miles to some other facility for that job.
    PS: are there any indications of an "apple user group" of
    interested owners who have, use and meet to discuss their
    shared community of those interests, in your area? If so,
    sometimes people who get together like that know more.
    Good luck & happy computing!

  • Is it possible to upgrade the internal Hard disk drive on the iMac

    Is it possible to upgrade the internal Hard disk drive on the iMac?

    Yes but it's definitely not advised. If you have a machine newer than 2009 Apple uses drives that have integrated heat sensors. This makes upgrading much more difficult but not impossible. If you have a machine still under warranty then definitely DO NOT do this yourself as you may void the warranty not to mention it isn't for the faint of heart. Take the machine to an AASP to have the work done, you will need to find one in your area willing to do so.
    If you are considering a new machine then simply buy the configuation you need.

  • To Upgrade or Not To Upgrade (From External Hard disk to Internal Hard Disk

    Hi, need some advise here.
    Currently I have a External Hard Disk (320GB) connect with my IMac with Internal Hard Disk of standard 80GB.It is ok just that have to power on/off the External Hard Disk. It is very common that I forgot to power on the External Hard Disk and my iTune library goes to other location in the Internal Hard Disk instead of follow my setting in my External Hard Disk.
    So I am considering remove the standard 80GB in my IMac and change with the 320GB.Read some instruction/procedure on this to me look complicated with the thermal pad thing so now hesitating worth the risk to swap the hard dsik or just leave it as it is.
    Leave it as it is or change it?
    Any advice ?

    Here's a link to a take-apart guide I used a few times to replace & upgrade drives & memory in my old G4.
    http://www.xlr8yourmac.com/systems/iMacg4/imacg4takeapart.html
    No it's not as easy as opening up a pc, but the key word is patience. The key thing to remember is to make sure you get some heatsink paste from your local computer store, and apply it to the areas that need it before buttoning everything back up.
    It'll only take you a few hours if you work carefully. While you have it open I highly suggest upgrading your upper memory stick, as well as upgrading your superdrive. I get all my stuff here, they haven't steered me wrong yet:
    http://eshop.macsales.com/static_pages/index.cfm
    Sean
    San Diego

  • Can't repair or partition internal hard disk with disk utility

    Hi,
    For the past couple months I've been trying to repair and (re)format my second internal hard disk. It stopped showing up on the desktop after I attempted to install leopard on it. Until then I'd had no problems with the disk for the two years I've had it Leopard installed fine on the other smaller internal disk. But the second disk only shows up in disk utilities - it doesn't have any volumes. I can't verity the disk because the button is greyed out as is the repair disk button.
    S.M.A.R.T. Status shows "not supported".
    Partition Map Scheme shows "unformatted".
    Whenever I startup my computer I get a dialog box stating "The disk I have inserted is unreadable by this computer". I't referring to my 250gig internal disk. I read some posts here that suggested using OS 10.4 disk utility to format but that doesn't work either.
    At this point I'm totally lost as are all the files I had on that disk - I initially erased it back when I attempted to install leopard on it. Does anybody have any ideas how to fix this?
    Thanks for any and all help

    Hi V.K.
    Thanks for the advice. Luckily I don't have any data on it since I wiped it clean back when I attempted to install leopard on it a couple months ago. I'm really amazed that it only lasted two years compared to my 80gig which has been in use [daily] for at least five years. I hardly ever used the 250gig drive. I ordered another (500gig) drive from Western Digital which I expect to be here in a couple days. In the mean time I guess I'll get out my hammer.
    Thanks for your help.

  • Mac OSX wont reognise my internal hard disk drive

    I have a problem where for some reason when I start up my Macbook Pro (intel core duo) it does not detect the internal hard disk drive at all. I have run a hardware test and it shows no problems whatsoever. I have tried resetting the PRAM etc and to no avail. Yesterday the system hung and I tried to force quit and it wouldn't do anything so eventually I held down the power key and when it tried to reboot this is the problem I was faced with (it would boot up with the "no entry" sign). I accepted complete defeat and went to completely re-install OSX however it doesn't even show the internal hard drive when I wait for it to give me install destinations. I had tried seeing the hard drive through disk utility however it only shows the install DVD and that's it in the sidebar. I resigned myself further to thinking either the logic board or the HDD had packed in all and I took it round to my brother in law to see if there is anything he could do without opening the machine (he is Oxford educated and writes programmes etc so is very knowledgable), now this is the part that has miffed us both, he started it up using a Linux disc and once running, Linux see's the hard drive with no problems. He has been able to access the HDD with absolutely no problems under Linux both reading and writing to it. I even took my Mac Mini round and he booted them both up in Linux and completely copied Mac OSX from the mini to the macbook pro but still when I try booting up its as if the HDD isn't even there. Why can Linux see the drive and not Mac OSX? Please don't be affraid to get very technical in your answers as they may mean nothing to me but will probably all make sense to my brother in Law. Any sugestions at all would be greatly accepted.

    Dear mcdkev,
    You guys may have made a big error cloning the Mini HD into the MBP. They both have very different drivers and hardware settings and their OS X versions are customized to fit the hardware. That is why each mac comes with it's own version of OS X and their backup disks. That's a reason why it did not work.
    Ok, so now that you do not have any of the original info on the MBP try the following:
    Use linux to scan the disk surface & repair any problems.
    Reformat the drive as DOS or FAT 32. (I wouldn't go into any linux specific format unless you can "Apple" format it, which I don't think linux has that option.)
    Now, the MBP should be able to see it's drive...
    boot from the OS X DVD , from the Utilities menu choose Disk Utilities, partition the drive as GUI file system (in case the linux format made the drive a "system boot record", you do not want that... )
    Then format the drive as "OS X Extended Journaled"
    Now go back to install and install your original basic set of OS X (the factory default).
    *If nothing works, please do take your MBP to the Apple store or to a certified tech before you do more damage to the drive and it becomes unusable ...*

  • Hi, I just put a new internal hard disk to my MacBook after formattimg it and I don't know how to install the OS X? Any help please

    Hi, I just put a new internal hard disk to my MacBook after formattimg it and I don't know how to install the OS X? Any help please

    Be sure you have prepared the new drive correctly:
    Drive Preparation
    1.  Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (for Intel Macs) or APM (for PPC Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Steps 4-6 are optional but should be used on a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.
    When formatting has completed quit DU and return to the installer.  Complete the OS X installation.

  • Disk Utility hangs while initializing internal hard disk in Core Duo iMac

    I have a 20" Core Duo iMac. Recently the internal hard drive crashed ("invalid B-tree node size" or something reported when Disk Utility tries and fails to repair it). I have all my data on an external hard disk used as a Time Machine volume, so recovery is not my issue. Initially I picked the write zeroes once security option and chose to erase the internal hard disk. Realizing this would take too long, I clicked on skip, and Disk Utility appeared to hang. I quit and restarted Disk Utility, and chose the "don't erase" security option, but when I go to erase the drive it appears to hang while at the "partitioning" stage and doesn't seem to get any further. There is motion in the progress bar, but no additional progress after about an hour. Disk Utility shows the disk but no volumes underneath it (whereas immediately after the crash, it showed an unmountable volume labeled "disk0s2").
    Why would Disk Utility be taking so long and not making any progress? How can I reformat this disk if Disk Utility is not able to? Incidentally, I am running the Disk Utility that comes with OS X 10.4.8, since that is the OS X version on my portable hard drive that I booted from. I also tried using Drive Genius to initialize the hard disk, but it also appeared to hang with no progress.

    It is possible the drive has failed, but to be sure start by turning off the computer. Wait five minutes. Then do this:
    Extended Hard Drive Preparation
    1. Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger or Leopard.)
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area. If it does not say "Verified" then the drive is failing or has failed and will need replacing. SMART info will not be reported on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Set the number of partitions from the drop down menu (use 1 partition unless you wish to make more.) Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (only required for Intel Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Be sure to boot from the OS X installer DVD, not a backup clone.

  • I've lost the use of Appleworks in 10.9.2. Is it possible to partition the internal hard drive of my MacBook Pro and install an older Mac OS (10.6.8) on the second partition with OS 10.9.2 on the other?

    I've lost the use of Appleworks by upgrading to 10.9.2.
    Is it possible to partition the internal hard drive of my MacBook Pro and install an older Mac OS (10.6.8) on the second partition with OS 10.9.2 on the other? I'd like to be able to boot to the older OS when I need Appleworks and  few other applications that aren't available on OS 10.9.2.
    Any suggestions?
    Thank you for your help.

    Hello again, WZZZ,
    Here's an update. I was successful in creating two partitions on my internal drive, and in installing OS 10.6.6 on the second partition, as per your guidence. I now have it up to 10.6.8 with all the security updates and AppleWorks. A great thing.
    Some thoughts:
    • The partitioning had one hitch; it failed at first. But once I "repaired" the disc with Disc Utility the partitioning went thru.
    • The partitioning took a long time in 'resizing the partition.' A few hours I think it was. Lots of progress bar watching.
    • If I had it to do again, I'd size the two partitions differently. My original data was occupying about 230 Gb of the 320 Gb disc. I made the new partitions share the space, about 230 and 75Gb. That left very little available space for the main disc. I ought to have put some breathing room in there. As it is, it's an incentive to clean up all those files, especially all those iTunes files. I now have about 10% of available space there and mean to continue deleting.
    So, all in all a good project that got me where I wanted to go. Thank you for your help.
    Appreciatively,
    wallah

  • Re: How can I add a second internal hard disk to a Satellite Pro P200?

    I have a Satellite Pro P200 with a single internal hard disk. There is a second bay under the computer for another internal hard disk but I have not been able to find any information about it. There is enough space for a 2.5" SATA drive but I cannot see a connector.
    I contacted Dutch Toshiba Customer support who said that it was the official policy not to provide any information about a second hard internal disk. They also said that they would not supply any parts to make it possible.
    Can anyone provide some more information?

    Hello
    I have the same notebook with the same situation. The fact is that covers and the construction for all P200 notebooks is the same but notebooks are delivered with different hardware platforms. Some models are delivered with two HDDs.
    Other models (like yours and mine) are delivered with one HDD but without possibility for upgrade with second HDD.

  • Can I possible to use dual boot(windows 7 in internal hard disk and windows 8 in external hard disk)?

    i want to create dual boot(2 OS in 1 laptop) in my laptop but my internal hard disk reach maximum(3) logical partition so my genuine windows 7 os is not allow me to create new logical partition and install win8 pro. i planed to purchase
    one external hard disk and connect with my laptop and install win8 in external hard disk and use both win8 and 7. This is possible? If possible how to i create? please give me step by step instruction.

    This is a developers forum for the presentation manager windows forms classes and api's
    Try what has now a new name again user community forums, formerly answer forums.
    http://answers.microsoft.com
    Success
    Cor

  • Add Internal Hard Disk?

    Hello, I have a running Windows 7 installation on my Mac Pro and recently added another internal hard disk. It is formatted in HFS+. However, Windows 7 does not allow me to add a letter to the new hard disk - whereas the third HFS+ hard disk already existing at the time of the BootCamp setup has a letter assigned.
    Does this mean that, for having the new HFS+ disk reckognized correctly, i need to reinstall Windows 7??? Any suggestions would be highly appreciated.
    Many thanks, Stefan

    Hi turbostar, thank you for your response.
    It is a brand-new hard disk freshly formated as mac journaled. My plan was to use it as a data container with de-activated user rights and Paragon HFS+ installed on the Windows 7 side (just because I will mainly use this drive under MacOSX and just sometimes under Windows 7; and hd space on the Windows 7 partition is very scarce).
    So I guess the answer is "both". Paragon HFS+ documentation tells me that I shall assign a drive letter under Windows 7, and this is currently not feasible.
    Again, thank you for listening.

  • Unable to erase internal hard disk

    Dear Mac Book Users
    To begin with I got a problem of spinning wheel and grey screen, upon extensive research online i could,nt find any solution and everytime i tried to repair it with disk utility's first aid otion i got the following error:
    Disk Utility can’t repair this disk. Back up as many of your files as possible, reformat the disk, and restore your backed-up files.
    There were a lot of errors wth permissions (upon clicking verify permissions) but the repair permissions button was greyed out.
    Now all that is history and finally the only solution to get rid of the above problem was to back up my data to an external hd (WD-My passport) using the Restore option in disk utility. That worked well and all my data, the whole volume named MACINTOSH HD was copied to external hd and alsi now I am able to boot with this external hd.
    Now the problem is that when i go to disk utility and try to erase the original internal hard disk details of which are as follows:
    Disk Description :
    ST9160314ASG Media
    Total Capacity :
    160.04 GB (1,60,04,18,85,696 Bytes)
    Connection Bus :
    SATA
    Write Status :
    Read/Write
    Connection Type :
    Internal
    S.M.A.R.T. Status :
    Not Supported
    Partition Map Scheme :
    GUID Partition Table
    I get the error:
    Volume Erase failed with the error:
    File system formatter failed.
    I want to know that has my hard disk crashed and if yes how to confirm it?
    Also if it has crashed, now can i get a new hard disk with a greater capacity (let me know the maximum capacity) than my original 160gb. Are there any things i should keep in mind while buying a new one?

    Please check the results:
    Last login: Thu Aug 30 11:34:15 on console
    Manan-Dewans-MacBook-Pro:~ manandewan$
    Manan-Dewans-MacBook-Pro:~ manandewan$ bash
    bash-3.2$ diskutil erasedisk HFS+newdisk Disk Utility can’t repair this disk. Back up as many of your files as possible, reformat the disk, and restore your backed-up files.diskutil erasedisk HFS+newdisk /volumes/disk0
    Unknown partition scheme: Utility
    bash-3.2$ diskutil erasedisk HFS+newdisk /volumes/disk0
    Usage:  diskutil eraseDisk format name [[APM]Format|[MBR]Format|[GPT]Format]
            MountPoint|DiskIdentifier|DeviceNode
    Completely erase an existing whole disk.  All volumes on this disk will be
    destroyed.  Ownership of the affected disk is required.
    Format is the specific file system name you want to erase it as (HFS+, etc.).
    Name is the (new) volume name (subject to file system naming restrictions),
    or can be specified as %noformat% to skip initialization (newfs).
    You cannot erase the boot disk.
    Example: diskutil eraseDisk JHFS+ UntitledUFS disk3
    bash-3.2$ diskutil erasedisk HFS+ newdisk "/volumes/disk0"
    Could not find disk for /volumes/disk0
    bash-3.2$

  • ITunes showing Album Covers of external hard disk i/o internal hard disk

    Greetings from Malaysia again. Searched through the Discussion Group, but couldn't find anything there. Thus, hope to get your assistance on this matter.
    I have some music stored in the internal hard disk of my G4 iBook. However, recently I decided to have all my music stored in an EXTERNAL hard disk, ie in addition to what's in the iBook, to sync with my iPod. Both have the artwork or album covers. The issue is when I boot up ONLY the iBook, even without the external hard disk on, iTunes (Version 8.1) is showing the Artwork/Album Covers (and list of music) of the EXTERNAL hard disk instead of what's in the iBook. I've even tried the "Option key/Choose Library", but to no avail. I've even tried changing the location, after starting up iTunes in the Preference settings, but still the same story.
    Is there any way to have iTunes reflect the correct Artwork/Album Covers (and list of music) when I have the external hard disk connected, as well as otherwise?
    Thanks in advance for your help.
    Regards.

    Moved the existing library. Created a new one, and moved all the songs to the new library. Subsequently, when using the "Option" key to select the library, it ended up as what I wanted, ie iTunes showing the album covers for the songs/album in the respective library - ie external hard disk, and internal in the notebook.

Maybe you are looking for

  • Hp laserjet p4015 f981 3694 printer error?

    I'm looking for the resolution for printer error F981 3694 ?

  • Greetings,   I need a little help. I have a WRT54G Wirele...

    Greetings, I need a little help. I have a WRT54G Wireless Router, and it worked well for years with my Alcatel DSL Modem (Bellsouth/ATT).  The modem went out and it was replaced with Westell Modem.  When I bypass the router I have no problem connecti

  • Small size file can not read correctly on other linux

    Hi, I am running archlinux 0.8 on my laptop, and there is another linux runs kernel version 2.6.20 with root filesystem of debian v3.1. I wrote a shell script which reads a small, 49 bytes, only 1 line conf file on my archlinux, it works fine. But if

  • Selection screen output obligatory field

    Hi all, I have two radio buttons, if i selected one radio button one selection screen will come for entries another will be invisible. in that selection screen i have all are mandatory fields. so it is not allowing to another radio button with out en

  • How to run alert box when document opens

    I am using Acrobat 9 and would like an alert box come up when the document is opened. I have successfully gotten an alert box to pop up using the script below when saving using document actions, but do not know how to make it execute when the documen