[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda6 15G 2.5G 11G 19% /
tmpfs 124M 0 124M 0% /dev/shm
[root@localhost ~]# fdisk /dev/hda
The number of cylinders for this disk is set to 9733.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (8591-9733, default 8591):Using default value 8591
Last cylinder or +size or +sizeM or +sizeK (8591-9733, default 9733): +500M
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost ~]# partprobe /dev/hda
[root@localhost ~]# partprobe /dev/hda
[root@localhost ~]# partprobe /dev/hda
[root@localhost ~]# fdisk -l
Disk /dev/hda: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 2764 22201798+ 7 HPFS/NTFS
/dev/hda2 2765 9733 55978492+ 5 Extended
/dev/hda5 2765 6602 30828703+ 7 HPFS/NTFS
/dev/hda6 6603 8514 15358108+ 83 Linux
/dev/hda7 8515 8590 610438+ 82 Linux swap / Solaris
/dev/hda8 8591 8652 497983+ 83 Linux
[root@localhost ~]# mkfs.ext3 /dev/hda8
mke2fs 1.39 (29-May-2006)Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
124928 inodes, 497980 blocks
24899 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
61 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# mkdir /usertest
[root@localhost ~]# mount /dev/hda8 /usertest/
mount: you must specify the filesystem type[root@localhost ~]# mount /dev/hda8 /usertest/
[root@localhost usertest]# vim /etc/fstab
/dev/hda8 /usertest ext3 defaults 0 0
[root@localhost ~]# vim /etc/default/useradd
====================================================== GROUP=100
HOME=/usertest (Here we replace /home by /usertest)
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
=======================================================
[root@localhost ~]# useradd probal
[root@localhost ~]# passwd probal
Changing password for user probal.New UNIX password:
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# finger probal
Login: probal Name: (null)Directory: /usertest/probal Shell: /bin/bash
Never logged in.
No mail.
No Plan.
[root@localhost ~]# cd /usertest/
[root@localhost usertest]# ls
lost+found probal