SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi! I am a new user to Slackware, I've finally got it all running and everyhting is sweet. SO I've decided to make it a bit more "perfect" I guess.
In my machine I had two 120gig hard drives formatted to NTFS for XP. One of them had all my media on it, the other had Windows. I installed Slack over the Windows one with the swap, /home, /root partitions as instructed, and Linux even can read the NTFS drive, so I asked it to do that.
Anyways I am not using Windows on this machine anymore, and Linux can't write to NTFS without third party programs (I read), so I thought I would copy the media into /home, wipe the other drive, format it to Linux FS and copy them back.
I deleted the partitons in fdisk, and created a new primary one using all the space. But it isn't working. At first when I loaded KDE it was still an NTFS drive (nothing had changed), so I rebooted and tried again. The next time I couldn't access the drive, even from root.
The same thing happens, and I get an error in the startup about it, but Slack still loads. Also, LILO still asks me if I want to boot into Windows (though there was never a Windows install on this drive).
Sometimes simple is best. Check you BIOS settings for a anti-virus for the MBR, may also just be a write-protect feature. Make sure it is off.
After that, try the Linux fdisk or cfdisk again. Change it to a different type, then reboot, then again back to a linux type 82. Then you need to format it (fdisk only sets up the partion as 'linux' partition type, formatting actually makes the filesystem.
Use the 'mkfs' comammand ("Make FileSytem"). For example:
Code:
mkfs.ext3 /dev/hdb
This assumes you want a ext3 filesystem on HDb.
Then edit your lilo.conf to get rid of the section mentioning windows, run 'lilo' and reboot
Let us know how it works
Last edited by cwwilson721; 01-07-2006 at 08:31 AM.
OK, I did that. Might I thank you for explaining in detail about the Make Filesystem, all the names of these processes does get overwhelming. Thanks also, it is mounted and looks to be working.
How does one set up the access for such a drive? I would like it to be accessable for all users, not just root. I think it is in fstab or mtab or something. I opened up those as they were in one of the error messages.
EDIT: How can I edit lilo.config? It won't open in any text editor I have tried.
EDIT: Nevermind about liloconfig, its a shell script. Duh.
How does one set up the access for such a drive? I would like it to be accessable for all users, not just root. I think it is in fstab or mtab or something. I opened up those as they were in one of the error messages.
Open a terminal and su to root and edit /etc/fstab to add a line for your new HD, something like this:
/dev/hdbx /mnt/name ext3 noauto,user,rw 0 0
Where x is the partition number and name is whatever you want to call the mount point, ext3 is the file system, noauto keeps it from being automounted at boot, user allows any user to mount/unmount it with read/write (rw) permission.
[EDIT]Be sure and create a directory in /mnt called name.[/EDIT]
For the permissions, I do not know. I'm the only user of my system, so I can always get to it. Others on this forum, as you'll find out, will be more than willing to help. Wait a few minutes, someone will help.
Yeah, I edited that one too. I did a search for lilo. That problem I have overcome, with your help.
MMYoung, thank you also for explaing exactly what all that meant. I did all that but I still can't seem to put files onto that hard drive. I'll continue to play with it.
What do the two 0's mean? On some of my drives there are 1 1 and 1 2?
What do the two 0's mean? On some of my drives there are 1 1 and 1 2?
I'm at work right now on a Windows 2000 PC. Will have to pull my notes out when I get home in about an hour. The other stuff was from memory but I *think* it has something to do with the partition boot/load order, but don't quote me one that .
Good memory MMYoung! Cut straight from fstab man page:
[snip]
The fifth field, (fs_freq), is used for these filesystems by the dump(8) command to deter-mine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.
The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.
[snip]
MMYoung, thank you also for explaing exactly what all that meant. I did all that but I still can't seem to put files onto that hard drive. I'll continue to play with it.
No problem. As far as accessing the drive let's do this by the numbers.
1. You edited your fstab to be similar to what I posted above.
2. You created the /mnt/name directory.
3. From the terminal, and as your regular user account, you typed in:
Code:
mount /mnt/name
If that doesn't work, open a terminal and log in as root. Then please post the output of the following:
Code:
dmesg | grep hd
Just the fisrt few lines, for example:
Code:
ide0: BM-DMA at 0xa000-0xa007, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xa008-0xa00f, BIOS settings: hdc:DMA, hdd:DMA
hda: ST380011A, ATA DISK drive
hdb: ST380011A, ATA DISK drive
hdc: LITE-ON DVDRW SOHW-1633S, ATAPI CD/DVD-ROM drive
hdd: LITE-ON DVD SOHD-167T, ATAPI CD/DVD-ROM drive
If your second HD is listed as hdb (and it should unless its SCSI) then run:
Code:
cfdisk /dev/hdb
My output looks like this:
Code:
cfdisk 2.12p
Disk Drive: /dev/hdb
Size: 80026361856 bytes, 80.0 GB
Heads: 255 Sectors per Track: 63 Cylinders: 9729
Name Flags Part Type FS Type [Label] Size (MB)
------------------------------------------------------------------------------
hdb1 Primary Linux ext3 10742.22
hdb5 Logical Linux swap 1077.52
hdb6 Logical Linux ext3 57.58
hdb7 Logical Linux ext3 5371.11
hdb8 Logical Linux ext3 10742.22
hdb9 Logical Linux ext3 10742.22
hdb10 Logical Linux ext3 57.58
hdb11 Logical Linux ext3 5371.11
hdb12 Logical Linux ext3 10742.22
hdb13 Logical Linux ext3 [/] 10734.00
hdb14 Logical Linux ext3 [/var] 5371.11
This way we can make sure you have the proper /dev/hdwhatever listed in /etc/fstab.
Good memory MMYoung! Cut straight from fstab man page:
[snip]
The fifth field, (fs_freq), is used for these filesystems by the dump(8) command to deter-mine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.
The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.
[snip]
Well I was close anyway, I knew it had something to do with booting .
I have a similar setup on my home machine, I have two IDE hard drives, both 120G. The first is partitoned up to my liking and is a standard Slackware installation. The second stores media that I want everyuone to have access to. Both drives use reiser (though it doesn't really matter, except that they are NOT vfat or NTFS, any "Linux" filesystem will work similarly).
The solution suggested by MMYoung is very good, but I use a slightly different approach. I don't want users to have to mount the media. It should just "be there" for users to do with as they please. Of course, I have restrictions on what can be done (no need letting the kids accidently delete my mp3 collection). Note I'll abbreviate, since you seem to have mosteverything already primed (if you followed MMYoung's thorough guide).
First, I decide where I want to store my media in the Filesystem Hierarchy. My personal choice is to store it under /usr/share/multimedia. In order to help understand permissions better, I will also say that under /usr/share/multimedia I also have /Pics /Music and /Movies.
Note that differs slightly from MMYoung's post in that I choose not to use /mnt as a mount point. This is because I want a persistant mount, not a temporary one. Note that there is nothing to stop you from using /mnt as a mount point. It just makes more sense to me that a) I keep my media files permanently mounted, and b) permanent mounts really don't belong under /mnt.
Anyway, since I have decided that I am going to mount the second hard drive to /usr/share/multimedia, the first thing to do is created the directory. As root:
Code:
mkdir /usr/share/multimedia
Now comes your first decision. Who can do what in this new directory (which will soon hold the contents of the second hard drive)? Change the permissions/ownership (or don't) accordingly. The important thing to note here is that executable permission on a directory allows one to enter the directory.
For my specific needs (yours may vary), I changed the permissions to:
THis means that I (as user shilo) can do whatever I want inside this directory. Anyone else is dis-allowed from writing to it. Another possible solution would be to make the permissions/ownership look like this:
THis would allow all members of the users group permission to do whatever they want. There are any number of possibilities available, including creating a new group specifically for the purpose of allowing access to this directory.
Next up, /etc/fstab. Here's the important addition to mine:
Now, when I fire up the computer, the second harddrive is mounted right up. Note that I need not give user permission. That affects the user ability to mount the drive and nothing else. Now, the second hard drive is a seemless addition to my system (120G available for media storage under /usr/share/multimedia). Also note that I use "1 2" and not "0 0". If you set up a drive with multiple partitons, you will note that Slackware default all non-root ('root" as in FS, not user) hard drive partitions this same designation, whereas the "0 0" is used for devices that aren't mounted at boot time.
That is really all I have to add. To give a little further demonstration on my setup:
User "shilo" owns this directory. It belongs to the group "users". "shilo" can do anything. Others cannot write to this directory. The group here is largley irrelevant, since group and others share the same permissions (also, all users on my system are a member of the group "users".
Now, I have something more interesting. /music is still open to everyone to read. I don't really feel like letting everyone into my /movies and /pics, though. User "shilo" is allowed to do anything in these directories. Members of the group "wheel" just can't write to the directories. Others can't do anything to the directories (no peeking).
Hope this all makes sense. The basic ideas are:
1) You don't need to manually mount added storage. It can be mounted just like the rest of the filesystem.
2) You can mount anywhere in the filesystem. Use whatever makes sense to you. I look at mounting additional hard drives permanently under /mnt as a by-product of using Windows. People tend to think in terms of "Drive C:", "Drive D:", etc. The ability to seemlessly add filesystems to any point is one of the nice things about UNIX systems, IMHO.
3) /etc/fstab is not used to grant file permissions (except in the case of filesystems that don't utlize permissions, i.e. vfat). It CAN be used to limit permissions (i.e. mount read-only), but this is best left for learning after you understand file permissions in general.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.