Posts

Showing posts with the label Linux

Setting default boot kernel in grub 2

Setting default boot kernel in grub 2 Each time kernal is updated  boot order is changed automatically so it is necessary many times for me atleast to set it back to the old boot order. See already running grub entries cat /boot/grub2/grub.cfg | grep Fedora menuentry 'Fedora (3.3.2-1.fc16.x86_64)' --class fedora --class gnu-linux --class gnu --class os {     echo 'Loading Fedora (3.3.2-1.fc16.x86_64)' menuentry 'Fedora Linux, with Linux 3.3.1-3.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os { menuentry 'Fedora Linux, with Linux 3.3.1-3.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os { menuentry ' Fedora Linux, with Linux 3.1.0-7.fc16.x86_64 ' --class fedora --class gnu-linux --class gnu --class os { menuentry 'Fedora Linux, with Linux 3.1.0-7.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os { get the menu entry from the result ...

Mounting Linux NFS on solaris 10 (RPC: Program not registered and Not owner errors)

NFS server is running on Redhat Linux machine 4E IP of NFS server 192.168.1.251 share     /u01/nfs mounting the above nfs on Solaris 10  (192.168.1.119) mounting point on client /u01/nfstest mount -F nfs 192.168.1.251:/u01/nfs /nfstest the above command should mount the nfs share to /u01/nfstest on client but after i issued the command i was getting nfs mount: 192.168.1.251: : RPC: Program not registered after searching i found this link http://www.softpanorama.org/Net/Application_layer/NFS/troubleshooting_of_nfs_problems.shtml#The_program_not_registered_Error which was telling mountd deamon was not up on nfs server machine started nfs service on nfs server service nfs start after starting issued the command to mount the nfs on solaris client mount -F nfs 192.168.1.251:/u01/nfs /nfstest this time another error nfs mount: mount: /nfstest: Not owner googling taught me that this was becuase of NFS version, linux is using version 3 bu...

Connecting to remote host with ssh without password - By passing ssh/scp password

go to the node from where you will be connecting [ source machine ] run ssh-keygen -t dsa or ssh-keygen -t rsa this will generate public and private key when asked for file name and password just press enter so that default file will be created and password will be blank now copy the .pub content to the target machine's authorized_keys file under [username]/.ssh/ ssh-copy-id  -i [pub_file_name] [username]@[targethostname] [it will ask for password to connect to target provide password for this time] ex: ssh-copy-id  -i id_dsa.pub testuser@testserver this command will copy the public key to the target machines user's authorised_keys file location of the authorized_key file is - [user's home folder]/.ssh/ if the above command does not work copy the public key manually to target machine add the copied public key to user's authorized_key file, if it does not exist just create one ex: ssh-copy-id -i id_dsa.pub test@testserver Note: ssh-copy-id comm...

Configuring NFS

File sharing between to linux boxes with NFS start nfs service on the server machine and client machine Server : 192.168.1.2 Client:    192.168.1.1 service nfs start edit /etc/exports file and add the location you want to share this is the entry to be added to exports file to share a folder called test in home directory. (rw) will allow both read and write folder_name_with_path host_name(options) host_name is the name of the host(client IP or client hostname) from where you are going to mount this share ex: if you want to share a folder called test in home folder to a client with ip address 192.168.1.1 do as below.. edit export file to add this entry (this is entered host server whose folder is actually shared) on Server(192.168.1.2) /home/test 192.168.1.1(rw) go to cleint machine and start nfs service then mount the nfs sharing mount -t nfs -o rw nfs_server_name://folder_name_with_path mount_point on Client(192.168.1.1) mount -t nfs -o rw 192...