Find the answer to your Linux question:
Results 1 to 6 of 6
i want to move space from one ntfs partition to another, my c:\ in vista is growing very small here is some data: df -h [root@Home ~]# df -h Filesystem ...
  1. #1
    Just Joined! Test For Echo's Avatar
    Join Date
    May 2008
    Location
    Israel
    Posts
    38

    Red face hey, what would be the best way to repartition?

    i want to move space from one ntfs partition to another, my c:\ in vista is growing very small

    here is some data:

    df -h

    [root@Home ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
    5.0G 3.4G 1.6G 69% /
    /dev/sda3 190M 20M 162M 11% /boot
    tmpfs 1014M 76K 1013M 1% /dev/shm
    /dev/sda1 23G 20G 2.9G 88% /media/disk
    /dev/sda2 269G 248G 21G 93% /media/Data
    [root@Home ~]#



    cat /etc/grub.conf

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,2)
    # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
    # initrd /initrd-version.img
    #boot=/dev/sda
    default=1
    timeout=10

    splashimage=(hd0,2)/grub/splash.xpm.gz
    hiddenmenu

    title Fedora (2.6.26.6-49.fc
    root (hd0,2)
    kernel /vmlinuz-2.6.26.6-49.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-2.6.26.6-49.fc8.img

    title Fedora (2.6.26.5-28.fc
    root (hd0,2)
    kernel /vmlinuz-2.6.26.5-28.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-2.6.26.5-28.fc8.img

    title Vista
    rootnoverify (hd0,0)
    chainloader +1


    mount

    [root@Home ~]# mount
    /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    /dev/sda3 on /boot type ext3 (rw)
    tmpfs on /dev/shm type tmpfs (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    /dev/sda1 on /media/disk type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
    /dev/sda2 on /media/Data type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
    [root@Home ~]#

    i want to move space from /dev/sda2 to /dev/sda1

    how do i do that in the safest way?


    thanks

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,097
    Take a look at the PartedMagic LiveCD. It's a small download, quick burn to CD, and is very easy to use.

    You need to have free space next to any partition that you want to expand, so you might have to shrink one or more partitions in order to gain some free space, then do some partition moving in order to get things finally settled in the way you want them.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  3. #3
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    I agree PartedMagic is the best way to go if you are resizing partitions. The output of fdisk -l would also be required for further advice since we can't tell from df -h or mount if sda1 and sda2 are next to each other on the disk.
    The simplest case is when they are, you need to shrink sda2, move it to make space next to sda1 and expand sda1 to take up the additional space.

    Something to keep in mind is you are vulnerable to power failure etc during the partition resize, you have a not far off full 270GB partition you want to shrink. Because there is a lot of data on the partition this will take a long time - I'd expect at least several hours for this operation alone ... similar time to move the partition afterwards. If you can backup data for sda1 and sda2 at least until you have resized it will help reduce risk for you.

    Given this situation I would probably try to archive data to free up disk space or move data from sda1 to sda2 to free up space.

    Good luck

  4. #4
    Just Joined! Test For Echo's Avatar
    Join Date
    May 2008
    Location
    Israel
    Posts
    38

    thanks , here is my fdisk -l output

    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x1490f981

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 2946 23661568 7 HPFS/NTFS
    /dev/sda2 3892 38914 281312256 7 HPFS/NTFS
    /dev/sda3 2947 2971 200812+ 83 Linux
    /dev/sda4 2972 3891 7389900 5 Extended
    /dev/sda5 2972 3891 7389868+ 8e Linux LVM

    Partition table entries are not in disk order

    Disk /dev/dm-0: 5435 MB, 5435817984 bytes
    255 heads, 63 sectors/track, 660 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-0 doesn't contain a valid partition table

    Disk /dev/dm-1: 2080 MB, 2080374784 bytes
    255 heads, 63 sectors/track, 252 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x30307800

    Disk /dev/dm-1 doesn't contain a valid partition table
    there shoul'dnt be any problem with grub.conf?

  5. #5
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,097
    Partition size changes shouldn't have any effect on GRUB.

    Changes to partition count and filesystem types will.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  6. #6
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Code:
    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        2946    23661568    7  HPFS/NTFS
    /dev/sda3            2947        2971      200812+  83  Linux
    /dev/sda4            2972        3891     7389900    5  Extended
    /dev/sda5            2972        3891     7389868+  8e  Linux LVM
    /dev/sda2            3892       38914   281312256    7  HPFS/NTFS
    Order on disk is sda1, sda3, sda4, sda2 - you can see from block numbers. In order to move space from sda2 to sda1 will require you to:-
    resize sda2 and move to right
    move sda4 to right
    move sda3 to right
    expand sda1 to fill available space

    You will be moving every partition on the disk ... backup data - partition moves can fail just as partition resizes can

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...