Results 1 to 3 of 3

Thread: Fedora Core 3 Re-partitioning hdd

  1. #1
    Join Date
    Apr 2008
    Posts
    598

    Fedora Core 3 Re-partitioning hdd

    Freshly I repartitioned the Hard Drive of a Fedora Core 3 box. Steps are given as follows to repartition presented Hard Drive, Adding up 3 fresh partitions, named as /home, /lfs and /livecd and every having size 10G, 6G and 1G correspondingly.

    A. Preparation before repartition

    To find out the existing partitions

    Code:
    # fdisk -l /dev/hda
    Disk /dev/hda: 40.0 GB, 40020664320 bytes
    255 heads, 63 sectors/track, 4865 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
    Device 	Boot 	Start	End	Blocks	   Id	System
    /dev/hda1   *	1	14	104391	   83	Linux
    /dev/hda2		15	2569	20482875	   83	Linux
    /dev/hda3		2570	2687	1020127+	   82	Linux swap
    /dev/hda4		2688	4886	17470687+   5	Extended
    /dev/hda5		2687	4870	17470656	   83	Linux
    To find out the size of Hard Drive/each partition and the system of each partition

    Code:
    # df -hT
    Filesystem 	Type   	    Size     Used      Avail     Use%     Mounted on
    /dev/hda2      ext3        19G      3.6G      14G       19%        /
    /dev/hda1      ext3        98M      15M       79M       17%        /boot
    none           tmpfs       125M     0         125M      0%         /dev/shm
    /dev/hda5      ext3        17G      1.5G      15G       11%        /home

  2. #2
    Join Date
    Apr 2008
    Posts
    598

    Re: Fedora Core 3 Re-partitioning hdd

    B. Repartition Steps

    1. Boot from the “init 1”, with one User Mode and while booting go to Bootloader window, choose the latest kernel and then press the "e" key in order to edit the commands for that kernel prior to booting. After that screen, select the line which has "kernel /vmlinuz.........." and press "e" key again. Going on next screen, Ending of the "grub edit -> kernel /vmlinuz..." thump space bar one time to obtain a space prior to typing and then type "init 1" devoid of the (quotation marks) and then press "Enter". At this moment coming to and fro on screen and a line with "init 1" shown at its end will be shown. Here you have to press the "b" key to carry on booting to “init 1”.

    2.
    Code:
    sh-3.00# mount /dev/hda5 /mnt
    Already mount
    3.
    Code:
    sh-3.00# mkdir /home2 && cp -ar /mnt/* /home2/
    4.
    Code:
    sh-3.00# umount /dev/hda5
    (no printout)
    5.You can use the fdisk in order to erase the partition (/dev/hda5) and to make 3 fresh partitions in the space left.

    • d - can be used to delete a partition
    • m - can be used to print the menu
    • n - can be used to add a new partition
    • q - can be used to quit without saving change
    • w - can be used to write table to disk and exit


    Code:
    sh-3.00# fdisk /dev/hda
    Command (m for help): (type) d
    Partition number (1-5): (type) 5
    
    Command (m for help): (type) n
    First cylinder (2691-4865, default 2691): press [Enter]
    Using default value 2691
    
    Last cylinder of +size or +sizeM or +sizeK (2691-4865, default 4865): (type) +10000M and press [Enter]
    
    Command (m for help): (type) n and press [Enter]
    First cylinder (3908-4865, default 390 : press [Enter]
    Using default value 3908
    Last cylinder of +size or +sizeM or +sizeK (3908-4865, default 4865): (type) +6000M and press [Enter]
    
    Command (m for help): (type) n and press [Enter]
    First cylinder (4638-4865, default 463 : press [Enter]
    Using default value 4638
    Last cylinder of +size or +sizeM or +sizeK (4638-4865, default 4865): press [Enter]
    
    Command (m for help): (type) w and press [Enter]
    Partition table has been altered!
    Calling ioctl() to read partition table
    Warning: Re-reading the partition table failed with error 16: Device and resource busy
    The kernel still uses the old table
    The new table will be used at the next reboot
    Syncing disk

  3. #3
    Join Date
    Apr 2008
    Posts
    598

    Re: Fedora Core 3 Re-partitioning hdd

    6.
    sh-3.00# (type) reboot and press [Enter]

    FedoraCore3 gets rebooted automatically and then it shows the warning to run “fsck” for solving problems but you have to ignore it. Your PC is at present booted to “init 1”, the Single User Mode.

    7. Continue
    Code:
    # mkfs -t ext3 /dev/hda5
    # mkfs -t ext3 /dev/hda6
    # mkfs -t ext3 /dev/hda7
    (all no printout)
    8.one more trap happened is that it seemed doubling every part of data back to /home but zero action taken.
    Code:
    # cp -ar /home2/* /home/
    9.
    Code:
    # mkdir /mnt/lfs
    # mkdir /mnt/livecd
    10.
    Code:
    Edited /etc/fstab
    # nano /etc/fstab
    Original /etc/fstab before editing;

    Code:
    # cat /etc/fstab
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    LABEL=/               /                                 ext3      defaults                 1 1
    LABEL=/boot        /boot                          ext3      defaults                 1 2
    none                     /dev/pts                      devpts  gid=5,mode=620   0 0
    none                     /dev/shm                    tmpfs    defaults                 0 0
    LABEL=/home      /home                        ext3      defaults                 1 2
    none                      /proc                         proc      defaults                  0 0
    none                      /sys                           sysfs     defaults                 0 0
    /dev/hda3              swap                         swap     defaults                 0 0
    /dev/hdd                /media/cdrom            auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
    /dev/hdc                /media/cdrecorder    auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
    /dev/fd0                /media/floppy            auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
    Changed

    Code:
    LABEL=/home        /home                      ext3      defaults                1 2
    to

    Code:
    /dev/hda5               /home                      ext3      defaults                1 2
    Added:
    Code:
    /dev/hda6               /mnt/lfs                    ext3     defaults                 1 2
    /dev/hda7               /mnt/livecd               ext3     defaults                1 2
    /etc/fstab after editing;

    Code:
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    LABEL=/               /                                 ext3      defaults                 1 1
    LABEL=/boot        /boot                          ext3      defaults                 1 2
    none                     /dev/pts                     devpts  gid=5,mode=620   0 0
    none                     /dev/shm                   tmpfs    defaults                 0 0
    /dev/hda5               /home                      ext3      defaults                 1 2
    none                       /proc                        proc     defaults                  0 0
    none                       /sys                          sysfs    defaults                 0 0
    /dev/hda3               swap                        swap    defaults                 0 0
    /dev/hda6               /mnt/lfs                     ext3     defaults                 1 2
    /dev/hda7               /mnt/livecd               ext3     defaults                 1 2
    /dev/hdd                 /media/cdrom           auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
    /dev/hdc                /media/cdrecorder     auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
    /dev/fd0                /media/floppy              auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
    11.
    # reboot : PC rebooted with no trouble upto Login screen. I was not permitted to login as user, aphorism /home/user/ not found. however I was allowed to login as Root.

    12. Later than login as Root I revealed /home being vacant. Started Kconsole.
    Code:
    # cp -ar /home2/* /home/
    Logout and relogin. This time I was allowed to login as “user”

Similar Threads

  1. How to set up a Fedora Core on a USB disk
    By Zariah in forum Tips & Tweaks
    Replies: 5
    Last Post: 27-12-2010, 07:44 PM
  2. Install JAVA on Fedora Core
    By Rajnikant-Deva in forum Operating Systems
    Replies: 2
    Last Post: 27-12-2010, 07:29 AM
  3. How to Install mplayer on Fedora Core 12
    By Rajnikant-Deva in forum Windows Software
    Replies: 3
    Last Post: 26-12-2010, 06:55 AM
  4. Partitioning hard disk on Intel core i3
    By ravinderroy in forum Portable Devices
    Replies: 5
    Last Post: 02-12-2010, 07:30 AM
  5. Fedora Core 6 or Ubuntu
    By Natalie in forum Operating Systems
    Replies: 3
    Last Post: 31-03-2009, 11:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,839,389.87317 seconds with 16 queries