LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-15-2002, 10:10 AM   #1
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
More Misc Linux Questions...


1. What would happen if I did a swapoff when other
processes are running? A Bad Thing?

2. What happens if I kill init (if possible)?

3. Are the settings in /etc/fstab visible only to the
mount command does the mount() system call
itself read this file?

4. How to check what kernel modules are active (
loadable types or otherwise)?

5. I can't access a device which I created w/ mknod.
for eg after I mknod myfile b 7 16 to create my
own loopback device file, I can't access it. Any
operations on myfile would give a 'not a valid device'
error message. I noticed that when I do an ls -l,
the owner is listed as my userid (root), but when
I ls -al the /dev dir, the owner is given as 'floppy'
or 'disk' etc. How do I fix this?

Last edited by ugenn; 04-16-2002 at 04:13 AM.
 
Old 04-16-2002, 06:21 AM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
1) I would hazard a guess that you could possibly get away with it if you have enough RAM and you aren't doing anything memory intensive.

4) I don't know what you mean by 'or otherwise', but to view what modules are being used, you type lsmod.
 
Old 04-16-2002, 07:18 AM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,568

Rep: Reputation: 164Reputation: 164
2 I guess it'll restart. But I'm not sure (haven't tried it).
 
Old 04-16-2002, 10:09 AM   #4
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
1. If you have enough memory available then swapoff is save to do even if the swapfile is being used. If however it's swapping because there is not enough memory available then running swapoff could cause problems.

2. Init is the parent of most processes so it has to stay running. That's why it's also impossible to kill it. Not even with a SIGKILL.

3. The /etc/fstab file is just a text file. Usually the mount command will look in this file but it isn't necessary. The mount command keeps record of the mounted filesystems in the /etc/mtab file. This is also just a text file so you can just view the contents.

4. Like Thymox said lsmod lists the loaded modules. If you want to see which modules are available. Just run the following command to go to the kernels module directory and browse around:

cd /lib/modules/`uname -r`

5. Just making a device file is usually not enough. You have to either enable the support for it in the kernel or load the appropriate module.
If you want to change the owner/group of a file then run the command:

chown username.groupname filename
 
Old 04-16-2002, 10:38 AM   #5
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mik

3. The /etc/fstab file is just a text file. Usually the mount command will look in this file but it isn't necessary. The mount command keeps record of the mounted filesystems in the /etc/mtab file. This is also just a text file so you can just view the contents.

Well, that didn't really answer the question. What I meant was, if I had a C program (say foo) which contains
the syscall mount(). Does the implementation of mount()
access the etc/fstab file or is that file merely read by /bin/mount executable.

4. Like Thymox said lsmod lists the loaded modules. If you want to see which modules are available. Just run the following command to go to the kernels module directory and browse around:

cd /lib/modules/`uname -r`

lsmod lists only loadable modules. What if I wanted to know what compiled-in drivers are also available? (looking at source is not an accepted answer

5. Just making a device file is usually not enough. You have to either enable the support for it in the kernel or load the appropriate module.
If you want to change the owner/group of a file then run the command:

The support does exist. I was trying to create another device file for the loopback driver (major ver 7) which
was already compiled into the kernel by default.

chown username.groupname filename [/B]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Misc. Questions About 10.2 Duo Secundus Slackware 1 09-29-2005 06:40 AM
A week of Linux.....couple misc questions justanotherstev Linux - Newbie 4 10-28-2003 04:26 PM
Misc Questions OlRoy Linux - General 3 12-09-2002 07:03 PM
Misc Questions.... ugenn Linux - General 2 06-27-2002 02:00 PM
Misc. Linux questions. ugenn Linux - Newbie 7 04-16-2002 10:42 AM


All times are GMT -5. The time now is 08:31 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration