General :: How Does Kernel Know The Root Directory?
Mar 25, 2010
How the kernel knows the root directory. For example, in grub menu.lst file we specify root=/dev/hda1. This tells the kernel to find mount the root directory from /dev/hda1. But to read /dev/had1 it should first know where is '/' . I couldn't understand how this is being done.
how the kernel knows the root directory. For example, in grub menu.lst file we specify root=/dev/hda1. This tells the kernel to find mount the root directory from /dev/hda1. But to read /dev/had1 it should first know where is '/' . I couldn't understand how this is being done.
I have a machine which has only /opt with some decent amount of space where I can install a software. /opt belongs to root:root. The software I want to install cannot be installed as root user.
So lets say I create a directory called /opt/install1 and then chown -R install1 to belong to user1. And now I install the software under /opt/install1 with user as user1.
Is this a best practice violation? There could potentially be just /opt/install1 belong to user1 and in future everything else created under /opt belonging to root..
I am using fedora 12. i got "no space in root directory" warning from the system..when i went through it, i found many of the space has been occupied by /var/log/httpd/error-log file. so i just deleted the file..but when i check the space with "df -h" command.it shows 0% availability..the same problem occured before...but it solved when i restarted the system..but how to regain the space wihtout restarting the system?
I have assigned 4G for my "/" directory, on slacware 10.2, and have not installed the GUI either. I am not sure what files to look for that have been growing over time that has completely depleted my space. Think it would be log files, but don't know where to find them.
I am using fedora 13. When I list the root directory with the command: 'ls -la'. I see the parent directory symbol as '..' So, which is the parent directory for root directory?
ubuntu@ubuntu:/usr/lib/locale$ sudo rm -R nl_NL.utf8 rm: cannot remove directory `nl_NL.utf8': Input/output error I'm having problems deleting a seemingly corrupted directory to allow for a reconfiguration of this locale, but the OS doesn't let me do it. Why?
For a user on a Linux host, I need to make everything inaccessible besides his home directory. I have heard that this is usually done by changing the root directory for the user (and setting it to the user's home directory), however I couldn't find the way to do it.
I thought about the chroot command, but it seems it just runs the specified command, considering the specified directory as the root directory. So it seems chroot is not what i need. So my question is: what is the command which changes the user's root directory?
The root filesystem is the filesystem that is contained on the same partition on which the root directory is located, and it is the filesystem on which all the other filesystems are mounted.
In a multi-OS desktop, having Windows, Ubuntu and Fedora, what is the root filesystem as the root directory is located on at least 2 of the OS.
I am getting the databases from mysql and my database name is username_something. I am getting the username and then puting the respective backups in corresponding folders like
tar bala bla /backups/sql/username/username_something.tar.sql.gz
The problem is system worrks if i have the folder username already there but for new databases if get the error like unknown file path.
How can i do that if username folder is not there it should be created
I am running WHM and CPANEL on centos.I would like to upload a file to the root user directory. To be honest, my only experience uploading and downloading files with FTP has been with domain related accounts that were set up under WHM to be managed under CPANEL. This is quite simple, because all you do is set FileZilla or Dreamweaver up with the FTP address of the domain account and the username and password.How can I do something similar to FTP a file into the root or home directory?
I no longer have access to my root desktop. On a session I attempted to change the root username but i apparently assigned it a wrong directory that does not exist. When I rebooted with my new root username, i was instead recognised as a simple user (no root privileges). I tried the console to change to "old" root but root password is not accepted and there is no way to access to sudoer files. it seems that inserting a new username requires root privileges and i am back to square one. Simply logging with old root username and password after restart gives me a blank screen with nothing on it and cannot even reboot.
I run ProFTPd with TLS authentication on my Debian Lenny server. My problem is that despite of the fact that my users connect chrooted, one of my friends had root privileges after logging in form a Macintosh and could browse the root directory, too.
I have accidentally ended up in deleting my root directory while I blindly fired command while watching movie.
I fired following command #rm -rf ~/<SPACE>*.out instead of this command #rm -rf ~/*.out
Things already done: 1) Created /root directory relogged to get some of basic settings of gnome and Desktop. 2) Things went well now when I login my desktop ,gnome environment and other things looks to be working well only prompt on my terminal has changed. I can fix it any ways.
Things I want to ask: 1) I haven't studied much about contents of /root directory to best of my knowledge is it like other user's home directory with some basic configuration files for mostly required applications. SO my question is have I lost any thing important system file or something? 2) If I have lost any important configuration or system data how can I recover it without reinstalling whole system? (My opinion about this is, It is quite possible but to do so, as far as I know capabilities of linux. But I still want comments from experts before I try any things on it because I don't want to backup my whole HDD and reinstall the whole stuff again for me and also my sister's stuff in MS.)
I have successfully migrated my linux install to a new /, /home, /boot partition on my ssd. Everything works fine, except that it won't make the root directory on the right disk. When I change the root=uuid=<drive id> to my new drive everything is fine, but I can't automate that... in other words I have manually typed the uuid of my root-partition for about 100 times now and I am fed up with that how I can save the uuid of my new drive in the startup parameters?
When I log on a root and attempt to issue the command Freshclam to upgrade the virus definitions it attempts or create a new file with a definition name. I get a message stating that the directory isnt writable. The user and group access rights are as follows:
USER = read, write, execute Group = read, write, execute All= read, execute.
The only way I can get around this is by applying a 777 which would be read, write and execute for all. Now, I have a group define with several user ids in it including Root.How do I connect the group with the directory/file so I dont have to apply a 777 access right to group users could issue the Freshclam command.
I have a SuSe 10 sp2 box to administer. explain the significance of the /Boot and how to use the different kernel versions, any best practices and any good to know 'How to's'
I am looking for Windows Search equivalent looking for file name patterns (not file contents but file names)....
I am aware of "globbing" and wildcard recursive search functionality in ls but I am still not capable of finding files under directories.
for example: I want to find all files starting with a string lsnr* under root directory / and any sub-directories.....
ie I want to look for files like lsnr*.* anywhere under / and any sub-directories under / such as /dir1/dir2/dir4 and dir1/other/dir/someotherdir/sub-dir etc.
so if I have /dir1/lsnrcontrol and also have /dir1/dir/2/dir3/lsnr-tinit.dat then I want to list the files names etc.
Or would this sacrifice security in some way? I've been using root only, and am ready to have a seperate account now. It's the dotfiles for GUI apps that I'm concerned about:
Code: -rw------- 1 root root 98 Feb 13 16:23 .Xauthority -rw------- 1 root root 6392 Feb 12 18:13 .bash_history drwx------ 5 root root 4096 Jan 13 17:47 .config drwxr-xr-x 4 root root 4096 Dec 29 21:36 .fvwm drwx------ 4 root root 4096 Nov 7 19:55 .mozilla -rw------- 1 root root 218 Jan 26 10:04 .recently-used.xbel -rw------- 1 root root 98 Feb 13 16:23 .serverauth.17096 drwxr-xr-x 2 root root 4096 Dec 25 12:42 .tuxcmd drwxr-xr-x 2 root root 4096 Feb 12 17:25 .xine
I have just tried to update my kernel from 2.6.24.5 to 2.6.39-rc3 on a Slackware 12.1 distribution. I have successfully updated the kernel before, but it was from a newer distribution and newer kernel(Slackware 13.1 and 2.6.33.4). After I updated and rebooted, I got the following error:
Code: List of all partitions: 0300 4194302 hda driver: ide-cdrom 0800 312571224 sda driver: sd 0801 244197560 sda1 00000000-0000-0000-0000-000000000sda1 0802 68372640 sda2 00000000-0000-0000-0000-000000000sda2 No filesystem could mount root, tried: romfs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (8,1) Pid: 1, comm: swapper Not tainted 2.6.39-rc3-smp #1 .....
I am trying to create a jailed shell for a user Don($UID '500') using my own method(I don't want to use any ready-made "jailkit"). The user don should get a home directory /jail/don instead of /home/don when he login via SSH (So that he will not able to see any other files/directories on the system)
This is what I have done.
Quote:
Code:
It works without any issue ....Home directory changes to /jail/don when I ssh to the system as user don. ie: #ssh don@192.168.0.66
Then I added a chroot command to this code.
Code:
Unfortunately , now I am getting an error message saying that "chroot: cannot change root directory to /jail: Operation not permitted" .. I am not sure how to rectify this error... Is my approach correct to get a jailed shell using /etc/profile file ?
First time trying anything like this. I'm running a Abit NF7 with a silicon image 3112 that's support was broken in 2.6.35. I get a kernel panic when VFS can't find the root partition, I can't remember the exact line (can't log it, root isn't mounted yet) but it says something like sata1: link down (sstatus 0 scontrol 0). I think there might be a more telling error message before, but it flies by too fast to see or capture with my camera video recorder.
There's a patch that reverts back to when there was a delay in /drivers/ata/libata-sff.c in the function ata_sff_tf_load, by calling ata_wait_idle(ap) which fixes the issue for some people but not my system. I don't know anything about what I'm doing, but I thought I'd go through and add printk's in each function in sata_sil and see how far the device was initialized. I did this but they all happen early in the boot that flies by. Is there any way to add a pause like the "more" command? [URL]
I messed up the first installation of Fedora on my server. My setup is as follows: Fedora and Gnome - NFS system, No dual boot (Windows or anything) Fedora ISO DVD downloaded No kickstart or other tools. how to set this up, from the time I insert the disk and have it boot up (configged already to boot from it). I know how to wipe it clean at intall time. Is that the root directory? And, is /boot the actual boot directory? I'm just having a hard time uderstanding that. As I said, I just want a quick itemized list, step 1, step 2, etc, from partitioning, creating file system, mounting, etc. in the right order.
I've taken the kernel 2.6.33.3 and edited the .config file to take out most of the compatibility etc. that I will not be using. I'm run the makes and updated grub. I go to boot it runs through most of the way until I get the following:Quote:/bin/plymouthd: symbol lookup error: /bin/plymouthd: undefined symbol:ply_chara could not read byte from child: SuccessNo root device foundBoot has failed, sleeping forever.'m fairly new to Linux and still more of a dabbler. (Though this seemed more difficult than "Who is root" so I didn't put this in the newbie thread.)Any ideas for what might be wrong?I've tried looking in the config file from something that relates, but they have all been included (Y) in the module.