H folks,
I got my HD repartitioned. Steps taken as follows;
1. Boot into "init 1" (GRUB Bootloader)
2.
sh-3.00# mount /dev/hda5 /mnt
Already mount
3.
sh-3.00# mkdir /home2 && cp -ar /mnt/* /home2/
4.
sh-3.00# umount /dev/hda5
5.
Used fdisk to delete partition hda5 and to recreate 3 new partitions in the space left
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, defult 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, defult 3908): 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, defult 4638): 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
sh-3.00# (type) reboot and press [Enter]
FedoraCore3 rebooted and step 1. above was repeated to boot into "init 1" again.
Now the trick was here.
At end of booting a warning popup requesting to enter password and run "fsck". I tried half an hour to get it fixed without result. Then I continued as follows.
# mkfs -t ext3 /dev/hda5
# mkfs -t ext3 /dev/hda6
# mkfs -t ext3 /dev/hda7
All worked without complaint.
Actually It was already running on "init 1" We can omit step 1. above after reboot and let the PC boot automatically. The it will boot into "init 1" finally.
6.
# cp -ar /home2/* /home/
Another trick happened here. It seemed copying all data back to /home. The Hard Drive was working with the pilot light on.
# mkdir /mnt/LFS
# mkdir /mnt/LiveCD
7.
Edited /etc/fstab
Original /etc/fstab before editing;
# 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
bject_r:removable_t,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,fscontext=system_u
bject_r:removable_t,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,fscontext=system_u
bject_r:removable_t,managed 0 0
Changed
LABEL=/home /home ext3 defaults 1 2
to
/dev/hda5 /home ext3 defaults 1 2
Added:
/dev/hda6 /mnt/LFS ext3 defaults 1 2
/dev/hda7 /mnt/LiveCD ext3 defaults 1 2
/etc/fstab after editing;
# 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
bject_r:removable_t,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,fscontext=system_u
bject_r:removable_t,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,fscontext=system_u
bject_r:removable_t,managed 0 0
Reboot the PC again
PC rebooted without problem to Login screen. I was not allowed to login as user �satimis� saying /home/satimis/ not found. But I was allowed to login as Root
After login as Root I discovered /home being empty. After copying all files from /home2 back to /home. Login and relogin. This time I was allowed to login as "satimis"
Now
# fdisk -l /dev/hda
Code:
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 13 104391 83 Linux
/dev/hda2 14 2563 20482875 83 Linux
/dev/hda3 2564 2690 1020127+ 82 Linux swap
/dev/hda4 2691 4865 17470687+ 5 Extended
/dev/hda5 2691 3907 9775521 83 Linux
/dev/hda6 3908 4637 5863693+ 83 Linux
/dev/hda7 4638 4865 1831378+ 83 Linux
# df -hT
Code:
Filesystem Type Size Used Avail Use% Mounted on
/dev/hda2 ext3 20G 6.3G 12G 35% /
/dev/hda1 ext3 99M 14M 80M 15% /boot
none tmpfs 125M 0 125M 0% /dev/shm
/dev/hda5 ext3 9.2G 1.4G 7.4G 16% /home
/dev/hda6 ext3 5.6G 44M 5.2G 1% /mnt/LFS
/dev/hda7 ext3 1.8G 35M 1.6G 3% /mnt/LiveCD
Comments are appreciated. TIA
B.R.
satimis