LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-01-2009, 02:58 PM   #16
Bller
Member
 
Registered: Aug 2009
Location: Bucharest, Romania
Distribution: Slackware 14.1
Posts: 228

Original Poster
Rep: Reputation: 17

I have a lost+found folder in this partition. Can i delete it?
 
Old 09-01-2009, 04:13 PM   #17
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Users should not be in the disk group unless you want raw access to the disk sectors. Unless you can articulate WHY you want that, you do NOT want that.

Don't delete lost+found.
 
Old 09-01-2009, 04:17 PM   #18
Bller
Member
 
Registered: Aug 2009
Location: Bucharest, Romania
Distribution: Slackware 14.1
Posts: 228

Original Poster
Rep: Reputation: 17
I won`t delete lost+found but how can i permanently mount this new partition ?
 
Old 09-01-2009, 05:18 PM   #19
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
This Quick and Dirty Guide to Linux File Permissions in the Linux Tutorials/Answers section of LQ should clear it up for you.

To permanently mount /dev/hda4 at /mnt/bller in /etc/fstab put:
Code:
/dev/hda4        /mnt/bller    ext3         defaults         1   0
There are different options to use depending upon you ... read "man mount" and "man fstab".
 
Old 09-01-2009, 05:57 PM   #20
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
Assuming your UID is 1000 and your GID is 100 put in /etc/fstab that line:

Code:
/dev/hda4   /mnt/bller   ext3   auto,uid=1000,gid=100   1   2
 
Old 09-01-2009, 08:18 PM   #21
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by w1k0 View Post
Assuming your UID is 1000 and your GID is 100 put in /etc/fstab that line:

Code:
/dev/hda4   /mnt/bller   ext3   auto,uid=1000,gid=100   1   2
Except uid and gid aren't valid options for native filesystems.

chown(1), chmod(1), and perhaps ACL's are all the OP needs.
 
Old 09-01-2009, 08:24 PM   #22
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Thinking of what Robby wrote, and not knowing what you've done, please post the output of:
Code:
ls -al /mnt/bller
cat /etc/fstab
mount
after you have it automounting through fstab.
 
Old 09-02-2009, 07:26 AM   #23
Bller
Member
 
Registered: Aug 2009
Location: Bucharest, Romania
Distribution: Slackware 14.1
Posts: 228

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Bruce Hill View Post
Thinking of what Robby wrote, and not knowing what you've done, please post the output of:
Code:
ls -al /mnt/bller
cat /etc/fstab
mount
after you have it automounting through fstab.
so i need to give my account root privilege with su-, afterwards i need to mount this partition like mount /dev/hda4 /mnt/hd ( this is the folder i would chose ), cose it`s already created in the mnt directory and i don`t need another one right?

now i have to do like ls -al /mnt/hd
and cat /etc/fstab

right?
 
Old 09-02-2009, 07:36 AM   #24
Bller
Member
 
Registered: Aug 2009
Location: Bucharest, Romania
Distribution: Slackware 14.1
Posts: 228

Original Poster
Rep: Reputation: 17
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
 
Old 09-02-2009, 08:14 AM   #25
nutronix
Member
 
Registered: Jan 2003
Location: montreal
Distribution: Slackware and Debian
Posts: 139
Blog Entries: 1

Rep: Reputation: 20
What i do is once the partition is created , as root i create a directory in / , then i create the mount point with ; vi /etc/fstab

Before i create the directory i do ; fdisk -l to make sure i identify the correct partition in /mnt (fstab) and give the necessary permissions.

I hate to admit that i go the easy unsecure way ; chmod 777 newdirectory.Here is part of my /etc/fstab;

/dev/hda5 /bidou2 ext3 defaults 0 0

Hope this helps!
 
Old 09-02-2009, 10:15 AM   #26
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by Bller View Post
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.
 
Old 09-02-2009, 10:34 AM   #27
Bller
Member
 
Registered: Aug 2009
Location: Bucharest, Romania
Distribution: Slackware 14.1
Posts: 228

Original Poster
Rep: Reputation: 17
163.9GB is the whole HDD (dev/hda) It`s my only HDD in my PC.
 
Old 09-02-2009, 12:14 PM   #28
Bller
Member
 
Registered: Aug 2009
Location: Bucharest, Romania
Distribution: Slackware 14.1
Posts: 228

Original Poster
Rep: Reputation: 17
root@Slack:~# mount /stuff/
mount: wrong fs type, bad option, bad superblock on /dev/hda4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 11: Cannot mount partition on Seagate FreeAgent Drive's secondary partition Erik Anderson Linux - Newbie 5 06-25-2009 01:10 AM
tricky backup of Linux system to NTFS partition to increase partition size Pandarsson Linux - General 5 07-09-2008 02:35 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration