Results 11 to 19 of 19
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 && ...
- 06-02-2005 #11Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
Hard drive repartition finished
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 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, defult 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
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: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
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: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
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# df -hTCode: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
Comments are appreciated. TIACode: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
B.R.
satimis
- 06-02-2005 #12Linux Guru
- Join Date
- May 2004
- Location
- forums.gentoo.org
- Posts
- 1,814
Well done, satimis! Hopefully, you have recognized that the "tricky" parts were simply due to not doing things in the best sequence, but you eventually got everything done. After rebooting, I think the system was unhappy with trying to mount the unformatted hda5 as fstab wanted. Similarly, if you had simply commented ('#') the hda5 line in fstab, there would not have been a complaint.
My only suggestion from here would be to find a different place to mount LiveCD and LFS. I think the preference is to reserve /mnt/ for mounting of filesystems not mounted at boot. You could as well create a mount point under your home directory or elsewhere. But it's your system and there is no problem with how you have it.
Cheers~/IMHO
//got nothin'
///this use to look better
- 06-02-2005 #13Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
Hi drakebasher,
I still can't understand on step 6. in my previous posting
6.
# cp -ar /home2/* /home/
nothing has been copied to /home. Therefore on reboot I was not allowed to login as "satimis" complaining unable to find /home/satimis.
However I was allowed to login as Root. But under the /root and /home directories both were empty. Then I copied /home2/ back to /home again. On next reboot the PC worked normal again.
Here is another tricky part /etc/fstabAfter rebooting, I think the system was unhappy with trying to mount the unformatted hda5 as fstab wanted. Similarly, if you had simply commented ('#') the hda5 line in fstab, there would not have been a complaint.
Original entry
LABEL=/home /home ext3 defaults 1 2
I tried following entries
LABEL=/home /dev/hda5 ext3 defaults 1 2
LABEL=/dev/hda5/home /home ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
without result. PC failed to boot.
Only following entry work.
/dev/hda5 /home ext3 defaults 1 2
Whether as Super RootMy only suggestion from here would be to find a different place to mount LiveCD and LFS...
# mkdir /LFS
# mkdir /LiveCD
Edit /etc/fstab as
.....
/dev/hda6 /LFS ext3 defaults 1 2
/dev/hda7 /LiveCD ext3 defaults 1 2
B.R.
satimis
- 06-02-2005 #14Linux Guru
- Join Date
- May 2004
- Location
- forums.gentoo.org
- Posts
- 1,814
Re: Hard drive repartition finished
Unless you left a step out of your narrative, it appears that /dev/hda5 was not mounted at /home, but that should not have kept you from writing to the root partition under the /home/ directory, so I too am puzzled there. As for the /root/ directory (root's home), there should not be much there, if anything (well, I guess there should be something).
Originally Posted by satimis
I should have mentioned something here. This seems to be peculiar to Fedora and occaissionally creates confusion: with the command 'e2label' you can set or check the "label" of any partition. You could label /dev/hda5 "foobar" and then the applicable line in fstab could be either 'LABEL=foobar' or '/dev/hda5'. I think this is useful if you sometimes change drives like in a file server. I prefer the direct '/dev/hda5' syntax because I know where it applies and how, and it is not distro-specific.Only following entry work.
/dev/hda5 /home ext3 defaults 1 2
One additional note: in the cp command, when the -a switch is used, I think the -r switch is redundant. I like to use the -v switch as well so I can watch all my files go where they belong!
/IMHO
//got nothin'
///this use to look better
- 06-03-2005 #15Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
Re: Hard drive repartition finished
Hi drakebasher,
Noted with thanksOne additional note: in the cp command, when the -a switch is used, I think the -r switch is redundant.....
B.R.
satimis
Folks,
One further advice. I have all steps written down in details on a file as guidance before starting repartition. I think it may assist other folks on the forum if they need the steps for reference. Please advise where shall I post the file on Internet.
satimis
- 06-03-2005 #16Linux Guru
- Join Date
- May 2004
- Location
- forums.gentoo.org
- Posts
- 1,814
There is a collection of tutorials in these forums, gotten to by the "Linux Tutorials" link in the header bar next to "Linux Forums". I'm sure that if you posted your notes to the "Comments / Feedback / Suggestions" forum, perhaps with a subject of "Submission for Tutorial" or something similar, it would get prompt attention. I'm sure others will appreciate your efforts to share what you know, as I appreciate them.
/IMHO
//got nothin'
///this use to look better
- 06-03-2005 #17Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
Hi drakebasher
I found it.......posted your notes to the "Comments / Feedback / Suggestions" forum, perhaps with a subject of "Submission for Tutorial" or something similar.....
My notes is quite complete including the steps in booting to "init 1" the Single User Mode.
However I have one point to consider. Whether to post all having been ecountered here such as;
# cp -ar /home2/* /home/
without result and need to recopy them the second time after login as Root.
Any suggestion
B.R.
satimis
- 06-03-2005 #18Linux Guru
- Join Date
- May 2004
- Location
- forums.gentoo.org
- Posts
- 1,814
If it was me, I'd include the step, along with a statement of what you expected and what you got, making clear that it's an open question. The reader will then be able to make his own choices with eyes open, and ideally, someone may even discover where to error is so that you could then correct your material. I've read through quite a few tutorials, mostly from The Linux Documentation Project (they have an expansive collection: tldp.org) and this sort of problem, though usually at a more esoteric level, is not at all unusual. I guess we are all newbies at some level.
Kind regards~/IMHO
//got nothin'
///this use to look better
- 06-04-2005 #19Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
Document submitted
Hi drakebasher,
Document submitted to -> Linux Forum -> The Community -> Comments/Feedback/Suggestions
B.R.
satimis


Reply With Quote