Announcement

Collapse
No announcement yet.

Help with partitioning drives

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with partitioning drives

    I would like to create a 500mb swap partition on the B drive and then use the rest as storage. Any suggestions on how to procede?

    I planned to use the MFSLive cd as it fixes the MFSTools swap bug.

    I have my original 40gb drive (unhacked, as a backup) that I will use as a source for migration to a blank/new 500gb plus old 200gb B drive (to be erased). Previously I had two 200gb drives and the A drive has failed.

    I know how to edit the fstab to use a partition as swap on startup I just need to know how to create a swap partition on the B drive and then create a media partition the tivo will use.
    Last edited by ciper; 07-29-2007, 04:32 PM.

  • #2
    So far I got the following working -
    700mb version 1 swap partition on the A drive (with modified kernel to support new version)
    70mb swap file inside var partition
    13mb swap partition on B drive (remaining unpartitioned space)

    All I need help with is how to manually partition the B drive and Ill be set.

    edit: I have found an updated version of mkswap for the tivo that will create version 1 swaps!

    I just wish there was a utility for the PC that could create version 1 swaps on the B drive. TPIP works for the A drive on the PC or the Tivo.
    Edit2: Found it http://www.dealdatabase.com/forum/sh...wap#post224882
    Last edited by ciper; 07-30-2007, 11:10 PM.

    Comment


    • #3
      I wanted to post this for anyone else who finds my post later on.

      The Tivo does NOT support more than one swap entry in the FSTAB!

      I tried for hours every combination of swap layouts/configurations in the fstab. No matter how you form the entries the tivo will never boot if the fstab is edited to list more than one swap entry. Its hard to troubleshoot because no logs are created (since its so early in the boot process). You have no fricking idea how many times I swapped the drives between my PC and the tivo......

      There is a workaround though! I didn't want to only list the swap partition on the B drive so instead I did the following -

      Modify the fstab swap line options to give /dev/hda8 a priority number
      Code:
      /dev/hda8 swap swap    sw,pri=3 0 0
      Then at the top of your rc.sysinit add the following line (with the appropriate location)
      Code:
      swapon -v -p 5 /dev/hdb4
      This makes the TV add the extra swap an the -p 5 gives it a higher priority (used first) over the original swap with priority 3

      I've tested this on an S1 and verified it works. If you are still using the stock kernel this method allows you to create multiple swap files upto 127mb each and should allow mfsfix GSOD to complete

      Can someone verify that the rc.sysinit is started when a GSOD is initiated?

      edit: I wanted to post this for anyone else who finds my post later on.

      The Tivo does NOT support more than one swap entry in the FSTAB!

      I tried for hours every combination of swap layouts/configurations in the fstab. No matter how you form the entries the tivo will never boot if the fstab is edited to list more than one swap entry. Its hard to troubleshoot because no logs are created (since its so early in the boot process). You have no fricking idea how many times I swapped the drives between my PC and the tivo......

      There is a workaround though! I didn't want to only list the swap partition on the B drive so instead I did the following -

      Modify the fstab swap line options to give /dev/hda8 a priority number
      Code:
      /dev/hda8 swap swap    sw,pri=3 0 0
      Then at the top of your rc.sysinit add the following line (with the appropriate location)
      Code:
      swapon -v -p 5 /dev/hdb4
      This makes the TV add the extra swap an the -p 5 gives it a higher priority (used first) over the original swap with priority 3

      I've tested this on an S1 and verified it works. If you are still using the stock kernel this method allows you to create multiple swap files upto 127mb each and should allow mfsfix GSOD to complete

      Can someone verify that the rc.sysinit is started when a GSOD is initiated?


      edit: Kernel log entries to prove this from my most recent reboot
      Code:
      Jan  1 00:03:18 (none) kernel: Activating swap partitions
      Jan  1 00:03:18 (none) kernel: Adding Swap: 716796k swap-space (priority 3)
      [i](time passes as other items are loaded)[/i]
      Jul 31 06:12:58 (none) kernel: Adding Swap: 13492k swap-space (priority 5)
      Last edited by ciper; 07-31-2007, 12:33 AM.

      Comment


      • #4
        I THINK I'VE DONE IT
        Here are the steps I took -

        My drive layout is as follows
        /dev/hda - 40gb original unmodified Tivo drive
        /dev/hdb - MFSLive CD
        /dev/hdc - New A drive for Tivo
        /dev/hdd - New B drive for tivo
        /dev/sda1 - usb stick for files not included on MFSLive cd (new kernel, modified mkswap etc..)

        Previously my backup|restore went at around 1.5mbps. I used "hdparm -a 256 -c 1 -k 1 -m 16 -S 0 -u 1 /dev/hda /dev/hdc /dev/hdd" to speed it up. Do not enable DMA as it breaks bite swapping

        Create the correct layout on the B drive the long way
        Code:
        backup -qso - /dev/hda | restore -s 700 -r 4 -xzpi - /dev/hdc /dev/hdd
        Delete the Tivo partitions so the B drive only has 1 partition type "apple_partition_map" name "apple
        Code:
        pdisk /dev/hdd
        d (delete)
        2 (application partition
        d (delete)
        3 (media partition
        Reimage A drive without B drive (use the up arrow so you don't have to type it again)
        Code:
        backup -qso - /dev/hda | restore -s 700 -r 4 -xzpi - /dev/hdc
        Create new swap partition on B drive
        Code:
        pdisk /dev/hdd
        C (upper case - create partition with type)
        64 (starting block of free space)
        1440000 (length in blocks - tried to get 700mb end up with 713mb)
        "Linux Swap" (name of partition and the quotes are necessary!)
        Swap (type of partition)
        C (create)
        1440064 (start of application partition)
        2048 (length results in 1mb)
        "New MFS Application" (name, don't forget quotes)
        MFS (type)
        C (create)
        1442112 (start of media partition)
        389279856 (rest of remaining space on drive)
        "New MFS Media" (name with quotes)
        MFS (type)
        w (save changes)
        Y (yes to overwrite)
        q (quit)
        Now you can add the new space
        Code:
        mfsadd -r 4 /dev/hdc /dev/hdd3 /dev/hdd4
        Using a modified version of mkswap which supports bite swapping is the only way to accomplish this on the PC. Otherwise even with byte swapping enabled on the boot cd it WON'T WORK. You can skip this step if you have a modified version of mkswap on the tivo that can create version 1 swap partitions.
        Code:
        mkswap -S /dev/hdd2
        thoughts?
        edit: Oh yeah don't forget to copy over a modified kernel that supports both lba48 AND version 1 swaps or none of this will work!
        Last edited by ciper; 07-31-2007, 06:52 AM.

        Comment


        • #5
          Is anyone reading this? Anyways here is a printout of my memory information after a fresh reboot of the system
          Code:
          bash-2.02# cat /proc/meminfo
                  total:    used:    free:  shared: buffers:  cached:
          Mem:  14274560 14114816   159744 66727936   487424  4706304
          Swap: 1471266816        0 1471266816
          MemTotal:     13940 kB
          MemFree:        156 kB
          MemShared:    65164 kB
          Buffers:        476 kB
          Cached:        4596 kB
          SwapTotal:  1436784 kB
          SwapFree:   1436784 kB
          Yes thats 1.4gb of swap on a series 1 tivo I know this is completely unnecessary but here is my reasoning. I wanted to have 1mb of swap for every 1gb of disk space. I wanted to move the swap partition to the B drive for better performance and I wanted to have a swap partition on the A drive in case something happens to the B drive.
          Here are the relevant Kernel log entries
          Code:
          [i]My custom entrie at the start of rc.sysinit[/i]
          Jan  1 00:03:18 (none) kernel: swapon on device /dev/hdb2 
          Jan  1 00:03:18 (none) kernel: Adding Swap: 719996k swap-space (priority 5) 
          ...
          [i]The regular swapon -a in the middle of rc.sysinit that reads fstab with /dev/hda8[/i]
          Jan  1 00:03:18 (none) kernel: Activating swap partitions 
          Jan  1 00:03:18 (none) kernel: Adding Swap: 716796k swap-space (priority 3)

          Comment

          Working...
          X