Quote:
Originally Posted by Bller
I have like this :
ls -al /mnt/
bller@Slack:~$ ls -al /mnt/
total 44
drwxr-xr-x 10 root root 4096 2006-09-26 06:09 ./
drwxr-xr-x 20 root root 4096 2009-09-01 18:56 ../
-rw-r--r-- 1 root root 376 2006-09-26 06:09 README
drwxr-xr-x 2 root root 4096 2006-09-26 04:02 cdrecorder/
drwxr-xr-x 2 root root 4096 2002-03-16 09:34 cdrom/
drwxr-xr-x 2 root root 4096 2006-09-26 04:02 dvd/
drwxr-xr-x 2 root root 4096 2002-03-16 09:34 floppy/
drwxr-xr-x 2 root root 4096 2002-03-16 09:34 hd/
drwxr-xr-x 2 root root 4096 2006-09-26 04:02 memory/
drwxr-xr-x 2 root root 4096 2006-09-26 04:03 tmp/
drwxr-xr-x 2 root root 4096 2006-09-26 04:02 zip/
cat /etc/fstab
bller@Slack:~$ cat /etc/fstab
/dev/hda2 swap swap defaults 0 0
/dev/hda3 / ext3 defaults 1 1
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
and fdisk -l using root
root@Slack:/home/bller# fdisk -l
Disk /dev/hda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x66e77f5e
Device Boot Start End Blocks Id System
/dev/hda1 * 1 62 497983+ 83 Linux
/dev/hda2 63 159 779152+ 82 Linux swap
/dev/hda3 160 5265 41013945 83 Linux
/dev/hda4 5266 19929 117788580 83 Linux
|
Before reading further, please notice that you have created 4 primary
partitions on this disk. That means you can not make any more partitions,
because you can only have 4 primary. If you make 3 primaries and then
create an extended partition, you can make more there. Also, you have
a disk listed as 163.9 GB, which is a strange number. What is that disk?
You could issue "dmesg | grep 'ATA'" and find a line that tells about it,
such as:
Code:
[ 1.129548] ata1.00: ATA-8: HITACHI HTS542525K9SA00, BBFZC3HP, max UDMA/133
I'm just curious what disk you have there ... this isn't necessary.
I think the problem is that you have created a partition somehow,
but have not finished the process. Here's how it should go ...
First, you create the partition with "fdisk" or "cfdisk" or some other
method of your choice, but either of those would be good enough. And
that can be done with your running Slackware system. I'll do it for you
to see the exact steps, but since you already created the partition, I
will skip creating the partition (I used "cfdisk /dev/sda"):
Code:
root@jeremiah:~# fdisk -l
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x77777777
Device Boot Start End Blocks Id System
/dev/sda1 * 1 4981 40003728 7 HPFS/NTFS
/dev/sda2 4981 6197 9767520 c W95 FAT32 (LBA)
/dev/sda3 6197 6452 2048287+ 82 Linux swap
/dev/sda4 6452 11935 44042197+ 5 Extended
/dev/sda5 6452 6464 96358+ 83 Linux
/dev/sda6 6464 8288 14651248+ 83 Linux
/dev/sda7 8288 11327 24410736 83 Linux
/dev/sda8 11327 11935 4883728+ 83 Linux <-- newly created partition, not yet formatted
Now I must format the newly created partition:
Code:
root@jeremiah:~# jfs_mkfs -c /dev/sda8
jfs_mkfs version 1.1.14, 06-Apr-2009
The system cannot find the specified device.
So I must reboot for Slackware to see the new partition.
Code:
root@jeremiah:~# jfs_mkfs -c /dev/sda8
jfs_mkfs version 1.1.14, 06-Apr-2009
Warning! All data on device /dev/sda8 will be lost!
Continue? (Y/N) y
100 percent of the disk has been formatted.
Format completed successfully.
4883728 kilobytes total disk space.
Now my new partition is formatted, but it's not mounted:
Code:
root@jeremiah:~# mount
/dev/root on / type jfs (rw,relatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda5 on /boot type jfs (rw)
/dev/sda7 on /home type jfs (rw)
/dev/sda1 on /Vista type fuseblk (rw,allow_other,default_permissions,blksize=4096)
/dev/sda2 on /Shared type vfat (rw,gid=102,dmask=0002,fmask=0113)
tmpfs on /dev/shm type tmpfs (rw)
192.168.1.11:/home on /serverhome type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.11,nfsvers=3,proto=udp,mountproto=udp,mountport=765)
192.168.1.51:/backup on /server1 type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.51)
192.168.1.11:/backup2 on /server2 type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.11,nfsvers=3,proto=udp,mountproto=udp,mountport=765)
Previously you said you wanted to mount it on /mnt/bller; however, since
the /mnt directory is really for temporarily mounted devices, I would do
as nutronix, and create a directory under / for it's mount point. The name
should correspond to what use you have for it.
Here's how to create a mount point, then mount the disk, then
make it read/writeable by user bller, and mount automatically
whenever you start Slackware.
First, make the directory for your mount point:
Code:
root@jeremiah:~# mkdir /stuff
Which was created as root, so it has these perms:
Code:
root@jeremiah:~# ls -al /stuff/
total 12
drwxr-xr-x 2 root root 1 2009-09-02 22:42 ./
drwxr-xr-x 26 root root 8192 2009-09-02 22:42 ../
Remember the Quick and Dirty Guide to Linux File Permissions
that I posted earlier? We see that root is the owner, and the
group is also root. Your normal user should not be in that group;
but let's check:
Code:
mingdao@jeremiah:~$ id
uid=1000(mingdao) gid=100(users) groups=7(lp),10(wheel),11(floppy),17(audio),18(video),19(cdrom),83(plugdev),84(power),86(netdev),93(scanner),100(users)
So we need to make the owner of that group your normal user.
I think someone earlier told you to "chown -R myuser /mnt/myuser",
but that will still have the group set as root:
Code:
root@jeremiah:~# chown mingdao /stuff/
root@jeremiah:~# ls -al /stuff/
total 12
drwxr-xr-x 2 mingdao root 1 2009-09-02 22:42 ./
drwxr-xr-x 26 root root 8192 2009-09-02 22:42 ../
You want the group to be one that user bller is in, so do it this way:
Code:
root@jeremiah:~# chown mingdao.users /stuff/
root@jeremiah:~# ls -al /stuff/
total 12
drwxr-xr-x 2 mingdao users 1 2009-09-02 22:42 ./
drwxr-xr-x 26 root root 8192 2009-09-02 22:42 ../
To have that partition mounted at /stuff every time you boot,
this is how you can add it to /etc/fstab:
Code:
root@jeremiah:~# echo "/dev/sda8 /stuff jfs defaults 1 0" >> /etc/fstab
or if you're not comfortable doing that, just edit the file as root.
NB: Your line should be "/dev/hda4 /stuff ext3 defaults 1 0"
and also change your mount point if you don't use /stuff
Now we have the mount point, we have it owned by bller, and we have
/etc/fstab setup so that it automatically mounts each boot. Let's give
it a test to see what we have, by mounting and checking it:
Code:
root@jeremiah:~# mount /stuff/
root@jeremiah:~# ls -al /stuff/
total 12
drwxr-xr-x 2 mingdao users 256 2009-09-02 22:20 ./
drwxr-xr-x 26 root root 8192 2009-09-02 22:42 ../
root@jeremiah:~# logout
mingdao@jeremiah:~$ ls -al /stuff/
total 12
drwxr-xr-x 2 mingdao users 256 2009-09-02 22:20 .
drwxr-xr-x 26 root root 8192 2009-09-02 22:42 ..
mingdao@jeremiah:~$ vim /stuff/test
mingdao@jeremiah:~$ ls -al /stuff/
total 16
drwxr-xr-x 2 mingdao users 16 2009-09-02 23:00 .
drwxr-xr-x 26 root root 8192 2009-09-02 22:42 ..
-rw-r--r-- 1 mingdao users 19 2009-09-02 23:00 test
mingdao@jeremiah:~$ mount
/dev/root on / type jfs (rw,relatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda5 on /boot type jfs (rw)
/dev/sda7 on /home type jfs (rw)
/dev/sda1 on /Vista type fuseblk (rw,allow_other,default_permissions,blksize=4096)
/dev/sda2 on /Shared type vfat (rw,gid=102,dmask=0002,fmask=0113)
tmpfs on /dev/shm type tmpfs (rw)
192.168.1.11:/home on /serverhome type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.11,nfsvers=3,proto=udp,mountproto=udp,mountport=765)
192.168.1.51:/backup on /server1 type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.51)
192.168.1.11:/backup2 on /server2 type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.11,nfsvers=3,proto=udp,mountproto=udp,mountport=765)
/dev/sda8 on /stuff type jfs (rw)
Then after you reboot, here's what you have there:
Code:
mingdao@jeremiah:~$ mount
/dev/root on / type jfs (rw,relatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda5 on /boot type jfs (rw)
/dev/sda7 on /home type jfs (rw)
/dev/sda1 on /Vista type fuseblk (rw,allow_other,default_permissions,blksize=4096)
/dev/sda2 on /Shared type vfat (rw,gid=102,dmask=0002,fmask=0113)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda8 on /stuff type jfs (rw)
192.168.1.11:/home on /serverhome type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.11,nfsvers=3,proto=udp,mountproto=udp,mountport=765)
192.168.1.51:/backup on /server1 type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.51)
192.168.1.11:/backup2 on /server2 type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=192.168.1.11,nfsvers=3,proto=udp,mountproto=udp,mountport=765)
mingdao@jeremiah:~$ ls -al /stuff/
total 16
drwxr-xr-x 2 mingdao users 16 2009-09-02 23:00 .
drwxr-xr-x 26 root root 8192 2009-09-02 22:42 ..
-rw-r--r-- 1 mingdao users 19 2009-09-02 23:00 test
And it's read/write by the normal user:
Code:
mingdao@jeremiah:~$ vim /stuff/test
mingdao@jeremiah:~$ rm /stuff/test
mingdao@jeremiah:~$ ls -al /stuff/
total 12
drwxr-xr-x 2 mingdao users 1 2009-09-02 23:05 .
drwxr-xr-x 26 root root 8192 2009-09-02 22:42 ..
Hope this helps.