Home arrow Aaj Ka Tip
Main Menu
Home
Help Docs
Newbies
Corporates
Gnu/Linux Distros
Programming
Databases
Links
Search
Regular
News
Interviews
Aaj Ka Tip
Aaj Ka Command
Community
Blogs
Wiki
Forums
Services
Free Software

Aaj Ka Tip
Recover deleted partitions using fdisk Print E-mail

This is to recover partitions which have been deleted accidentaly by using fdisk in Linux.

This can be done before rebooting your machine.

You just need to ahve a snapshot of the partition table,something like this I had before doing the same

Disk /dev/sda: 40.0 GB, 40000000000 bytes

255 heads, 63 sectors/track, 4863 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 1020 8193118+ 83 Linux

/dev/sda2 1021 1275 2048287+ 82 Linux swap

/dev/sda3 1276 4863 28820610 5 Extended

/dev/sda5 1276 1884 4891761 83 Linux

/dev/sda6 1885 2432 4401778+ 83 Linux

/dev/sda7 2433 4439 16121196 83 Linux

 

Just re-create the partition table asn save and exit.

You might require to mark the active partition as active and also re-install the boot loader.

Also the same can be done by saving the MBR using the "dd" utility.Lookout for the same TIP in our Aaj ka tip section.

Recover Deleted partitions from fdisk Print E-mail
This is for recovering partitions which have been accidentally deleted by fdisk.
How to resolve "Neighbour table overflow" problem? Print E-mail

Gnu/Linux servers (when used extensively as a server) throw the following messages in log file

  kernel: Neighbour table overflow.
  kernel: printk: 100 messages suppressed.
  kernel: Neighbour table overflow.
  kernel: printk: 151 messages suppressed.
  kernel: Neighbour table overflow.

The solution to the problem is to increase the threshold level for the network devices

To check the present threshold level 1

cat /proc/sys/net/ipv4/neigh/default/gc_thresh1

It will give some value as 128 or 256 or 512.

This can be increased to the next level.Like if the value is 128 then

make the thresh1 value as 256 and thresh2 as 512 and thresh3 as 1024.

echo 256 > /proc/sys/net/ipv4/neigh/default/gc_thresh1

echo 512 > /proc/sys/net/ipv4/neigh/default/gc_thresh2

echo 1024 > /proc/sys/net/ipv4/neigh/default/gc_thresh3

This will stop the Error messages that were recieved in the log file

Copying large files on the network with samba/cifs Print E-mail

Samba in Linux by default does not allow you to copy large files (> 2 GB) to Win. machines over the network.

The workaround for this problem is to enable the Large File System(lfs) support with samba/smbclient.

Another easy solution is to use the CIFS(Common Internet File System) in place of smbfs

So to mount a remote location to my local directory I would use

mount -t cifs -o username=user lfs workgroup=my_domain //<remote location>  <local directory>

This will allow you to copy large files over the network.

I have tested this with the file size of around 22 GB using CIFS.

mounting windows shares on Linux with non-root users Print E-mail

You can always mount windows shares on Linux machines using

smbmount '//<IP ADDR>/<Share Name>' <path to be mounted> -o username=<username> workgroup=<work group name

This does not allow the non-root users to write in this directory.

If you try to chaning the owner of the directory like

chown -R  <username> <path of the mounted share>

it will report an error ,such as "operation not permitted "

changing the permissions of the directory won't work.

So the solution to this is to sue smbmount with the user(non-root user) for which write access is required.

if you try the same smbmount command with the non-root user then the error you get is,

smbmnt must be installed suid root for direct user mounts (500,500)
smbmnt failed: 1

In this case this error can be resolved by setuid permissions on the smbmnt command.

chmod +s /usr/bin/smbmount

You need to try again to mount the shared folder and it should work this time.

If you get an error like this in some Linux OS
"libsmb based programs must *NOT* be setuid root."

Then try this
chmod +s /usr/bin/smbmnt


instead of
chmod +s /usr/bin/smbmount

If you have already set the suid bit for /usr/bin/smbmount, then unset it as
chmod -s /usr/bin/smbmount
<< Start < Previous 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 19 - 27 of 110



gnulinuxclub
Join Us
About Us
Contact Us
Support Us
Acknowlegdement
Login(only for dev.)

Royalty Free Images

O'Reilly User Group discount!




Powered By GIMP GIMP
Contact Webmaster Copyleft 2011 gnulinuxclub.org